Termination of Dusk terminationofduskwiki https://terminationofdusk.miraheze.org/wiki/Main_Page MediaWiki 1.40.1 first-letter Media Special Talk User User talk Termination of Dusk Termination of Dusk talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Module Module talk Template:Tmbox 10 844 5618 2013-10-20T12:46:44Z wikipedia>Mr. Stradivarius 0 switch to Lua version wikitext text/x-wiki {{#invoke:Message box|tmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> a594c2ad0c7763e89761e3a24c69dca724b974be Template:Native phrase 10 641 1270 2013-12-18T21:08:38Z wikipedia>Nick 0 Protected Template:Native phrase: [[WP:High-risk templates|Highly visible template]]: #redirect ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) wikitext text/x-wiki #redirect [[Template:Native name]] 561f2c45647b28659d991f0a467779366e7ec49e Template:Infobox geopolitical organization 10 668 1324 2014-02-21T17:02:10Z wikipedia>Wbm1058 0 remove template in the wrong namespace, removed: {{R from other capitalisation}} using [[Project:AWB|AWB]] wikitext text/x-wiki #REDIRECT [[Template:Infobox country]]{{R from alternate name}} <!-- see Template:Infobox Geopolitical organization --> 4d4892c38a22f1866ca7a29f81ddbc7fc26967f5 Module:Ns has subpages 828 733 1455 2014-12-10T06:37:29Z wikipedia>Mr. Stradivarius 0 Protected Module:Ns has subpages: [[WP:High-risk templates|High-risk Lua module]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p e133068ba73738b16e1e3eba47735516a461eb5b Template:Colorbox 10 389 768 2016-10-21T09:53:21Z wikipedia>Alexiaa 0 Added more [[WP:RCAT|rcats]] wikitext text/x-wiki #REDIRECT [[Template:Color box]] {{Redirect category shell| {{R from merge}} {{R from template shortcut}} {{R from modification}} }} fda2429b209ac6c2800d55d664b38599e2a4e287 Template:Country data EU 10 654 1296 2017-04-07T20:08:10Z wikipedia>Jo-Jo Eumerus 0 Changed protection level for "[[Template:Country data EU]]": Matching redirect target ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:Country data European Union]]<noinclude>[[Category: Country data redirects|EU]]</noinclude> 2267fd165f54795dc23946ea44a5a5f233a3d041 Template:Cs1 10 846 5622 2017-10-09T12:22:45Z wikipedia>Xezbeth 0 Protected "[[Template:Cs1]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki [[Help:Citation Style 1|Citation Style 1]]<noinclude> [[Category:Documentation assistance templates]] </noinclude> 1da8ad17d867e11fdecfe858aa0b0e5a632bb6e8 Module:Lang/ISO 639 synonyms 828 368 726 2017-12-13T23:10:47Z wikipedia>Trappist the monk 0 Scribunto text/plain -- File-Date: 2013-01-11 return { ["aar"] = "aa", ["abk"] = "ab", ["afr"] = "af", ["aka"] = "ak", ["amh"] = "am", ["ara"] = "ar", ["arg"] = "an", ["asm"] = "as", ["ava"] = "av", ["ave"] = "ae", ["aym"] = "ay", ["aze"] = "az", ["bak"] = "ba", ["bam"] = "bm", ["bel"] = "be", ["ben"] = "bn", ["bih"] = "bh", ["bis"] = "bi", ["bod"] = "bo", ["bos"] = "bs", ["bre"] = "br", ["bul"] = "bg", ["cat"] = "ca", ["ces"] = "cs", ["cha"] = "ch", ["che"] = "ce", ["chu"] = "cu", ["chv"] = "cv", ["cor"] = "kw", ["cos"] = "co", ["cre"] = "cr", ["cym"] = "cy", ["dan"] = "da", ["deu"] = "de", ["div"] = "dv", ["dzo"] = "dz", ["ell"] = "el", ["eng"] = "en", ["epo"] = "eo", ["est"] = "et", ["eus"] = "eu", ["ewe"] = "ee", ["fao"] = "fo", ["fas"] = "fa", ["fij"] = "fj", ["fin"] = "fi", ["fra"] = "fr", ["fry"] = "fy", ["ful"] = "ff", ["gla"] = "gd", ["gle"] = "ga", ["glg"] = "gl", ["glv"] = "gv", ["grn"] = "gn", ["guj"] = "gu", ["hat"] = "ht", ["hau"] = "ha", ["heb"] = "he", ["her"] = "hz", ["hin"] = "hi", ["hmo"] = "ho", ["hrv"] = "hr", ["hun"] = "hu", ["hye"] = "hy", ["ibo"] = "ig", ["ido"] = "io", ["iii"] = "ii", ["iku"] = "iu", ["ile"] = "ie", ["ina"] = "ia", ["ind"] = "id", ["ipk"] = "ik", ["isl"] = "is", ["ita"] = "it", ["jav"] = "jv", ["jpn"] = "ja", ["kal"] = "kl", ["kan"] = "kn", ["kas"] = "ks", ["kat"] = "ka", ["kau"] = "kr", ["kaz"] = "kk", ["khm"] = "km", ["kik"] = "ki", ["kin"] = "rw", ["kir"] = "ky", ["kom"] = "kv", ["kon"] = "kg", ["kor"] = "ko", ["kua"] = "kj", ["kur"] = "ku", ["lao"] = "lo", ["lat"] = "la", ["lav"] = "lv", ["lim"] = "li", ["lin"] = "ln", ["lit"] = "lt", ["ltz"] = "lb", ["lub"] = "lu", ["lug"] = "lg", ["mah"] = "mh", ["mal"] = "ml", ["mar"] = "mr", ["mkd"] = "mk", ["mlg"] = "mg", ["mlt"] = "mt", ["mon"] = "mn", ["mri"] = "mi", ["msa"] = "ms", ["mya"] = "my", ["nau"] = "na", ["nav"] = "nv", ["nbl"] = "nr", ["nde"] = "nd", ["ndo"] = "ng", ["nep"] = "ne", ["nld"] = "nl", ["nno"] = "nn", ["nob"] = "nb", ["nor"] = "no", ["nya"] = "ny", ["oci"] = "oc", ["oji"] = "oj", ["ori"] = "or", ["orm"] = "om", ["oss"] = "os", ["pan"] = "pa", ["pli"] = "pi", ["pol"] = "pl", ["por"] = "pt", ["pus"] = "ps", ["que"] = "qu", ["roh"] = "rm", ["ron"] = "ro", ["run"] = "rn", ["rus"] = "ru", ["sag"] = "sg", ["san"] = "sa", ["sin"] = "si", ["slk"] = "sk", ["slv"] = "sl", ["sme"] = "se", ["smo"] = "sm", ["sna"] = "sn", ["snd"] = "sd", ["som"] = "so", ["sot"] = "st", ["spa"] = "es", ["sqi"] = "sq", ["srd"] = "sc", ["srp"] = "sr", ["ssw"] = "ss", ["sun"] = "su", ["swa"] = "sw", ["swe"] = "sv", ["tah"] = "ty", ["tam"] = "ta", ["tat"] = "tt", ["tel"] = "te", ["tgk"] = "tg", ["tgl"] = "tl", ["tha"] = "th", ["tir"] = "ti", ["ton"] = "to", ["tsn"] = "tn", ["tso"] = "ts", ["tuk"] = "tk", ["tur"] = "tr", ["twi"] = "tw", ["uig"] = "ug", ["ukr"] = "uk", ["urd"] = "ur", ["uzb"] = "uz", ["ven"] = "ve", ["vie"] = "vi", ["vol"] = "vo", ["wln"] = "wa", ["wol"] = "wo", ["xho"] = "xh", ["yid"] = "yi", ["yor"] = "yo", ["zha"] = "za", ["zho"] = "zh", ["zul"] = "zu" } f3fb5374c9e0fdef6ce6ea22736b79468358ca19 Template:Convinfobox/prisec2 10 622 1232 2018-02-23T17:02:12Z wikipedia>Primefac 0 Changed protection level for "[[Template:Convinfobox/prisec2]]": [[WP:HIGHRISK|high-risk]] template with 2000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:Convinfobox/pri2]]<!--{{convert/{{{2}}}|{{{1}}}|{{{3}}}|{{{4}}}|d=valunit2/{{{d}}}}}<noinclude> [[Category:Subtemplates of Template Convinfobox]] </noinclude>--> b2680a6b956cc0cd7c35c6ea3085e03944317fb9 Module:Distinguish 828 331 652 2018-04-01T10:06:10Z wikipedia>Galobtter 0 fixed with text and selfref Scribunto text/plain local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local mTableTools --initialize lazily local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} function p.distinguish(frame) mArguments = require('Module:Arguments') mTableTools = require('Module:TableTools') local args = mArguments.getArgs(frame) local selfref = args.selfref local text = args.text args = mTableTools.compressSparseArray(args) return p._distinguish(args, text, selfref) end function p._distinguish(args, text, selfref) checkType("_distinguish", 1, args, 'table') if #args == 0 and not text then return '' end local text = string.format( 'Not to be confused with %s.', text or mHatlist.orList(args, true) ) hnOptions = {selfref = selfref} return mHatnote._hatnote(text, hnOptions) end return p 0364d14af01fc656ad1d898c5036fbd12a7ca938 Module:Citation 828 843 5616 2018-05-21T11:38:53Z wikipedia>Pppery 0 Rm unreachable code Scribunto text/plain error('This module is retained for historical and structural reasons; consider using [[Module:Citation/CS1]].') b09b01dacd314f37060769a4fc6b8f027c247b86 Module:Based on 828 679 1346 2018-07-08T02:54:33Z wikipedia>Alex 21 0 Include space Scribunto text/plain local p = {} function p.lua_main(frame) local s = frame.args[1] if frame.args[3] then local args = {} for i, v in ipairs(frame.args) do if i >= 2 then args[#args+1] = v end end args['style'] = 'display: inline' args['list_style'] = 'display: inline' args['item1_style'] = 'display: inline' h = mw.html.create('div') h:wikitext(s) h:tag('br') -- h:newline() is not working for some reason h:wikitext('by ') h:wikitext(frame:expandTemplate{ title = 'Unbulleted list', args = args }) return h elseif frame.args[2] then s = s .. '<br />by ' .. frame.args[2] return s end return s end function p.main(frame) return p.lua_main(frame:getParent()) end return p f339a89d130bc03d93a1769df04b16e520723fbf Template:Infobox former country 10 665 1318 2018-08-12T22:08:56Z wikipedia>Primefac 0 merge complete wikitext text/x-wiki #REDIRECT [[Template:Infobox country]] {{r from merger}} d1a087676a1c1fbf80c00fb58bf83cff967f7de4 Module:Separated entries 828 371 732 2018-12-17T20:54:33Z wikipedia>Amorymeltzer 0 Changed protection level for "[[Module:Separated entries]]": [[WP:High-risk templates|High-risk Lua module]]: Over 2M transclusions ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module takes positional parameters as input and concatenates them with -- an optional separator. The final separator (the "conjunction") can be -- specified independently, enabling natural-language lists like -- "foo, bar, baz and qux". The starting parameter can also be specified. local compressSparseArray = require('Module:TableTools').compressSparseArray local p = {} function p._main(args) local separator = args.separator -- Decode (convert to Unicode) HTML escape sequences, such as "&#32;" for space. and mw.text.decode(args.separator) or '' local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator -- Discard values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named parameters. local values = compressSparseArray(args) return mw.text.listToText(values, separator, conjunction) end local function makeInvokeFunction(separator, conjunction, first) return function (frame) local args = require('Module:Arguments').getArgs(frame) args.separator = separator or args.separator args.conjunction = conjunction or args.conjunction args.first = first or args.first return p._main(args) end end p.main = makeInvokeFunction() p.br = makeInvokeFunction('<br />') p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain()) return p e80231ff3de01afd7f62a94e0a34dc1e67504085 Module:Color contrast 828 290 570 2019-01-06T22:38:25Z wikipedia>Johnuniq 0 fix unintended color2lum global error which is causing errors; clean whitespace Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 291 572 2019-01-24T12:30:11Z wikipedia>Galobtter 0 Changed protection level for "[[Module:Color contrast/colors]]": [[WP:High-risk templates|High-risk Lua module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Template:Lua 10 320 630 2019-03-20T22:04:45Z wikipedia>RMCD bot 0 Removing notice of move discussion wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Clc 10 391 772 2019-04-24T04:30:59Z wikipedia>JJMC89 0 actual template is in the category wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Module:ISO 3166 828 616 1220 2019-04-28T16:52:10Z wikipedia>Frietjes 0 restrict tracking to articlespace per request Scribunto text/plain -- to enable us to replicate the current functioning of Country extract, we need to deal with: -- 2 {{<name>}} DONE! -- 3 [[<name>]] DONE! -- 4 [[<name>|<junk>]] DONE! -- 5 [[image:flag of <country>.[svg|gif|png|jpg]|\d+px]] DONE! local p = {} local getArgs = require("Module:Arguments").getArgs local data = mw.loadData("Module:ISO 3166/data/National") --[[----------F I N D N A M E----------]]-- -- Finds the name in the database local function findname(code,cdata,qry) local sqry = p.strip(qry) if cdata["name"] and sqry==p.strip(cdata["name"]) or cdata["isoname"] and sqry==p.strip(cdata["isoname"]) or not cdata["nocode"] and sqry==code or sqry==cdata["alpha3"] or sqry==cdata["numeric"] then return true end for _,tname in pairs(cdata["isonames"] or {}) do if sqry==p.strip(tname) then return true end end for _,tname in pairs(cdata["altnames"] or {}) do if sqry==p.strip(tname) then return true end end return false end --[[----------I S O N A M E----------]]-- -- Find the ISO name of a country/region local function isoname(data,code,lang) if data[code]["isonames"] then local name = data[code]["isodisplaynames"] and data[code]["isodisplaynames"][lang] or data[code]["isonames"][lang] or data[code]["isodisplaynames"] and data[code]["isodisplaynames"][data[code]["defaultlang"] or data["defaultlang"]] or data[code]["isonames"][data[code]["defaultlang"] or data["defaultlang"]] or data[code]["isodisplaynames"] and data[code]["isodisplaynames"]["en"] or data[code]["isonames"]["en"] if name then return name end for _,iname in pairs(data[code]["isonames"]) do return iname end return data[code]["isodisplayname"] or data[code]["isoname"] else return data[code]["isodisplayname"] or data[code]["isoname"] end end --[[----------S T R I P----------]]-- -- Removes junk from the input function p.strip(text) local accents = {["À"]="A",["Á"]="A",["Â"]="A",["Ã"]="A", -- accent list ["Ä"]="A",["Å"]="A",["Ç"]="C",["È"]="E",["É"]="E", ["Ê"]="E",["Ë"]="E",["Ì"]="I",["Í"]="I",["Î"]="I", ["Ï"]="I",["Ñ"]="N",["Ò"]="O",["Ó"]="O",["Ô"]="O", ["Õ"]="O",["Ö"]="O",["Ø"]="O",["Ù"]="U",["Ú"]="U", ["Û"]="U",["Ü"]="U",["Ý"]="Y" } local remove = {"NATION OF","COUNTRY OF","TERRITORY OF", -- text to be removed list "FLAG OF","FLAG","KINGDOM OF","STATE OF"," STATE ", "PROVINCE OF","PROVINCE","TERRITORY" } local patterns = {[".+:"]="",["|.+"]="",["%(.-%)"]="", -- patterns to follow (order may matter) ["%..*"]="",["^THE "]="",["%_"]=" ",["%-"]=" ", ["%d%d?%d?PX"]="", } text = mw.ustring.upper(text) -- Case insensitivity text = mw.ustring.gsub(text,"[À-Ý]",accents) -- Deaccent for pattern,value in pairs(patterns) do -- Follow patterns text = mw.ustring.gsub(text,pattern,value) end for _,words in pairs(remove) do -- Remove unneeded words text = mw.ustring.gsub(text,words,"") end text = mw.ustring.gsub(text,"%W","") -- Remove non alpha-numeric return text end --[[----------P . C A L L S T R I P ---------]]-- -- Calls P.strip but using Module:Arguments function p.callstrip(frame) local args = getArgs(frame) return p.strip(args[1]) or "" end --[[----------P . L U A C O D E---------]]-- -- Makes the ISO code of a country function p.luacode(args) if string.find(args[1] or '',"%-") then args[1], args[2] = string.match(args[1] or '',"^([^%-]*)%-(.*)$") end if args[1] then args[1] = p.strip(args[1]) end if args[2] then args[2] = p.strip(args[2]) end if args["codetype"]=="3" then args["codetype"]="alpha3" end local eot = args.error or "" local catnocountry = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure country]]' local catnosubdivision = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure subdivision]]' if not args[1] then if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry, '<span style="font-size:100%" class="error">"No parameter for the country given"</span>' end if not args[2] then --3166-1 code for alpha2,cdata in pairs(data) do if findname(alpha2,cdata,args[1]) then if args["codetype"]=="numeric" or args["codetype"]=="alpha3" then return cdata[args["codetype"]] else return alpha2 end end end if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry else --3166-2 code for alpha2,cdata in pairs(data) do if findname(alpha2,cdata,args[1]) then if mw.ustring.match(alpha2,"GB") then -- For England, Wales etc. alpha2 = "GB" end local sdata = mw.loadData("Module:ISO 3166/data/"..alpha2) local empty = true for scode,scdata in pairs(sdata) do if type(scdata)=="table" then empty = false if findname(scode,scdata,args[2]) then return alpha2.."-"..scode end end end if mw.title.getCurrentTitle().namespace ~= 0 then catnosubdivision = '' end return catnosubdivision end end if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry end end --[[----------P . C O D E---------]]-- -- Calls P.Luacode but using Module:Arguments function p.code(frame) return p.luacode(getArgs(frame)) or "" end --[[----------P . N U M E R I C---------]]-- -- Calls P.Luacode but using Module:Arguments and setting it to output a numeric value function p.numeric(frame) local args = getArgs(frame) args["codetype"]="numeric" return p.luacode(args) or "" end --[[----------P . L U A N A M E---------]]-- -- Makes the ISO/common name of a country function p.luaname(args) local code1 = p.luacode(args) local code2 = '' if string.find(code1,"%-") then code1, code2 = string.match(code1,"^([^%-]*)%-(.*)$") end if string.find(code1,"^%u%u$") then if code2=="" then --3166-1 alpha-2 code if data[code1] then return (args.isoname or args.lang) and isoname(data,code1,args.lang) or (data[code1]["displayname"] or data[code1]["name"]) else return '[[Category:Wikipedia page with obscure country]]' end else --3166-2 code local sdata if data[code1] then sdata = mw.loadData("Module:ISO 3166/data/"..code1) else return '[[Category:Wikipedia page with obscure country]]' end if sdata[code2] then return (args.isoname or args.lang) and isoname(sdata,code2,args.lang) or (sdata[code2]["displayname"] or sdata[code2]["name"]) else return '[[Category:Wikipedia page with obscure country]]' end end end end --[[----------P . N A M E---------]]-- -- Calls P.Luaname but using Module:Arguments function p.name(frame) return p.luaname(getArgs(frame)) or "" end --[[----------P . G E O C O O R D I N S E R T---------]]-- -- Wrapper for Module:Coordinates.coordinsert function p.geocoordinsert(frame) -- {{#invoke:ISO 3166|geocoordinsert|{{coord|...}} -- |country=..|subdivision1=...|subdivision2=... -- |type=...|scale=...|dim=...|source=...|globe=... -- }} local args = frame.args local subdivisionqueried = false local catnocountry = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure country]]' local catnosubdivision = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure subdivision]]' or '' local tracking = '' local targs = {} targs[1] = args[1] or '' for i, v in pairs(args) do if i == 'country' and not mw.ustring.find(targs[1], 'region:') then local country = v local k, region = 1, '' -- look for a valid subdivision while region == '' and k < 3 do local subdivision = args['subdivision' .. k] or '' if subdivision ~= '' then region = p.luacode({country, subdivision, nocat = 'true'}) subdivisionqueried = true end k = k + 1 end -- subdivision lookup failed or never attempted, try country only if region == '' then region = p.luacode({country, nocat = 'true'}) if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry, catnosubdivision = '', '' end if region == '' then tracking = tracking .. catnocountry elseif subdivisionqueried == true then tracking = tracking .. catnosubdivision end end -- something worked, add it to the targs if region ~= '' then targs[#targs + 1] = 'region:' .. region end elseif i == 'type' or i == 'scale' or i == 'dim' or i == 'source' or i == 'globe' then targs[#targs + 1] = i .. ':' .. v end end -- call Module:Coordinates.coordinsert if there is something to insert if #targs > 1 then local coordinsert = require('Module:Coordinates').coordinsert return coordinsert({args = targs}) .. tracking end -- otherwise, just return the coordinates return targs[1] .. tracking end return p 6bc354f2610f29e712065cbe3ea814144fa3a600 Module:Formatted appearance 828 311 612 2019-07-18T17:24:43Z wikipedia>Gonnym 0 Scribunto text/plain -- This module requires the use of Module:List. local list = require('Module:List') local p = {} -- Local function which is used to get a correctly formatted entry. -- Function checks if the array had a value added by checking the counter, -- and returns the relevant result. local function getFormattedEntry(args, counter) if (counter == 1) then -- Check if the counter stayed the same. return "" -- Nothing was added to array; Return empty string. elseif (counter == 2) then -- Check if only one value was added to the array. return args[1] -- Only one value was added to array; Return that value. else -- The array had more than one value added. return list.makeList("unbulleted", args) -- Call list.makeList() to retrieve the formatted plainlist. end end --[[ Local function which is used to format an appearance for a comic book, in the style of: Line 1: <comic book title> #<issue number> (with comic book title in italics) Line 2: <release date> For other usages, see createGenericEntry(). The function works with the following combinations: -- Only comic book title (example: "The Incredible Hulk"). -- Title and issue number (example: "The Incredible Hulk" and "181"). -- Title and release date (example: "The Incredible Hulk and "November 1974"). -- Title, issue number and release date (example: "The Incredible Hulk", "181" and "November 1974"). -- Only release date (example: "November 1974"). --]] local function createComicEntry(appearanceMajor, appearanceMinor, appearanceDate) local fullString = {} -- Variable to save the array. local counter = 1 -- Variable to save the array counter. if (appearanceMajor ~= nil) then -- Check if a comic book title was entered. if (appearanceMinor == nil) then -- A comic book title was entered; Check if a issue number was entered. fullString[counter] = appearanceMajor -- A issue was not entered; Add only the comic book title to the array. counter = counter + 1 -- Increment counter by one. else fullString[counter] = appearanceMajor .. " " .. appearanceMinor -- A issue was entered; Add both to the array. counter = counter + 1 -- Increment counter by one. end end if (appearanceDate ~= nil) then -- Check if a release date was entered. fullString[counter] = appearanceDate -- A release date was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry. end --[[ Local function which is used to format an appearance for most usages, including television, film, books, songs and games, in the style of: Line 1: <minor work title> (in quotes) (Minor works include: TV episodes, chapters, songs and game missions) Line 2: <major work title> (in italics) (Major works include: TV series, films, books, albums and games) Line 3: <release date> For comic book usages, see createComicEntry(). The function works with the following combinations: -- Only minor work title (example: "Live Together, Die Alone"). -- Minor work title and major work title (example: "Live Together, Die Alone" and "Lost"). -- Minor work title and release date (example: "Live Together, Die Alone" and "May 24, 2006"). -- Minor work title, major work title and release date (example: "Live Together, Die Alone", "Lost" and "May 24, 2006"). -- Only major work title (example: "Lost"). -- major work title and release date (example: "Lost" and "May 24, 2006"). -- Only release date (example: "May 24, 2006"). --]] local function createGenericEntry(appearanceMajor, appearanceMinor, appearanceDate) local fullString = {} -- Variable to save the array. local counter = 1 -- Variable to save the array counter. if (appearanceMinor ~= nil) then -- Check if a minor appearance was entered. fullString[counter] = appearanceMinor -- A minor appearance was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end if (appearanceMajor ~= nil) then -- Check if a major appearance was entered. fullString[counter] = appearanceMajor -- A major appearance was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end if (appearanceDate ~= nil) then -- Check if a release date was entered. fullString[counter] = appearanceDate -- A release date was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry. end -- Local function which is used to format with a hash symbol comic book issues. -- For other minor works, see getFormattedGenericMinorWork(). local function getFormattedComicMinorWorkTitle(issue) if (issue ~= nil) then -- Check if the issue is not nil. if (string.find(issue, "#")) then -- Check if the issue already has a hash symbol. return issue -- Hash symbol already present; Return issue. else local formattedString = string.gsub(issue, "%d+", "#%1") -- Hash symbol not found; Add the symbol before the issue number. return formattedString -- Return issue. end else return nil -- issue is nil; Return nil. end end -- Local function which is used to format with quotes a minor work title of most types. -- For comic book issues, see getFormattedComicMinorWork() (see [MOS:MINORWORK]). local function getFormattedGenericMinorWorkTitle(title) if (title ~= nil) then -- Check if the title is not nil. return "\"" .. title .. "\"" -- Title is not nil; Add quotes to the title. else return nil -- Title is nil; Return nil. end end -- Local function which is used to format with italics a major work title (see [MOS:MAJORWORK]). local function getFormattedMajorWorkTitle(title) if (title ~= nil) then -- Check if the title is not nil. return "''" .. title .. "''" -- Title is not nil; Add italics to the title. else return nil -- Title is nil; Return nil. end end -- Local function which does the actual main process. local function _getFormattedAppearance(args) local appearanceMajor = args['major_work'] -- Get the title of the major work. local appearanceMinor = args['minor_work'] -- Get the title of the minor work. local isComic = false -- Variable to save the status of wether the appearence is from a comic book. if (args['issue'] ~= nil) then -- Check if the comic specific issue is not nil. appearanceMinor = args['issue'] -- Issue is not nil; Get the issue number. isComic = true -- Set isComic to true. end local appearanceDate = args['date'] -- Get the release date of the minor work. local formattedAppearanceMajor = getFormattedMajorWorkTitle(appearanceMajor) -- Call getFormattedMajorWorkTitle() to get a formatted major work title. if (isComic == false) then -- Check if the appearance is a comic book appearance. -- The appearance is not a comic book appearance; local formattedAppearanceMinor = getFormattedGenericMinorWorkTitle(appearanceMinor) -- Call getFormattedGenericMinorWorkTitle() to get a formatted minor work title. return createGenericEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createGenericEntry() to create an appearance entry. else -- The appearance is a comic book appearance. local formattedAppearanceMinor = getFormattedComicMinorWorkTitle(appearanceMinor) -- Call getFormattedComicMinorWorkTitle() to get a formatted minor work title. return createComicEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createComicEntry() to create a comic book appearance entry. end end --[[ Public function which is used to format the |first_appeared= and |last_appeared= fields. The usage of this module allows for correct title formatting (see [MOS:MAJORWORK] and [MOS:MINORWORK]), and correct line breaks based on guidelines (see [WP:UBLIST]). Parameters: -- |major_work= — optional; The title of the major work the fictional element appeared in. Major works include TV series, films, books, albums and games. -- |minor_work= — optional; The title of the minor work the fictional element appeared in. Minor works include TV episodes, chapters, songs and game missions. -- |issue= — optional; The number of the comic book issue the fictional element appeared in. -- |date= — optional; The date of the publication/release of the minor work where the fictional element appeared in. --]] function p.getFormattedAppearance(frame) local getArgs = require('Module:Arguments').getArgs -- Use Module:Arguments to access module arguments. local args = getArgs(frame) -- Get the arguments sent via the template. return _getFormattedAppearance(args) -- Call _getFormattedAppearance() to perform the actual process. end return p 21c7590d5c0d7d710104335553aa10711c9b3b6e Template:Ubl 10 381 752 2019-09-11T19:30:27Z wikipedia>Paine Ellsworth 0 convert to shell template wikitext text/x-wiki #REDIRECT [[Template:Unbulleted list]] {{Rcat shell| {{R from template shortcut}} }} 6b250cba5f224bbaa761c7bdc41463e1cef32a3d Template:Cs2 10 847 5624 2020-01-10T12:28:45Z wikipedia>Redrose64 0 Undid revision 934607874 by [[Special:Contributions/Milker|Milker]] ([[User talk:Milker|talk]]) please don't do this, it screws with tools wikitext text/x-wiki [[Help:Citation Style 2|Citation Style 2]]<noinclude> [[Category:Documentation assistance templates]] </noinclude> 858b36b946491e8f374a732e2a72589c9d6f7f00 Template:OS-tan Character/doc 10 797 5493 2020-02-08T04:00:13Z Tasha04 2 1 revision imported: Template for characters wikitext text/x-wiki <pre> <nowiki> {{OS-tan Character |tanname = -tan name of this character |image = name of the image to be used |imgsize = size of the image (200x200px if omitted) |cname = common or complete name of this character |alias = other names or nicknames for this character |hname = the human name of this character |creator = who created this character |roleplayer = who is roleplaying this character |debut = when the character first appeared in the roleplay (YYYY-MM-DD) |height = character's height in "cm (ft in)" form |haircolor = character's hair color |eyecolor = character's eye color |weapon = character's weapon(s) of choice |phfaction = character's faction in the roleplay |lineage = character's lineage, matriline, etc. |osper = what software or hardware this character personifies |osdev = who developed the software/hardware |platform = the platform(s) for which this software was released (not applicable if hardware) |reldate = when that software or hardware was first released (YYYY-MM-DD) |lastrel = when this software (or hardware, if applicable) was last updated (YYYY-MM-DD) }} </nowiki> </pre> {{OS-tan Character |tanname = 7.5-tan |image = 75picph.png |imgsize = 200x200px |cname = System 7.5-tan |alias = Capone, Mozart, Unity |hname = Amadea Pippin |creator = Futaba |roleplayer = [[User:Volarevia|VolareVia]] |debut = 2019-09-19 |height = 175.5cm (5'9") |haircolor = blonde |eyecolor = light-blue to lilac |weapon = Guns, Mecha |phfaction = Wanderer |lineage = Classic Macintosh |osper = System 7.x (PowerPC) |osdev = Apple |platform = PPC |reldate = System 7.1.2 (1994-03-14) |lastrel = System 7.6.1 (1997-04-07) }} [[Category:Character templates]] 723c06ec11a4c603b7d870c5f1fef3d812b93918 Module:Documentation 828 296 5509 2020-02-10T08:36:56Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs local messageBox = require('Module:Message box') -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local i18n = mw.loadData('Module:Documentation/i18n') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-type', cfgKey, expectType, type(msg)), 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-empty', '$' .. match, cfgKey), 4) end local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal) return ret end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end return '<small style="font-style: normal;">(' .. table.concat(ret, ' &#124; ') .. ')</small>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Load TemplateStyles ---------------------------------------------------------------------------- p.main = function(frame) local parent = frame.getParent(frame) local output = p._main(parent.args) return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. frame:preprocess(output) end ---------------------------------------------------------------------------- -- Main function ---------------------------------------------------------------------------- function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user -- -- Messages: -- 'main-div-id' --> 'template-documentation' -- 'main-div-classes' --> 'template-documentation iezoomfix' --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) -- This div tag is from {{documentation/start box}}, but moving it here -- so that we don't have to worry about unclosed tags. :tag('div') :attr('id', message('main-div-id')) :addClass(message('main-div-class')) :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :done() :wikitext(p._endBox(args, env)) :wikitext(p.addTrackingCategories(env)) return tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title objects and other namespace- or -- path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- env.printTitle - the print version of the template, located at the /Print subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.printTitle() --[[ -- Title object for the /Print subpage. -- Messages: -- 'print-subpage' --> 'Print' --]] return env.templateTitle:subPageTitle(message('print-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the same as the -- subject namespace. However, pages in the Article, File, MediaWiki or Category -- namespaces must have their /doc, /sandbox and /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', {page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[w:Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[w:Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local frame = mw.getCurrentFrame() local isPreviewing = frame:preprocess('{{REVISIONID}}') == '' -- True if the page is being previewed. local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if isPreviewing or not compareUrl then text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) else local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. text = text .. makeCategoryLink(message('sandbox-category')) omargs.text = text omargs.class = message('sandbox-class') local ret = '<div style="clear: both;"></div>' ret = ret .. messageBox.main('ombox', omargs) return ret end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local title = env.title local protectionLevels local protectionTemplate = message('protection-template') local namespace = title.namespace if not (protectionTemplate and (namespace == 10 or namespace == 828)) then -- Don't display the protection template if we are not in the template or module namespaces. return nil end protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editLevels = protectionLevels.edit local moveLevels = protectionLevels.move if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then -- The page is full-move protected, or full, template, or semi-protected. local frame = mw.getCurrentFrame() return frame:expandTemplate{title = protectionTemplate, args = message('protection-template-args', nil, 'table')} else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = i18n['view-link-display'] data.editLinkDisplay = i18n['edit-link-display'] data.historyLinkDisplay = i18n['history-link-display'] data.purgeLinkDisplay = i18n['purge-link-display'] -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 6 then -- File namespace preload = message('file-docpage-preload') elseif subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = i18n['create-link-display'] return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks' -- 'start-box-link-id' --> 'doc_editlinks' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = i18n['template-namespace-heading'] elseif subjectSpace == 828 then -- Module namespace data.heading = i18n['module-namespace-heading'] elseif subjectSpace == 6 then -- File namespace data.heading = i18n['file-namespace-heading'] else data.heading = i18n['other-namespaces-heading'] end -- Data for the [view][edit][history][purge] or [create] links. if links then data.linksClass = message('start-box-linkclasses') data.linksId = message('start-box-link-id') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox :addClass(message('header-div-class')) :tag('div') :addClass(message('heading-div-class')) :wikitext(data.heading) local links = data.links if links then sbox :tag('div') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. local cbox = mw.html.create('div') cbox :addClass(message('content-div-class')) :wikitext('\n' .. (content or '') .. '\n') return tostring(cbox) end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the footer text field. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') text = text .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates. if printBlurb then text = text .. '<br />' .. printBlurb end end end local ebox = mw.html.create('div') ebox :addClass(message('footer-div-class')) :wikitext(text) return tostring(ebox) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Wikipedia:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle or args.content then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = i18n['edit-link-display'] local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = i18n['history-link-display'] local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = i18n['create-link-display'] local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end function p.makePrintBlurb(args, env) --[=[ -- Generates the blurb displayed when there is a print version of the template available. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'print-link-display' --> '/Print' -- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]' -- .. ' of this template exists at $1.' -- .. ' If you make a change to this template, please update the print version as well.' -- 'display-print-category' --> true -- 'print-category' --> 'Templates with print versions' --]=] local printTitle = env.printTitle if not printTitle then return nil end local ret if printTitle.exists then local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display')) ret = message('print-blurb', {printLink}) local displayPrintCategory = message('display-print-category', nil, 'boolean') if displayPrintCategory then ret = ret .. makeCategoryLink(message('print-category')) end end return ret end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p e1ff1b8152933ec82a907dd8924fd081845b9638 Module:Infobox 828 273 5499 2020-02-10T08:37:15Z Tasha04 2 1 revision imported Scribunto text/plain -- -- This module implements {{Infobox}} -- local p = {} local navbar = require('Module:Navbar')._navbar local args = {} local origArgs local root local function notempty( s ) return s and s:match( '%S' ) end local function fixChildBoxes(sval, tt) if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481 -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end local function union(t1, t2) -- Returns the union of the values of two tables, as a sequence. local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end local function getArgNums(prefix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end local function addRow(rowArgs) -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. if rowArgs.header then root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :attr('id', rowArgs.rowid) :tag('th') :attr('colspan', 2) :attr('id', rowArgs.headerid) :addClass(rowArgs.class) :addClass(args.headerclass) :css('text-align', 'center') :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) elseif rowArgs.data then local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) row:attr('id', rowArgs.rowid) if rowArgs.label then row :tag('th') :attr('scope', 'row') :attr('id', rowArgs.labelid) :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') if not rowArgs.label then dataCell :attr('colspan', 2) :css('text-align', 'center') end dataCell :attr('id', rowArgs.dataid) :addClass(rowArgs.class) :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) end end local function renderTitle() if not args.title then return end root :tag('caption') :addClass(args.titleclass) :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end root :tag('tr') :tag('th') :attr('colspan', 2) :addClass(args.aboveclass) :css('text-align', 'center') :css('font-size', '125%') :css('font-weight', 'bold') :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end root :tag('tr') :tag('td') :attr('colspan', '2') :addClass(args.belowclass) :css('text-align', 'center') :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addRow({ data = args['subheader' .. tostring(num)], datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :cssText(args.captionstyle) :wikitext(caption) end addRow({ data = tostring(data), datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end local function renderRows() -- Gets the union of the header and data argument numbers, -- and renders them all in order using addRow. local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)], dataid = args['dataid' .. tostring(num)], labelid = args['labelid' .. tostring(num)], headerid = args['headerid' .. tostring(num)], rowid = args['rowid' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end root :tag('tr') :tag('td') :attr('colspan', '2') :css('text-align', 'right') :wikitext(navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end local function renderTrackingCategories() if args.decat ~= 'yes' then if args.child == 'yes' then if args.title then root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]') end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles which use infobox templates with no data rows]]') end end end local function _infobox() -- Specify the overall layout of the infobox, with special settings -- if the infobox is used as a 'child' inside another infobox. if args.child ~= 'yes' then root = mw.html.create('table') root :addClass((args.subbox ~= 'yes') and 'infobox' or nil) :addClass(args.bodyclass) if args.subbox == 'yes' then root :css('padding', '0') :css('border', 'none') :css('margin', '-3px') :css('width', 'auto') :css('min-width', '100%') :css('font-size', '100%') :css('clear', 'none') :css('float', 'none') :css('background-color', 'transparent') else root :css('width', '22em') end root :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end renderSubheaders() renderImages() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderTrackingCategories() return tostring(root) end local function preprocessSingleArg(argName) -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end local function preprocessArgs(prefixTable, step) -- Assign the parameters with the given prefixes to the args table, in order, in batches -- of the step size specified. This is to prevent references etc. from appearing in the -- wrong order. The prefixTable should be an array containing tables, each of which has -- two possible fields, a "prefix" string and a "depend" table. The function always parses -- parameters containing the "prefix" string, but only parses parameters in the "depend" -- table if the prefix parameter is present and non-blank. if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones. preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present and not blank, or -- we are processing "prefix1" and "prefix" is present and not blank, and -- if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end function p.infobox(frame) -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end -- Parse the data parameters in the same order that the old {{infobox}} did, so that -- references etc. will display in the expected places. Parameters that depend on -- another parameter are only processed if that parameter is present, to avoid -- phantom references appearing in article reference lists. preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'}, {prefix = 'dataid'}, {prefix = 'labelid'}, {prefix = 'headerid'}, {prefix = 'rowid'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent preprocessSingleArg('decat') return _infobox() end return p 86cf80d64495ad16eb12aa533ca749c55689b02d Module:Navbar 828 283 5501 2020-02-10T08:43:55Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} local getArgs local ul function p.addItem (mini, full, link, descrip, args, url) local l if url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-'..full) :wikitext(l[1] .. link .. l[2]) :tag(args.mini and 'abbr' or 'span') :attr('title', descrip..' this template') :cssText(args.fontstyle) :wikitext(args.mini and mini or full) :done() :wikitext(l[3]) end function p.brackets (position, c, args, div) if args.brackets then div :tag('span') :css('margin-'..position, '-0.125em') :cssText(args.fontstyle) :wikitext(c) end end function p._navbar(args) local show = {true, true, true, false, false, false} local titleArg = 1 if args.collapsible then titleArg = 2 if not args.plain then args.mini = 1 end if args.fontcolor then args.fontstyle = 'color:' .. args.fontcolor .. ';' end args.style = 'float:left; text-align:left' end if args.template then titleArg = 'template' show = {true, false, false, false, false, false} local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} for k,v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end if args.noedit then show[3] = false end local titleText = args[titleArg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local title = mw.title.new(mw.text.trim(titleText), 'Template') if not title then error('Invalid title ' .. titleText) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' local div = mw.html.create():tag('div') div :addClass('plainlinks') :addClass('hlist') :addClass('navbar') :cssText(args.style) if args.mini then div:addClass('mini') end if not (args.mini or args.plain) then div :tag('span') :css('word-spacing', 0) :cssText(args.fontstyle) :wikitext(args.text or 'This box:') :wikitext(' ') end p.brackets('right', '&#91; ', args, div) ul = div:tag('ul') if show[1] then p.addItem('v', 'view', title.fullText, 'View', args) end if show[2] then p.addItem('t', 'talk', talkpage, 'Discuss', args) end if show[3] then p.addItem('e', 'edit', title:fullUrl('action=edit'), 'Edit', args, true) end if show[4] then p.addItem('h', 'hist', title:fullUrl('action=history'), 'History of', args, true) end if show[5] then local move = mw.title.new ('Special:Movepage') p.addItem('m', 'move', move:fullUrl('target='..title.fullText), 'Move', args, true) end if show[6] then p.addItem('w', 'watch', title:fullUrl('action=watch'), 'Watch', args, true) end p.brackets('left', ' &#93;', args, div) if args.collapsible then div :done() :tag('div') :css('font-size', '114%') :css('margin', args.mini and '0 4em' or '0 7em') :cssText(args.fontstyle) :wikitext(args[1]) end return tostring(div:done()) end function p.navbar(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return p._navbar(getArgs(frame)) end return p 04f3b81927127526bd5d8bda44128b559fc97d0d Module:Parameter names example 828 301 592 2020-03-26T04:07:47Z wikipedia>Andrybak 0 add popular variants of demonstration purposes parameters: nocat=yes, categories=no, and demo=yes Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end targs['nocat'] = 'yes'; targs['categories'] = 'no'; targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p 576eb8298850f4e4e62105ac740df295b7b7eb9e Module:Arguments 828 267 524 2020-04-01T06:12:40Z wikipedia>MusikAnimal 0 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Yesno 828 315 620 2020-04-01T06:27:55Z wikipedia>MusikAnimal 0 Undid revision 948472533 by [[Special:Contributions/w>Vogone|w>Vogone]] ([[User talk:w>Vogone|talk]]) Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:File link 828 334 658 2020-04-01T06:31:54Z wikipedia>MusikAnimal 0 Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]]) Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Template:Tlf 10 349 688 2020-04-13T14:42:57Z wikipedia>Primefac 0 Primefac moved page [[Template:Tlf]] to [[Template:Template link with link off]]: full name to indicate what it does wikitext text/x-wiki #REDIRECT [[Template:Template link with link off]] {{Redirect category shell| {{R from move}} }} 52759e1d3f7c9aa4a03d0b7d4f84f4c6adf53edf Module:String 828 272 534 2020-08-02T15:49:42Z wikipedia>RexxS 0 separate annotations for str.match from those for str._match Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Module:TNT 828 638 1264 2020-08-30T07:28:25Z wikipedia>Johnuniq 0 Changed protection level for "[[Module:TNT]]": [[WP:High-risk templates|High-risk Lua module]]: per request at [[WP:RFPP]] to match [[Module:Excerpt]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then table.insert(params, mw.text.trim(v)) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in pairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in pairs(data.data) do local newVal = {} local name = nil for pos, val in pairs(row) do local columnName = names[pos] if columnName == 'name' then name = val else newVal[columnName] = val end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 9d0d10e54abd232c806dcabccaf03e52858634a1 Module:Effective protection level 828 333 656 2020-09-29T03:38:47Z wikipedia>Jackmcbarn 0 bring in changes from sandbox Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 70256a489edf6be9808031b14a7e3ef3e025da97 Module:Documentation/styles.css 828 298 586 2020-11-19T20:21:58Z wikipedia>Izno 0 Changed protection level for "[[Module:Documentation/styles.css]]": actually match module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Template:Tlx 10 326 642 2020-11-20T18:53:35Z wikipedia>Primefac 0 Primefac moved page [[Template:Tlx]] to [[Template:Template link expanded]] over redirect: expand name, make it more obvious wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:Cot 10 717 1423 2021-01-23T15:32:43Z wikipedia>Elli 0 not needed wikitext text/x-wiki #REDIRECT [[Template:Collapse top]] {{Redirect category shell| {{R from template shortcut}} }} 708f8bf79aefbfe8ee62f4fa68561059be0372d2 Template:Tlc 10 696 1381 2021-01-23T16:04:55Z wikipedia>Elli 0 cats wikitext text/x-wiki #REDIRECT [[Template:Template link code]] {{Redirect category shell| {{R from template shortcut}} {{R from high-use template}} {{R from move}} }} 48ef4a029c0e27cccb1148a29fb8b7ccb211a4a2 Template:Tl 10 268 526 2021-02-12T22:03:00Z wikipedia>Anthony Appleyard 0 Anthony Appleyard moved page [[Template:Tl]] to [[Template:Template link]]: [[Special:Permalink/1006428669|Requested]] by Buidhe at [[WP:RM/TR]]: RM closed as move wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Module:Math 828 608 1204 2021-03-11T22:23:48Z wikipedia>Primefac 0 typo fix Scribunto text/plain --[[ This module provides a number of basic mathematical operations. ]] local yesno, getArgs -- lazily initialized local p = {} -- Holds functions to be returned from #invoke, and functions to make available to other Lua modules. local wrap = {} -- Holds wrapper functions that process arguments from #invoke. These act as intemediary between functions meant for #invoke and functions meant for Lua. --[[ Helper functions used to avoid redundant code. ]] local function err(msg) -- Generates wikitext error messages. return mw.ustring.format('<strong class="error">Formatting error: %s</strong>', msg) end local function unpackNumberArgs(args) -- Returns an unpacked list of arguments specified with numerical keys. local ret = {} for k, v in pairs(args) do if type(k) == 'number' then table.insert(ret, v) end end return unpack(ret) end local function makeArgArray(...) -- Makes an array of arguments from a list of arguments that might include nils. local args = {...} -- Table of arguments. It might contain nils or non-number values, so we can't use ipairs. local nums = {} -- Stores the numbers of valid numerical arguments. local ret = {} for k, v in pairs(args) do v = p._cleanNumber(v) if v then nums[#nums + 1] = k args[k] = v end end table.sort(nums) for i, num in ipairs(nums) do ret[#ret + 1] = args[num] end return ret end local function fold(func, ...) -- Use a function on all supplied arguments, and return the result. The function must accept two numbers as parameters, -- and must return a number as an output. This number is then supplied as input to the next function call. local vals = makeArgArray(...) local count = #vals -- The number of valid arguments if count == 0 then return -- Exit if we have no valid args, otherwise removing the first arg would cause an error. nil, 0 end local ret = table.remove(vals, 1) for _, val in ipairs(vals) do ret = func(ret, val) end return ret, count end --[[ Fold arguments by selectively choosing values (func should return when to choose the current "dominant" value). ]] local function binary_fold(func, ...) local value = fold((function(a, b) if func(a, b) then return a else return b end end), ...) return value end --[[ random Generate a random number Usage: {{#invoke: Math | random }} {{#invoke: Math | random | maximum value }} {{#invoke: Math | random | minimum value | maximum value }} ]] function wrap.random(args) local first = p._cleanNumber(args[1]) local second = p._cleanNumber(args[2]) return p._random(first, second) end function p._random(first, second) math.randomseed(mw.site.stats.edits + mw.site.stats.pages + os.time() + math.floor(os.clock() * 1000000000)) -- math.random will throw an error if given an explicit nil parameter, so we need to use if statements to check the params. if first and second then if first <= second then -- math.random doesn't allow the first number to be greater than the second. return math.random(first, second) end elseif first then return math.random(first) else return math.random() end end --[[ order Determine order of magnitude of a number Usage: {{#invoke: Math | order | value }} ]] function wrap.order(args) local input_string = (args[1] or args.x or '0'); local input_number = p._cleanNumber(input_string); if input_number == nil then return err('order of magnitude input appears non-numeric') else return p._order(input_number) end end function p._order(x) if x == 0 then return 0 end return math.floor(math.log10(math.abs(x))) end --[[ precision Detemines the precision of a number using the string representation Usage: {{ #invoke: Math | precision | value }} ]] function wrap.precision(args) local input_string = (args[1] or args.x or '0'); local trap_fraction = args.check_fraction; local input_number; if not yesno then yesno = require('Module:Yesno') end if yesno(trap_fraction, true) then -- Returns true for all input except nil, false, "no", "n", "0" and a few others. See [[Module:Yesno]]. local pos = string.find(input_string, '/', 1, true); if pos ~= nil then if string.find(input_string, '/', pos + 1, true) == nil then local denominator = string.sub(input_string, pos+1, -1); local denom_value = tonumber(denominator); if denom_value ~= nil then return math.log10(denom_value); end end end end input_number, input_string = p._cleanNumber(input_string); if input_string == nil then return err('precision input appears non-numeric') else return p._precision(input_string) end end function p._precision(x) if type(x) == 'number' then x = tostring(x) end x = string.upper(x) local decimal = x:find('%.') local exponent_pos = x:find('E') local result = 0; if exponent_pos ~= nil then local exponent = string.sub(x, exponent_pos + 1) x = string.sub(x, 1, exponent_pos - 1) result = result - tonumber(exponent) end if decimal ~= nil then result = result + string.len(x) - decimal return result end local pos = string.len(x); while x:byte(pos) == string.byte('0') do pos = pos - 1 result = result - 1 if pos <= 0 then return 0 end end return result end --[[ max Finds the maximum argument Usage: {{#invoke:Math| max | value1 | value2 | ... }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.max(args) return p._max(unpackNumberArgs(args)) end function p._max(...) local max_value = binary_fold((function(a, b) return a > b end), ...) if max_value then return max_value end end --[[ median Find the median of set of numbers Usage: {{#invoke:Math | median | number1 | number2 | ...}} OR {{#invoke:Math | median }} ]] function wrap.median(args) return p._median(unpackNumberArgs(args)) end function p._median(...) local vals = makeArgArray(...) local count = #vals table.sort(vals) if count == 0 then return 0 end if p._mod(count, 2) == 0 then return (vals[count/2] + vals[count/2+1])/2 else return vals[math.ceil(count/2)] end end --[[ min Finds the minimum argument Usage: {{#invoke:Math| min | value1 | value2 | ... }} OR {{#invoke:Math| min }} When used with no arguments, it takes its input from the parent frame. Note, any values that do not evaluate to numbers are ignored. ]] function wrap.min(args) return p._min(unpackNumberArgs(args)) end function p._min(...) local min_value = binary_fold((function(a, b) return a < b end), ...) if min_value then return min_value end end --[[ sum Finds the sum Usage: {{#invoke:Math| sum | value1 | value2 | ... }} OR {{#invoke:Math| sum }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.sum(args) return p._sum(unpackNumberArgs(args)) end function p._sum(...) local sums, count = fold((function(a, b) return a + b end), ...) if not sums then return 0 else return sums end end --[[ average Finds the average Usage: {{#invoke:Math| average | value1 | value2 | ... }} OR {{#invoke:Math| average }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.average(args) return p._average(unpackNumberArgs(args)) end function p._average(...) local sum, count = fold((function(a, b) return a + b end), ...) if not sum then return 0 else return sum / count end end --[[ round Rounds a number to specified precision Usage: {{#invoke:Math | round | value | precision }} --]] function wrap.round(args) local value = p._cleanNumber(args[1] or args.value or 0) local precision = p._cleanNumber(args[2] or args.precision or 0) if value == nil or precision == nil then return err('round input appears non-numeric') else return p._round(value, precision) end end function p._round(value, precision) local rescale = math.pow(10, precision or 0); return math.floor(value * rescale + 0.5) / rescale; end --[[ log10 returns the log (base 10) of a number Usage: {{#invoke:Math | log10 | x }} ]] function wrap.log10(args) return math.log10(args[1]) end --[[ mod Implements the modulo operator Usage: {{#invoke:Math | mod | x | y }} --]] function wrap.mod(args) local x = p._cleanNumber(args[1]) local y = p._cleanNumber(args[2]) if not x then return err('first argument to mod appears non-numeric') elseif not y then return err('second argument to mod appears non-numeric') else return p._mod(x, y) end end function p._mod(x, y) local ret = x % y if not (0 <= ret and ret < y) then ret = 0 end return ret end --[[ gcd Calculates the greatest common divisor of multiple numbers Usage: {{#invoke:Math | gcd | value 1 | value 2 | value 3 | ... }} --]] function wrap.gcd(args) return p._gcd(unpackNumberArgs(args)) end function p._gcd(...) local function findGcd(a, b) local r = b local oldr = a while r ~= 0 do local quotient = math.floor(oldr / r) oldr, r = r, oldr - quotient * r end if oldr < 0 then oldr = oldr * -1 end return oldr end local result, count = fold(findGcd, ...) return result end --[[ precision_format Rounds a number to the specified precision and formats according to rules originally used for {{template:Rnd}}. Output is a string. Usage: {{#invoke: Math | precision_format | number | precision }} ]] function wrap.precision_format(args) local value_string = args[1] or 0 local precision = args[2] or 0 return p._precision_format(value_string, precision) end function p._precision_format(value_string, precision) -- For access to Mediawiki built-in formatter. local lang = mw.getContentLanguage(); local value value, value_string = p._cleanNumber(value_string) precision = p._cleanNumber(precision) -- Check for non-numeric input if value == nil or precision == nil then return err('invalid input when rounding') end local current_precision = p._precision(value) local order = p._order(value) -- Due to round-off effects it is neccesary to limit the returned precision under -- some circumstances because the terminal digits will be inaccurately reported. if order + precision >= 14 then if order + p._precision(value_string) >= 14 then precision = 13 - order; end end -- If rounding off, truncate extra digits if precision < current_precision then value = p._round(value, precision) current_precision = p._precision(value) end local formatted_num = lang:formatNum(math.abs(value)) local sign -- Use proper unary minus sign rather than ASCII default if value < 0 then sign = '−' else sign = '' end -- Handle cases requiring scientific notation if string.find(formatted_num, 'E', 1, true) ~= nil or math.abs(order) >= 9 then value = value * math.pow(10, -order) current_precision = current_precision + order precision = precision + order formatted_num = lang:formatNum(math.abs(value)) else order = 0; end formatted_num = sign .. formatted_num -- Pad with zeros, if needed if current_precision < precision then local padding if current_precision <= 0 then if precision > 0 then local zero_sep = lang:formatNum(1.1) formatted_num = formatted_num .. zero_sep:sub(2,2) padding = precision if padding > 20 then padding = 20 end formatted_num = formatted_num .. string.rep('0', padding) end else padding = precision - current_precision if padding > 20 then padding = 20 end formatted_num = formatted_num .. string.rep('0', padding) end end -- Add exponential notation, if necessary. if order ~= 0 then -- Use proper unary minus sign rather than ASCII default if order < 0 then order = '−' .. lang:formatNum(math.abs(order)) else order = lang:formatNum(order) end formatted_num = formatted_num .. '<span style="margin:0 .15em 0 .25em">×</span>10<sup>' .. order .. '</sup>' end return formatted_num end --[[ divide Implements the division operator Usage: {{#invoke:Math | divide | x | y | round= | precision= }} --]] function wrap.divide(args) local x = args[1] local y = args[2] local round = args.round local precision = args.precision if not yesno then yesno = require('Module:Yesno') end return p._divide(x, y, yesno(round), precision) end function p._divide(x, y, round, precision) if y == nil or y == "" then return err("Empty divisor") elseif not tonumber(y) then if type(y) == 'string' and string.sub(y, 1, 1) == '<' then return y else return err("Not a number: " .. y) end elseif x == nil or x == "" then return err("Empty dividend") elseif not tonumber(x) then if type(x) == 'string' and string.sub(x, 1, 1) == '<' then return x else return err("Not a number: " .. x) end else local z = x / y if round then return p._round(z, 0) elseif precision then return p._round(z, precision) else return z end end end --[[ Helper function that interprets the input numerically. If the input does not appear to be a number, attempts evaluating it as a parser functions expression. ]] function p._cleanNumber(number_string) if type(number_string) == 'number' then -- We were passed a number, so we don't need to do any processing. return number_string, tostring(number_string) elseif type(number_string) ~= 'string' or not number_string:find('%S') then -- We were passed a non-string or a blank string, so exit. return nil, nil; end -- Attempt basic conversion local number = tonumber(number_string) -- If failed, attempt to evaluate input as an expression if number == nil then local success, result = pcall(mw.ext.ParserFunctions.expr, number_string) if success then number = tonumber(result) number_string = tostring(number) else number = nil number_string = nil end else number_string = number_string:match("^%s*(.-)%s*$") -- String is valid but may contain padding, clean it. number_string = number_string:match("^%+(.*)$") or number_string -- Trim any leading + signs. if number_string:find('^%-?0[xX]') then -- Number is using 0xnnn notation to indicate base 16; use the number that Lua detected instead. number_string = tostring(number) end end return number, number_string end --[[ Wrapper function that does basic argument processing. This ensures that all functions from #invoke can use either the current frame or the parent frame, and it also trims whitespace for all arguments and removes blank arguments. ]] local mt = { __index = function(t, k) return function(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return wrap[k](getArgs(frame)) -- Argument processing is left to Module:Arguments. Whitespace is trimmed and blank arguments are removed. end end } return setmetatable(p, mt) 2bbe734d898299f65412963a3c1782e9fcc4d9ca Template:Old TfD 10 849 5628 2021-06-27T17:51:00Z wikipedia>Gonnym 0 wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||$B={{Tmbox | small = {{{small|}}} | image = [[File:Clipboard.svg|{{#ifeq:{{{small|}}}|yes|30x20|50x40}}px]] | style = text-align:center | text = This {{#switch:{{{demospace|{{NAMESPACE}}}}} | {{ns:Category_talk}} = category | {{ns:Module_talk}} = module | template }} {{#if:{{{1|}}}|([[{{{1}}}]])}} was considered for {{#if:{{{merge|}}}|[[Wikipedia:Merging|merging]]|[[Wikipedia:Deletion policy|deletion]]}}{{#if:{{{merge|}}}|{{#ifeq:{{{merge}}}|self||&#32;with [[{{{merge}}}]]}} {{#if:{{{more_merge|}}}|&#32;{{{more_merge}}}}}}} on {{#formatdate:{{{date}}}}}. The result of the <!-- IF OLD LOG -->{{#ifexist:Wikipedia:Templates for deletion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date}}}|ymd}}}} |<!-- Listed in Templates for deletion -->'''[[Wikipedia:Templates for deletion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date|}}}|ymd}}}}#{{{talk|{{{disc|{{{discuss|{{{1|Template:{{PAGENAME}}}}}}}}}}}}}}|discussion]]''' |<!-- Listed in Templates for discussion -->'''[[Wikipedia:Templates for discussion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date|}}}|ymd}}}}#{{{talk|{{{disc|{{{discuss|{{{1|Template:{{PAGENAME}}}}}}}}}}}}}}|discussion]]'''}}<!-- END IF --> was "'''{{{result|keep}}}'''". }}}}<noinclude>{{Documentation}}</noinclude> f16f9178aee8fb8f2ed0da7868a40baa37d25647 Module:Hatnote/styles.css 828 337 664 2021-07-12T19:22:27Z wikipedia>Izno 0 per my talk page text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Module:Redirect 828 711 1411 2021-09-10T07:46:37Z wikipedia>Johnuniq 0 restore p.getTargetFromText which is used by [[Module:RfD]] which is causing "Lua error in Module:RfD at line 87: attempt to call upvalue 'getTargetFromText' (a nil value)" Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Module:Sidebar/styles.css 828 343 676 2021-09-20T01:15:45Z wikipedia>Goszei 0 self-rv, it's a little tight text text/plain /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb Module:Unsubst 828 694 1377 2021-10-08T18:22:16Z wikipedia>Trappist the monk 0 sync from sandbox; see [[Module_talk:Unsubst#template_invocation_name_override|talk]]; Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p 7f01ffc8aa2ac4a4772f14c12e0b77e384ecabb6 Module:Navbox/styles.css 828 288 566 2021-12-21T22:10:10Z wikipedia>Izno 0 remove qualifications on th - this will remove styling from "hand-crafted" navboxes, but there's no other elegant way to deal with it. see talk page text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Module:Hatnote/doc 828 693 1375 2021-12-26T18:33:20Z wikipedia>Nihiltres 0 Removed documentation for extracted/removed functionality wikitext text/x-wiki {{used in system|in [[MediaWiki:Wantedpages-summary]]}} {{module rating|protected}} {{Lua|Module:Yesno|Module:Arguments}} {{Uses TemplateStyles|Module:Hatnote/styles.css}} This is a meta-module that provides various functions for making [[Wikipedia:Hatnote|hatnotes]]. It implements the {{tl|hatnote}} template, for use in hatnotes at the top of pages, and the {{tl|format link}} template, which is used to format a wikilink for use in hatnotes. It also contains a number of helper functions for use in other Lua hatnote modules. == Use from wikitext == The functions in this module cannot be used directly from #invoke, and must be used through templates instead. Please see [[Template:Hatnote]] and [[Template:Format link]] for documentation. == Use from other Lua modules == To load this module from another Lua module, use the following code. <syntaxhighlight lang="lua"> local mHatnote = require('Module:Hatnote') </syntaxhighlight> You can then use the functions as documented below. === Hatnote === <syntaxhighlight lang="lua"> mHatnote._hatnote(s, options) </syntaxhighlight> Formats the string <var>s</var> as a hatnote. This encloses <var>s</var> in the tags {{tag|div|params=class="hatnote"}}. Options are provided in the <var>options</var> table. Options include: * <var>options.extraclasses</var> - a string of extra classes to provide * <var>options.selfref</var> - if this is not nil or false, adds the class "selfref", used to denote self-references to Wikipedia (see [[Template:Selfref]])) The CSS of the hatnote class is defined in [[Module:Hatnote/styles.css]]. ; Example 1 <syntaxhighlight lang="lua"> mHatnote._hatnote('This is a hatnote.') </syntaxhighlight> Produces: {{tag|div|content=This is a hatnote.|params=class="hatnote"}} Displays as: {{hatnote|This is a hatnote.}} ; Example 2 <syntaxhighlight lang="lua"> mHatnote._hatnote('This is a hatnote.', {extraclasses = 'boilerplate seealso', selfref = true}) </syntaxhighlight> Produces: {{tag|div|content=This is a hatnote.|params=class="hatnote boilerplate seealso selfref"}} Displayed as: {{hatnote|This is a hatnote.|extraclasses=boilerplate seealso|selfref=true}} === Find namespace id === <syntaxhighlight lang="lua"> mHatnote.findNamespaceId(link, removeColon) </syntaxhighlight> Finds the [[WP:NS|namespace id]] of the string <var>link</var>, which should be a valid page name, with or without the section name. This function will not work if the page name is enclosed with square brackets. When trying to parse the namespace name, colons are removed from the start of the link by default. This is helpful if users have specified colons when they are not strictly necessary. If you do not need to check for initial colons, set <var>removeColon</var> to false. ;Examples: : {{code|mHatnote.findNamespaceId('Lion')|lua}} &rarr; 0 : {{code|mHatnote.findNamespaceId('Category:Lions')|lua}} &rarr; 14 : {{code|mHatnote.findNamespaceId(':Category:Lions')|lua}} &rarr; 14 : {{code|mHatnote.findNamespaceId(':Category:Lions', false)|lua}} &rarr; 0 (the namespace is detected as ":Category", rather than "Category") === Make wikitext error === <syntaxhighlight lang="lua"> mHatnote.makeWikitextError(msg, helpLink, addTrackingCategory) </syntaxhighlight> Formats the string <var>msg</var> as a red wikitext error message, with optional link to a help page <var>helpLink</var>. Normally this function also adds {{clc|Hatnote templates with errors}}. To suppress categorization, pass <code>false</code> as third parameter of the function (<code>addTrackingCategory</code>). Examples: :{{code|mHatnote.makeWikitextError('an error has occurred')|lua}} &rarr; <strong class="error">Error: an error has occurred.</strong> :{{code|mHatnote.makeWikitextError('an error has occurred', 'Template:Example#Errors')|lua}} &rarr; <strong class="error">Error: an error has occurred ([[Template:Example#Errors|help]]).</strong> == Examples == For an example of how this module is used in other Lua modules, see [[Module:Main]] <includeonly>{{Sandbox other|| <!-- Categories go here and interwikis go in Wikidata. --> [[Category:Hatnote modules| ]] [[Category:Modules that add a tracking category]] }}</includeonly> 841ceaf6abb05ff4068d75a4926188a0a0ffca08 Module:Hatnote list 828 338 666 2021-12-26T20:05:24Z wikipedia>Nihiltres 0 Undid revision 1062166786 by [[Special:Contributions/Matthiaspaul|Matthiaspaul]] ([[User talk:Matthiaspaul|talk]]); should be fixed now, and if not, please ping me with examples as I couldn't reproduce the original error Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation local function punctuationCollapse (text) local replacements = { ["%.%.$"] = ".", ["%?%.$"] = "?", ["%!%.$"] = "!", ["%.%]%]%.$"] = ".]]", ["%?%]%]%.$"] = "?]]", ["%!%]%]%.$"] = "!]]" } for k, v in pairs(replacements) do text = string.gsub(text, k, v) end return text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p d0828422b1aa0d0d0092d699d059c9e882260398 Module:Citation/doc 828 850 5630 2021-12-29T15:22:31Z wikipedia>JPxG 0 Reverted edits by [[Special:Contribs/林金牌|林金牌]] ([[User talk:林金牌|talk]]) to last version by Trappist the monk wikitext text/x-wiki {{Mbox | type = style | image = [[File:Imbox content.png|40px|alt=|link=]] | text = '''{{FULLPAGENAME}}''' is retained for historical and structural reasons; consider using [[Module:Citation/CS1]]. }} {{oldtfdfull|date= 2018 May 13 |result=Blank |disc=Module:Citation}} Development of [[WP:LUA|Lua]] support for both {{cs1}} and {{cs2}} began at '''Module:Citation'''. That development was abandoned in 2013 as development of [[Module:Citation/CS1]] began. Though this module remained unused, it is and has been the root page of the [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Citation&namespace=828 several module subpages that implement cs1 and cs2]. The content of this module was replaced with an error message return as the result of a [[Wikipedia:Templates for discussion/Log/2018_May_13#Module:Citation|2018 TfD]]. 25a0fddb78cbfd1d8810e11eadb540c1dba6bf9a Module:Navbar/styles.css 828 285 560 2022-01-03T23:12:15Z wikipedia>Izno 0 navbar styles that were moved to parent templates text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Template:Smaller 10 594 1176 2022-01-18T10:48:21Z wikipedia>Primefac 0 merge complete wikitext text/x-wiki #REDIRECT [[Template:Small]] {{r from merge}} 2209ecdc4a987eb3d73f648941a3daaed04cd5d5 Module:Infobox/styles.css 828 275 540 2022-01-18T15:18:00Z wikipedia>Jdlrobson 0 Fix [[phab:T281642]], a pet peeve of mine. This copies across styles from [[MediaWiki:Minerva.css]] text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:Documentation/config 828 297 584 2022-01-25T23:46:11Z wikipedia>Ianblair23 0 link Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 71b68ed73088f1a59d61acf06bbee9fde6677f03 Module:TableTools 828 310 610 2022-01-31T13:08:18Z wikipedia>MSGJ 0 updates/fixes requested by [[User:Uzume]] Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Module:Check for unknown parameters 828 271 532 2022-02-21T05:24:13Z wikipedia>BusterD 0 Changed protection settings for "[[Module:Check for unknown parameters]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:Effective protection expiry 828 332 654 2022-02-23T10:59:29Z wikipedia>Xaosflux 0 Changed protection settings for "[[Module:Effective protection expiry]]": used in the mediawiki interface / match [[Module:Effective protection level]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Template:Flatlist/microformat 10 672 1332 2022-03-03T02:09:02Z wikipedia>Izno 0 totally compatible and no obvious reason for existence, so..... wikitext text/x-wiki #redirect [[Template:Flatlist]] df7569d0ebf03fea2076c5bc06086bead943262b Module:Template link general 828 328 646 2022-03-08T08:30:51Z wikipedia>Primefac 0 update from sandbox - fixes to _show_result and adding _expand Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Module:InfoboxImage 828 274 538 2022-03-13T19:18:18Z wikipedia>WOSlinker 0 add class param from sandbox as per edit request Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if class ~= nil and class ~= "" then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if title ~= "" and title ~= nil then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if title ~= "" and title ~= nil then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; 0ee5fe75ba239fc5c9cedc81ca11bdc0be068542 Template:Transl 10 376 742 2022-04-28T19:13:10Z wikipedia>Paine Ellsworth 0 add [[WP:RCAT|rcat template]] wikitext text/x-wiki #REDIRECT [[Template:Transliteration]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} cff0d040d26c532c6c3a93a603e86991019a8fba Template:Oldtfdfull 10 848 5626 2022-05-01T02:50:12Z wikipedia>Steel1943 0 Fix wikitext text/x-wiki #REDIRECT [[Template:Old TfD]] {{XFDcloser standard installation}} 79f7fbecc5e58d2a3dd7644e99aed3dc3df4775b Template:T 10 723 1435 2022-06-05T04:09:28Z wikipedia>Dinoguy1000 0 not that it matters much, but fix comment closing wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Rcat shell| {{R from template shortcut}} }} <!-- Used as Template:tl throughout English Wikipedia; demo template referenced only on meta --> bb10dbc83695404528dbc095ea267429142c7f05 Module:Uses Wikidata 828 388 766 2022-06-08T17:12:17Z wikipedia>Legoktm 0 fix capitalization of Wikidata and Wikipedia in query output Scribunto text/plain local p = {} function p.usesProperty(frame) local args = frame.getParent(frame).args or nil if mw.text.trim(args[1] or '') == '' then args = frame.args end local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li>[[File:Disc Plain blue dark.svg|middle|4px|link=|alt=]] <b><i>[[d:Property talk:" .. p_num .. "|" .. label .. " (" .. string.upper(p_num) .. ")]]</i></b> (see <span class='plainlinks'>[https://query.wikidata.org/embed.html#SELECT%20%3FWikidata_item_%20%3FWikidata_item_Label%20%3Fvalue%20%3FvalueLabel%20%3FEnglish_Wikipedia_article%20%23Show%20data%20in%20this%20order%0A%7B%0A%09%3FWikidata_item_%20wdt%3A" .. p_num .. "%20%3Fvalue%20.%20%23Collecting%20all%20items%20which%20have%20" .. p_num .. "%20data%2C%20from%20whole%20Wikidata%20item%20pages%0A%09OPTIONAL%20%7B%3FEnglish_Wikipedia_article%20schema%3Aabout%20%3FWikidata_item_%3B%20schema%3AisPartOf%20%3Chttps%3A%2F%2Fen.wikipedia.org%2F%3E%20.%7D%20%23If%20collected%20item%20has%20link%20to%20English%20Wikipedia%2C%20show%20that%0A%09SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%20%7D%20%23Show%20label%20in%20this%20language.%20%22en%22%20is%20English.%20%20%20%0A%7D%0ALIMIT%201000 uses]</span>)</li>" ii = ii + 1 else break end end result = result.."</ul>" return result end function p.tuProperty(frame) local parent = frame.getParent(frame) local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(parent.args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li><span style='font-size:90%;line-height:1;'>●</span>&nbsp;&nbsp;<b>[[d:Property:" .. p_num .. "|" .. label .. "]]</b> <span style='font-size:90%;'>([[d:Property talk:" .. string.upper(p_num) .. "|" .. p_num .. "]])</span></li>" ii = ii + 1 else break end end result = result.."</ul>" return result end return p 8b704fdbc00fb94538c56f18c5c01f1e72963ea9 Module:Uses TemplateStyles/config 828 671 1330 2022-06-16T15:10:06Z wikipedia>Pppery 0 Matching reality rather than 2018 me's wishful thinking Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the -- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css -- Set to nil to disable sandbox links. cfg['sandbox_title'] = 'sandbox' -- Error category: this category is added if the module call contains errors -- (e.g. no stylesheet listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Uses TemplateStyles templates with errors' -- Default category: this category is added if no custom category is specified -- in module/template call. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Templates using TemplateStyles' -- Protection conflict category: this category is added if the protection level -- of any stylesheet is lower than the protection level of the template. A category name -- without namespace, or nil to disable categorization (not recommended). cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level' -- Hierarchy of protection levels, used to determine whether one protection level is lower -- than another and thus should populate protection_conflict_category. No protection is treated as zero cfg['protection_hierarchy'] = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } -- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil -- to disable padlock check. cfg['padlock_pattern'] = '{{pp-' -- Missing padlock category: this category is added if a protected stylesheet -- doesn’t contain any padlock template (specified by the above Lua pattern). -- A category name without namespace (no nil allowed) if the pattern is not nil, -- unused (and thus may be nil) otherwise. cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks' return cfg -- Don’t touch this line. 58e7a37c44f6ea3f6b8af54a559d696cc7256493 Module:Uses TemplateStyles 828 670 1328 2022-06-16T15:13:38Z wikipedia>Pppery 0 Matching reality rather than 2018 me's wishful thinking Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local link = string.format('[[:%s]]', ts) local sandboxLink = nil local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText)) if tsSandboxTitle and tsSandboxTitle.exists then sandboxLink = format('sandboxlink', link, ':' .. tsSandboxTitle.prefixedText) end end tStylesLinks[i] = sandboxLink or link end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828,829) and 'header-module' or 'header-template') .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for i, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args, cfg) local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 71ca57c37849f38e3c5ee30061bdae730963e48e Module:Message box/fmbox.css 828 706 1401 2022-07-09T19:12:22Z wikipedia>Izno 0 fmbox never outputs this class text text/plain /* {{pp|small=y}} */ .fmbox { clear: both; margin: 0.2em 0; width: 100%; border: 1px solid #a2a9b1; background-color: #f8f9fa; /* Default "system" gray */ box-sizing: border-box; } .fmbox-warning { border: 1px solid #bb7070; /* Dark pink */ background-color: #ffdbdb; /* Pink */ } .fmbox-editnotice { background-color: transparent; } .fmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .fmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .fmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } .fmbox .mbox-invalid-type { text-align: center; } fca0f5e4b400e4a2ab158b219c52822451211d66 Module:Message box/imbox.css 828 708 1405 2022-07-09T23:27:41Z wikipedia>Izno 0 move margin 10% to media query text text/plain /* {{pp|small=y}} */ .imbox { margin: 4px 0; border-collapse: collapse; border: 3px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* For imboxes inside imbox-text cells. */ .imbox .mbox-text .imbox { margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */ /* TODO: Still needed? */ display: block; /* Fix for webkit to force 100% width. */ } .imbox-speedy { border: 3px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .imbox-delete { border: 3px solid #b32424; /* Red */ } .imbox-content { border: 3px solid #f28500; /* Orange */ } .imbox-style { border: 3px solid #fc3; /* Yellow */ } .imbox-move { border: 3px solid #9932cc; /* Purple */ } .imbox-protection { border: 3px solid #a2a9b1; /* Gray-gold */ } .imbox-license { border: 3px solid #88a; /* Dark gray */ background-color: #f7f8ff; /* Light gray */ } .imbox-featured { border: 3px solid #cba135; /* Brown-gold */ } .imbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .imbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .imbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .imbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .imbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .imbox { margin: 4px 10%; } } 1e82a3c342695a9b4fbdcc4e5e0930d4845a23d4 Template:Generic template demo 10 304 598 2022-07-10T21:03:19Z wikipedia>Aidan9382 0 +{{R semiprotected}} wikitext text/x-wiki #REDIRECT [[Template:Parameter names example]] {{R semiprotected}} [[Category:Wikipedia utility templates]] [[Category:Template namespace templates]] [[Category:Documentation assistance templates]] 22f645541f749cfd0eeffdee734b51b284103400 Module:Message box/configuration 828 317 624 2022-07-11T18:19:26Z wikipedia>Izno 0 add templatestyles, remove a variable or two as a result Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } b6f0151037e6867b577c8cca32ff297e48697a10 Module:Message box/tmbox.css 828 705 1399 2022-07-11T18:36:42Z wikipedia>Izno 0 remove min-widths on tmbox that seem exclusive to tmbox, move tmbox-small to min-width 720px text text/plain /* {{pp|small=y}} */ .tmbox { margin: 4px 0; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; box-sizing: border-box; } /* For the "small=yes" option. */ .tmbox.mbox-small { font-size: 88%; line-height: 1.25em; } .tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .tmbox-delete { border: 2px solid #b32424; /* Red */ } .tmbox-content { border: 2px solid #f28500; /* Orange */ } .tmbox-style { border: 2px solid #fc3; /* Yellow */ } .tmbox-move { border: 2px solid #9932cc; /* Purple */ } .tmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .tmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .tmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .tmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .tmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .tmbox { margin: 4px 10%; } .tmbox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } eaa4546995ebb3a8d20394cad8af74ea477bdb44 Module:Message box/ombox.css 828 321 632 2022-07-11T18:40:17Z wikipedia>Izno 0 and move mbox-small to 720px here as well text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Module:Message box/ambox.css 828 707 1403 2022-07-12T15:25:07Z wikipedia>Izno 0 hack around mf being opinionated text text/plain /* {{pp|small=y}} */ .ambox { border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. Take into account base templatestyles, * user styles, and Template:Dated maintenance category. * remove link selector when T200206 is fixed */ .ambox + link + .ambox, .ambox + link + style + .ambox, .ambox + link + link + .ambox, /* TODO: raise these as "is this really that necessary???". the change was Dec 2021 */ .ambox + .mw-empty-elt + link + .ambox, .ambox + .mw-empty-elt + link + style + .ambox, .ambox + .mw-empty-elt + link + link + .ambox { margin-top: -1px; } /* For the "small=left" option. */ /* must override .ambox + .ambox styles above */ html body.mediawiki .ambox.mbox-small-left { /* @noflip */ margin: 4px 1em 4px 0; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } .ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } .ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } .ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } .ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } .ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } .ambox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.5em; width: 100%; } .ambox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.5em; text-align: center; } .ambox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.5em 2px 0; text-align: center; } /* An empty narrow cell */ .ambox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ambox .mbox-image-div { width: 52px; } /* Hack around MobileFrontend being opinionated */ html.client-js body.skin-minerva .mbox-text-span { margin-left: 23px !important; } @media (min-width: 720px) { .ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ } } 29898fdc5160b39a8f580c76efe77afa1f6f58a4 Module:Message box/cmbox.css 828 709 1407 2022-07-15T21:26:29Z wikipedia>Izno 0 remove the special speedy margins text text/plain /* {{pp|small=y}} */ .cmbox { margin: 3px 0; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */ } .cmbox-move { background-color: #e4d8ff; /* Purple */ } .cmbox-protection { background-color: #efefe1; /* Gray-gold */ } .cmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .cmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .cmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .cmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .cmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .cmbox { margin: 3px 10%; } } 95109477b86803acfea977ae0bce2319e72f170d Module:Text 828 842 5614 2022-07-21T16:43:48Z wikipedia>Hike395 0 update date Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2022-07-21", suite = "Text" } --[=[ Text utilities ]=] -- local globals local PatternCJK = false local PatternCombined = false local PatternLatin = false local PatternTerminated = false local QuoteLang = false local QuoteType = false local RangesLatin = false local SeekQuote = false local function initLatinData() if not RangesLatin then RangesLatin = { { 7, 687 }, { 7531, 7578 }, { 7680, 7935 }, { 8194, 8250 } } end if not PatternLatin then local range PatternLatin = "^[" for i = 1, #RangesLatin do range = RangesLatin[ i ] PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], 45, range[ 2 ] ) end -- for i PatternLatin = PatternLatin .. "]*$" end end local function initQuoteData() -- Create quote definitions if not QuoteLang then QuoteLang = { af = "bd", ar = "la", be = "labd", bg = "bd", ca = "la", cs = "bd", da = "bd", de = "bd", dsb = "bd", et = "bd", el = "lald", en = "ld", es = "la", eu = "la", -- fa = "la", fi = "rd", fr = "laSPC", ga = "ld", he = "ldla", hr = "bd", hsb = "bd", hu = "bd", hy = "labd", id = "rd", is = "bd", it = "ld", ja = "x300C", ka = "bd", ko = "ld", lt = "bd", lv = "bd", nl = "ld", nn = "la", no = "la", pl = "bdla", pt = "lald", ro = "bdla", ru = "labd", sk = "bd", sl = "bd", sq = "la", sr = "bx", sv = "rd", th = "ld", tr = "ld", uk = "la", zh = "ld", ["de-ch"] = "la", ["en-gb"] = "lsld", ["en-us"] = "ld", ["fr-ch"] = "la", ["it-ch"] = "la", ["pt-br"] = "ldla", ["zh-tw"] = "x300C", ["zh-cn"] = "ld" } end if not QuoteType then QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } }, bdla = { { 8222, 8220 }, { 171, 187 } }, bx = { { 8222, 8221 }, { 8218, 8217 } }, la = { { 171, 187 }, { 8249, 8250 } }, laSPC = { { 171, 187 }, { 8249, 8250 }, true }, labd = { { 171, 187 }, { 8222, 8220 } }, lald = { { 171, 187 }, { 8220, 8221 } }, ld = { { 8220, 8221 }, { 8216, 8217 } }, ldla = { { 8220, 8221 }, { 171, 187 } }, lsld = { { 8216, 8217 }, { 8220, 8221 } }, rd = { { 8221, 8221 }, { 8217, 8217 } }, x300C = { { 0x300C, 0x300D }, { 0x300E, 0x300F } } } end end -- initQuoteData() local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite initQuoteData() local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" if not patternCJK then patternCJK = mw.ustring.char( 91, 4352, 45, 4607, 11904, 45, 42191, 43072, 45, 43135, 44032, 45, 55215, 63744, 45, 64255, 65072, 45, 65103, 65381, 45, 65500, 131072, 45, 196607, 93 ) end return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string initLatinData() return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end if not SeekQuote then SeekQuote = mw.ustring.char( 34, -- " 39, -- ' 171, -- laquo 187, -- raquo 8216, -- lsquo 8217, -- rsquo 8218, -- sbquo 8220, -- ldquo 8221, -- rdquo 8222, -- bdquo 8249, -- lsaquo 8250, -- rsaquo 0x300C, -- CJK 0x300D, -- CJK 0x300E, -- CJK 0x300F ) -- CJK end return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed if not PatternCombined then PatternCombined = mw.ustring.char( 91, 0x0300, 45, 0x036F, 0x1AB0, 45, 0x1AFF, 0x1DC0, 45, 0x1DFF, 0xFE20, 45, 0xFE2F, 93 ) end decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r if not PatternTerminated then PatternTerminated = mw.ustring.char( 91, 12290, 65281, 65294, 65311 ) .. "!%.%?…][\"'%]‹›«»‘’“”]*$" end if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r initLatinData() if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range for i = 1, #RangesLatin do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then initQuoteData() r = { } r.QuoteLang = QuoteLang r.QuoteType = QuoteType end return r end -- Text.test() -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 07f1fc4d39342fd92bdae1c5463bbfede7eeda1a Module:ISO 3166/data/National 828 617 1222 2022-07-28T05:06:29Z wikipedia>Paine Ellsworth 0 per edit request on talk page - include "U.S." initialism Scribunto text/plain return { ["AD"] = {alpha3="AND",numeric="020",name="Andorra"}, ["AE"] = {alpha3="ARE",numeric="784",name="United Arab Emirates",altnames={"UAE"}}, ["AF"] = {alpha3="AFG",numeric="004",name="Afghanistan"}, ["AG"] = {alpha3="ATG",numeric="028",name="Antigua and Barbuda"}, ["AI"] = {alpha3="AIA",numeric="660",name="Anguilla"}, ["AL"] = {alpha3="ALB",numeric="008",name="Albania"}, ["AM"] = {alpha3="ARM",numeric="051",name="Armenia"}, ["AO"] = {alpha3="AGO",numeric="024",name="Angola"}, ["AQ"] = {alpha3="ATA",numeric="010",name="Antarctica"}, ["AR"] = {alpha3="ARG",numeric="032",name="Argentina"}, ["AS"] = {alpha3="ASM",numeric="016",name="American Samoa"}, ["AT"] = {alpha3="AUT",numeric="040",name="Austria"}, ["AU"] = {alpha3="AUS",numeric="036",name="Australia"}, ["AW"] = {alpha3="ABW",numeric="533",name="Aruba"}, ["AX"] = {alpha3="ALA",numeric="248",name="Åland Islands",altnames={"Aland Islands","Åland","Aland"}}, ["AZ"] = {alpha3="AZE",numeric="031",name="Azerbaijan"}, ["BA"] = {alpha3="BIH",numeric="070",name="Bosnia and Herzegovina",altnames={"Bosnia"}}, ["BB"] = {alpha3="BRB",numeric="052",name="Barbados"}, ["BD"] = {alpha3="BGD",numeric="050",name="Bangladesh"}, ["BE"] = {alpha3="BEL",numeric="056",name="Belgium"}, ["BF"] = {alpha3="BFA",numeric="854",name="Burkina Faso"}, ["BG"] = {alpha3="BGR",numeric="100",name="Bulgaria"}, ["BH"] = {alpha3="BHR",numeric="048",name="Bahrain"}, ["BI"] = {alpha3="BDI",numeric="108",name="Burundi"}, ["BJ"] = {alpha3="BEN",numeric="204",name="Benin"}, ["BL"] = {alpha3="BLM",numeric="652",name="Saint Barthélemy",altnames={"St Barthelemy"}}, ["BM"] = {alpha3="BMU",numeric="060",name="Bermuda"}, ["BN"] = {alpha3="BRN",numeric="096",name="Brunei",isoname="Brunei Darussalam"}, ["BO"] = {alpha3="BOL",numeric="068",name="Bolivia",isoname="Bolivia (Plurinational State of)"}, ["BQ"] = {alpha3="BES",numeric="535",name="Caribbean Netherlands",isoname="Bonaire, Sint Eustatius and Saba"}, ["BR"] = {alpha3="BRA",numeric="076",name="Brazil"}, ["BS"] = {alpha3="BHS",numeric="044",name="Bahamas"}, ["BT"] = {alpha3="BTN",numeric="064",name="Bhutan"}, ["BV"] = {alpha3="BVT",numeric="074",name="Bouvet Island"}, ["BW"] = {alpha3="BWA",numeric="072",name="Botswana"}, ["BY"] = {alpha3="BLR",numeric="112",name="Belarus"}, ["BZ"] = {alpha3="BLZ",numeric="084",name="Belize"}, ["CA"] = {alpha3="CAN",numeric="124",name="Canada"}, ["CC"] = {alpha3="CCK",numeric="166",name="Cocos (Keeling) Islands",altnames={"Cocos Islands","Keeling Islands"}}, ["CD"] = {alpha3="COD",numeric="180",name="Democratic Republic of the Congo",isoname="Congo, Democratic Republic of the",altnames={"Congo-Kinshasa","DRC","DR Congo"}}, ["CF"] = {alpha3="CAF",numeric="140",name="Central African Republic",altnames={"CAR"}}, ["CG"] = {alpha3="COG",numeric="178",name="Republic of the Congo",isoname="Congo",altnames={"Congo-Brazzaville"}}, ["CH"] = {alpha3="CHE",numeric="756",name="Switzerland"}, ["CI"] = {alpha3="CIV",numeric="384",name="Côte d'Ivoire",altnames={"Ivory Coast"}}, ["CK"] = {alpha3="COK",numeric="184",name="Cook Islands"}, ["CL"] = {alpha3="CHL",numeric="152",name="Chile"}, ["CM"] = {alpha3="CMR",numeric="120",name="Cameroon"}, ["CN"] = {alpha3="CHN",numeric="156",name="China",altnames={"People's Republic of China","PRC"}}, ["CO"] = {alpha3="COL",numeric="170",name="Colombia"}, ["CR"] = {alpha3="CRI",numeric="188",name="Costa Rica"}, ["CU"] = {alpha3="CUB",numeric="192",name="Cuba"}, ["CV"] = {alpha3="CPV",numeric="132",name="Cabo Verde",altnames={"Cape Verde"}}, ["CW"] = {alpha3="CUW",numeric="531",name="Curaçao",altnames={"Curacao"}}, ["CX"] = {alpha3="CXR",numeric="162",name="Christmas Island"}, ["CY"] = {alpha3="CYP",numeric="196",name="Cyprus"}, ["CZ"] = {alpha3="CZE",numeric="203",name="Czech Republic",isoname="Czechia"}, ["DE"] = {alpha3="DEU",numeric="276",name="Germany"}, ["DJ"] = {alpha3="DJI",numeric="262",name="Djibouti"}, ["DK"] = {alpha3="DNK",numeric="208",name="Denmark"}, ["DM"] = {alpha3="DMA",numeric="212",name="Dominica"}, ["DO"] = {alpha3="DOM",numeric="214",name="Dominican Republic"}, ["DZ"] = {alpha3="DZA",numeric="012",name="Algeria"}, ["EC"] = {alpha3="ECU",numeric="218",name="Ecuador"}, ["EE"] = {alpha3="EST",numeric="233",name="Estonia"}, ["EG"] = {alpha3="EGY",numeric="818",name="Egypt"}, ["EH"] = {alpha3="ESH",numeric="732",name="Western Sahara"}, ["ER"] = {alpha3="ERI",numeric="232",name="Eritrea"}, ["ES"] = {alpha3="ESP",numeric="724",name="Spain"}, ["ET"] = {alpha3="ETH",numeric="231",name="Ethiopia"}, ["FI"] = {alpha3="FIN",numeric="246",name="Finland"}, ["FJ"] = {alpha3="FJI",numeric="242",name="Fiji"}, ["FK"] = {alpha3="FLK",numeric="238",name="Falkland Islands",isoname="Falkland Islands (Malvinas)",altnames={"Falklands","Islas Malvinas","Malvinas","Malvinas Islands"}}, ["FM"] = {alpha3="FSM",numeric="583",name="Federated States of Micronesia",isoname="Micronesia (Federated States of)",altnames={"Micronesia"}}, ["FO"] = {alpha3="FRO",numeric="234",name="Faroe Islands",altnames={"Faroer","Faeroer"}}, ["FR"] = {alpha3="FRA",numeric="250",name="France"}, ["GA"] = {alpha3="GAB",numeric="266",name="Gabon"}, ["GB"] = {alpha3="GBR",numeric="826",name="United Kingdom",isoname="United Kingdom of Great Britain and Northern Ireland",altnames={"UK","Great Britain"}}, ["GB-ENG"] = {alpha3="ENG",numeric="000",name="England"}, --Considered to be a country ["GB-NIR"] = {alpha3="NIR",numeric="000",name="Northern Ireland"}, --Considered to be a country ["GB-SCT"] = {alpha3="SCT",numeric="000",name="Scotland"}, --Considered to be a country ["GB-WLS"] = {alpha3="WLS",numeric="000",name="Wales"}, --Considered to be a country ["GB-EAW"] = {alpha3="EAW",numeric="000",name="England and Wales"}, --Considered to be a country ["GD"] = {alpha3="GRD",numeric="308",name="Grenada"}, ["GE"] = {alpha3="GEO",numeric="268",name="Georgia"}, ["GF"] = {alpha3="GUF",numeric="254",name="French Guiana"}, ["GG"] = {alpha3="GGY",numeric="831",name="Guernsey"}, ["GH"] = {alpha3="GHA",numeric="288",name="Ghana"}, ["GI"] = {alpha3="GIB",numeric="292",name="Gibraltar"}, ["GL"] = {alpha3="GRL",numeric="304",name="Greenland"}, ["GM"] = {alpha3="GMB",numeric="270",name="Gambia"}, ["GN"] = {alpha3="GIN",numeric="324",name="Guinea"}, ["GP"] = {alpha3="GLP",numeric="312",name="Guadeloupe"}, ["GQ"] = {alpha3="GNQ",numeric="226",name="Equatorial Guinea"}, ["GR"] = {alpha3="GRC",numeric="300",name="Greece"}, ["GS"] = {alpha3="SGS",numeric="239",name="South Georgia and the South Sandwich Islands"}, ["GT"] = {alpha3="GTM",numeric="320",name="Guatemala"}, ["GU"] = {alpha3="GUM",numeric="316",name="Guam"}, ["GW"] = {alpha3="GNB",numeric="624",name="Guinea-Bissau"}, ["GY"] = {alpha3="GUY",numeric="328",name="Guyana"}, ["HK"] = {alpha3="HKG",numeric="344",name="Hong Kong",altnames={"Hong Kong SAR","HKSAR"}}, ["HM"] = {alpha3="HMD",numeric="334",name="Heard Island and McDonald Islands",altnames={"Heard and McDonald Islands"}}, ["HN"] = {alpha3="HND",numeric="340",name="Honduras"}, ["HR"] = {alpha3="HRV",numeric="191",name="Croatia"}, ["HT"] = {alpha3="HTI",numeric="332",name="Haiti"}, ["HU"] = {alpha3="HUN",numeric="348",name="Hungary"}, ["ID"] = {alpha3="IDN",numeric="360",name="Indonesia"}, ["IE"] = {alpha3="IRL",numeric="372",name="Ireland",altnames={"Republic of Ireland"}}, ["IL"] = {alpha3="ISR",numeric="376",name="Israel"}, ["IM"] = {alpha3="IMN",numeric="833",name="Isle of Man"}, ["IN"] = {alpha3="IND",numeric="356",name="India"}, ["IO"] = {alpha3="IOT",numeric="086",name="British Indian Ocean Territory"}, ["IQ"] = {alpha3="IRQ",numeric="368",name="Iraq"}, ["IR"] = {alpha3="IRN",numeric="364",name="Iran",isoname="Iran (Islamic Republic of)"}, ["IS"] = {alpha3="ISL",numeric="352",name="Iceland"}, ["IT"] = {alpha3="ITA",numeric="380",name="Italy"}, ["JE"] = {alpha3="JEY",numeric="832",name="Jersey"}, ["JM"] = {alpha3="JAM",numeric="388",name="Jamaica"}, ["JO"] = {alpha3="JOR",numeric="400",name="Jordan"}, ["JP"] = {alpha3="JPN",numeric="392",name="Japan"}, ["KE"] = {alpha3="KEN",numeric="404",name="Kenya"}, ["KG"] = {alpha3="KGZ",numeric="417",name="Kyrgyzstan"}, ["KH"] = {alpha3="KHM",numeric="116",name="Cambodia"}, ["KI"] = {alpha3="KIR",numeric="296",name="Kiribati"}, ["KM"] = {alpha3="COM",numeric="174",name="Comoros"}, ["KN"] = {alpha3="KNA",numeric="659",name="Saint Kitts and Nevis",altnames={"St Kitts and Nevis"}}, ["KP"] = {alpha3="PRK",numeric="408",name="North Korea",isoname="Korea (Democratic People's Republic of)",altnames={"Democratic People's Republic of Korea"}}, ["KR"] = {alpha3="KOR",numeric="410",name="South Korea",isoname="Korea, Republic of",altnames={"Republic of Korea"}}, ["KW"] = {alpha3="KWT",numeric="414",name="Kuwait"}, ["KY"] = {alpha3="CYM",numeric="136",name="Cayman Islands"}, ["KZ"] = {alpha3="KAZ",numeric="398",name="Kazakhstan"}, ["LA"] = {alpha3="LAO",numeric="418",name="Laos",isoname="Lao People's Democratic Republic"}, ["LB"] = {alpha3="LBN",numeric="422",name="Lebanon"}, ["LC"] = {alpha3="LCA",numeric="662",name="Saint Lucia",altnames={"St Lucia"}}, ["LI"] = {alpha3="LIE",numeric="438",name="Liechtenstein"}, ["LK"] = {alpha3="LKA",numeric="144",name="Sri Lanka"}, ["LR"] = {alpha3="LBR",numeric="430",name="Liberia"}, ["LS"] = {alpha3="LSO",numeric="426",name="Lesotho"}, ["LT"] = {alpha3="LTU",numeric="440",name="Lithuania"}, ["LU"] = {alpha3="LUX",numeric="442",name="Luxembourg"}, ["LV"] = {alpha3="LVA",numeric="428",name="Latvia"}, ["LY"] = {alpha3="LBY",numeric="434",name="Libya"}, ["MA"] = {alpha3="MAR",numeric="504",name="Morocco"}, ["MC"] = {alpha3="MCO",numeric="492",name="Monaco"}, ["MD"] = {alpha3="MDA",numeric="498",name="Moldova",isoname="Moldova, Republic of"}, ["ME"] = {alpha3="MNE",numeric="499",name="Montenegro"}, ["MF"] = {alpha3="MAF",numeric="663",name="Saint-Martin",isoname="Saint Martin (French part)",altnames={"St Martin","St Martin (French part)","Collectivity of Saint Martin","Collectivity of St Martin"}}, ["MG"] = {alpha3="MDG",numeric="450",name="Madagascar"}, ["MH"] = {alpha3="MHL",numeric="584",name="Marshall Islands"}, ["MK"] = {alpha3="MKD",numeric="807",name="North Macedonia",altnames={"Republic of North Macedonia","Macedonia","Republic of Macedonia","Macedonia, the former Yugoslav Republic of"}}, ["ML"] = {alpha3="MLI",numeric="466",name="Mali"}, ["MM"] = {alpha3="MMR",numeric="104",name="Myanmar",altnames={"Burma"}}, ["MN"] = {alpha3="MNG",numeric="496",name="Mongolia"}, ["MO"] = {alpha3="MAC",numeric="446",name="Macau",isoname="Macao",altnames={"Macau SAR","Macao SAR"}}, ["MP"] = {alpha3="MNP",numeric="580",name="Northern Mariana Islands"}, ["MQ"] = {alpha3="MTQ",numeric="474",name="Martinique"}, ["MR"] = {alpha3="MRT",numeric="478",name="Mauritania"}, ["MS"] = {alpha3="MSR",numeric="500",name="Montserrat"}, ["MT"] = {alpha3="MLT",numeric="470",name="Malta"}, ["MU"] = {alpha3="MUS",numeric="480",name="Mauritius"}, ["MV"] = {alpha3="MDV",numeric="462",name="Maldives"}, ["MW"] = {alpha3="MWI",numeric="454",name="Malawi"}, ["MX"] = {alpha3="MEX",numeric="484",name="Mexico"}, ["MY"] = {alpha3="MYS",numeric="458",name="Malaysia"}, ["MZ"] = {alpha3="MOZ",numeric="508",name="Mozambique"}, ["NA"] = {alpha3="NAM",numeric="516",name="Namibia"}, ["NC"] = {alpha3="NCL",numeric="540",name="New Caledonia"}, ["NE"] = {alpha3="NER",numeric="562",name="Niger"}, ["NF"] = {alpha3="NFK",numeric="574",name="Norfolk Island"}, ["NG"] = {alpha3="NGA",numeric="566",name="Nigeria"}, ["NI"] = {alpha3="NIC",numeric="558",name="Nicaragua"}, ["NL"] = {alpha3="NLD",numeric="528",name="Netherlands"}, ["NO"] = {alpha3="NOR",numeric="578",name="Norway"}, ["NP"] = {alpha3="NPL",numeric="524",name="Nepal"}, ["NR"] = {alpha3="NRU",numeric="520",name="Nauru"}, ["NU"] = {alpha3="NIU",numeric="570",name="Niue"}, ["NZ"] = {alpha3="NZL",numeric="554",name="New Zealand",altnames={"Aotearoa"}}, ["OM"] = {alpha3="OMN",numeric="512",name="Oman"}, ["PA"] = {alpha3="PAN",numeric="591",name="Panama"}, ["PE"] = {alpha3="PER",numeric="604",name="Peru"}, ["PF"] = {alpha3="PYF",numeric="258",name="French Polynesia"}, ["PG"] = {alpha3="PNG",numeric="598",name="Papua New Guinea"}, ["PH"] = {alpha3="PHL",numeric="608",name="Philippines"}, ["PK"] = {alpha3="PAK",numeric="586",name="Pakistan"}, ["PL"] = {alpha3="POL",numeric="616",name="Poland"}, ["PM"] = {alpha3="SPM",numeric="666",name="Saint Pierre and Miquelon",altnames={"St Pierre and Miquelon"}}, ["PN"] = {alpha3="PCN",numeric="612",name="Pitcairn"}, ["PR"] = {alpha3="PRI",numeric="630",name="Puerto Rico"}, ["PS"] = {alpha3="PSE",numeric="275",name="Palestine",isoname="Palestine, State of",altnames={"State of Palestine"}}, ["PT"] = {alpha3="PRT",numeric="620",name="Portugal"}, ["PW"] = {alpha3="PLW",numeric="585",name="Palau"}, ["PY"] = {alpha3="PRY",numeric="600",name="Paraguay"}, ["QA"] = {alpha3="QAT",numeric="634",name="Qatar"}, ["RE"] = {alpha3="REU",numeric="638",name="Réunion"}, ["RO"] = {alpha3="ROU",numeric="642",name="Romania"}, ["RS"] = {alpha3="SRB",numeric="688",name="Serbia"}, ["RU"] = {alpha3="RUS",numeric="643",name="Russia",isoname="Russian Federation"}, ["RW"] = {alpha3="RWA",numeric="646",name="Rwanda"}, ["SA"] = {alpha3="SAU",numeric="682",name="Saudi Arabia"}, ["SB"] = {alpha3="SLB",numeric="090",name="Solomon Islands"}, ["SC"] = {alpha3="SYC",numeric="690",name="Seychelles"}, ["SD"] = {alpha3="SDN",numeric="729",name="Sudan"}, ["SE"] = {alpha3="SWE",numeric="752",name="Sweden"}, ["SG"] = {alpha3="SGP",numeric="702",name="Singapore"}, ["SH"] = {alpha3="SHN",numeric="654",name="Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {alpha3="SVN",numeric="705",name="Slovenia"}, ["SJ"] = {alpha3="SJM",numeric="744",name="Svalbard and Jan Mayen"}, ["SK"] = {alpha3="SVK",numeric="703",name="Slovakia"}, ["SL"] = {alpha3="SLE",numeric="694",name="Sierra Leone"}, ["SM"] = {alpha3="SMR",numeric="674",name="San Marino"}, ["SN"] = {alpha3="SEN",numeric="686",name="Senegal"}, ["SO"] = {alpha3="SOM",numeric="706",name="Somalia"}, ["SR"] = {alpha3="SUR",numeric="740",name="Suriname"}, ["SS"] = {alpha3="SSD",numeric="728",name="South Sudan"}, ["ST"] = {alpha3="STP",numeric="678",name="São Tomé and Príncipe",isoname="Sao Tome and Principe",altnames={"Democratic Republic of Sao Tome and Principe"}}, ["SV"] = {alpha3="SLV",numeric="222",name="El Salvador"}, ["SX"] = {alpha3="SXM",numeric="534",name="Sint Maarten",isoname="Sint Maarten (Dutch part)",altnames={"St Maarten","Saint Martin (Dutch part)","St Martin (Dutch part)"}}, ["SY"] = {alpha3="SYR",numeric="760",name="Syria",isoname="Syrian Arab Republic"}, ["SZ"] = {alpha3="SWZ",numeric="748",name="Eswatini",altnames={"Swaziland"}}, ["TC"] = {alpha3="TCA",numeric="796",name="Turks and Caicos Islands"}, ["TD"] = {alpha3="TCD",numeric="148",name="Chad"}, ["TF"] = {alpha3="ATF",numeric="260",name="French Southern and Antarctic Lands",isoname="French Southern Territories"}, ["TG"] = {alpha3="TGO",numeric="768",name="Togo"}, ["TH"] = {alpha3="THA",numeric="764",name="Thailand"}, ["TJ"] = {alpha3="TJK",numeric="762",name="Tajikistan"}, ["TK"] = {alpha3="TKL",numeric="772",name="Tokelau"}, ["TL"] = {alpha3="TLS",numeric="626",name="Timor-Leste",altnames={"East Timor"}}, ["TM"] = {alpha3="TKM",numeric="795",name="Turkmenistan"}, ["TN"] = {alpha3="TUN",numeric="788",name="Tunisia"}, ["TO"] = {alpha3="TON",numeric="776",name="Tonga"}, ["TR"] = {alpha3="TUR",numeric="792",name="Turkey",isoname="Türkiye"}, ["TT"] = {alpha3="TTO",numeric="780",name="Trinidad and Tobago"}, ["TV"] = {alpha3="TUV",numeric="798",name="Tuvalu"}, ["TW"] = {alpha3="TWN",numeric="158",name="Taiwan",isoname="Taiwan, Province of China",altnames={"Republic of China"}}, ["TZ"] = {alpha3="TZA",numeric="834",name="Tanzania",isoname="Tanzania, United Republic of"}, ["UA"] = {alpha3="UKR",numeric="804",name="Ukraine"}, ["UG"] = {alpha3="UGA",numeric="800",name="Uganda"}, ["UM"] = {alpha3="UMI",numeric="581",name="United States Minor Outlying Islands"}, ["US"] = {alpha3="USA",numeric="840",name="United States",isoname="United States of America",altnames={"US","USA","U.S."}}, ["UY"] = {alpha3="URY",numeric="858",name="Uruguay"}, ["UZ"] = {alpha3="UZB",numeric="860",name="Uzbekistan"}, ["VA"] = {alpha3="VAT",numeric="336",name="Vatican City",isoname="Holy See",altnames={"Holy See (Vatican City State)","Vatican City State"}}, ["VC"] = {alpha3="VCT",numeric="670",name="Saint Vincent and the Grenadines",altnames={"St Vincent and the Grenadines"}}, ["VE"] = {alpha3="VEN",numeric="862",name="Venezuela",isoname="Venezuela (Bolivarian Republic of)"}, ["VG"] = {alpha3="VGB",numeric="092",name="British Virgin Islands",isoname="Virgin Islands (British)",altnames={"UK Virgin Islands","BVI"}}, ["VI"] = {alpha3="VIR",numeric="850",name="United States Virgin Islands",isoname="Virgin Islands (U.S.)",altnames={"US Virgin Islands","USVI"}}, ["VN"] = {alpha3="VNM",numeric="704",name="Vietnam",isoname="Viet Nam"}, ["VU"] = {alpha3="VUT",numeric="548",name="Vanuatu"}, ["WF"] = {alpha3="WLF",numeric="876",name="Wallis and Futuna"}, ["WS"] = {alpha3="WSM",numeric="882",name="Samoa"}, ["YE"] = {alpha3="YEM",numeric="887",name="Yemen"}, ["YT"] = {alpha3="MYT",numeric="175",name="Mayotte"}, ["ZA"] = {alpha3="ZAF",numeric="710",name="South Africa"}, ["ZM"] = {alpha3="ZMB",numeric="894",name="Zambia"}, ["ZW"] = {alpha3="ZWE",numeric="716",name="Zimbabwe"} } 1ae753fe1fa53ce062b0a008dbc9778d589666f0 Module:Hatnote 828 336 662 2022-09-05T18:18:32Z wikipedia>Nihiltres 0 Reordered helper functions (first by export status, then alphabetically) and migrated p.quote upstream from [[Module:Redirect hatnote]] (includes contributions by Tamzin and Nihiltres) Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Module:URL 828 611 1210 2022-09-11T18:55:11Z wikipedia>Paine Ellsworth 0 per edit request on talk page - update Scribunto text/plain -- -- This module implements {{URL}} -- -- See unit tests at [[Module:URL/testcases]] local p = {} local function safeUri(s) local success, uri = pcall(function() return mw.uri.new(s) end) if success then return uri end end local function extractUrl(args) for name, val in pairs(args) do if name ~= 2 and name ~= "msg" then local url = name .. "=" .. val; url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url); if uri and uri.host then return url end end end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') local nomsg = (msg or ''):sub(1,1):lower() == "n" or msg == 'false' -- boolean: true if msg is "false" or starts with n or N if url == '' then if text == '' then if nomsg then return nil else return mw.getCurrentFrame():expandTemplate{ title = 'tlx', args = { 'URL', "''example.com''", "''optional display text''" } } end else return text end end -- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL. url = mw.ustring.gsub(url, '%s', function(s) return mw.uri.encode(s, 'PATH') end) -- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error url = mw.ustring.gsub(url, '#$', '') url = mw.ustring.gsub(url, '%?$', '') -- If it's an HTTP[S] URL without the double slash, fix it. url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url) -- Handle URL's without a protocol and URL's that are protocol-relative, -- e.g. www.example.com/foo or www.example.com:8080/foo, and //www.example.com/foo if uri and (not uri.protocol or (uri.protocol and not uri.host)) and url:sub(1, 2) ~= '//' then url = 'http://' .. url uri = safeUri(url) end if text == '' then if uri then if uri.path == '/' then uri.path = '' end local port = '' if uri.port then port = ':' .. uri.port end text = mw.ustring.lower(uri.host or '') .. port .. (uri.relativePath or '') -- Add <wbr> before _/.-# sequences text = mw.ustring.gsub(text,"(/+)","<wbr/>%1") -- This entry MUST be the first. "<wbr/>" has a "/" in it, you know. text = mw.ustring.gsub(text,"(%.+)","<wbr/>%1") -- text = mw.ustring.gsub(text,"(%-+)","<wbr/>%1") -- DISABLED for now text = mw.ustring.gsub(text,"(%#+)","<wbr/>%1") text = mw.ustring.gsub(text,"(_+)","<wbr/>%1") else -- URL is badly-formed, so just display whatever was passed in text = url end end return mw.ustring.format('<span class="url">[%s %s]</span>', url, text) end --[[ The main entry point for calling from Template:URL. --]] function p.url(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' local msg = templateArgs.msg or parentArgs.msg or '' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' return p._url(url, text, msg) end --[[ The entry point for calling from the forked Template:URL2. This function returns no message by default. It strips out wiki-link markup, html tags, and everything after a space. --]] function p.url2(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' -- default to no message local msg = templateArgs.msg or parentArgs.msg or 'no' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' -- if the url came from a Wikidata call, it might have a pen icon appended -- we want to keep that and add it back at the end. local u1, penicon = mw.ustring.match( url, "(.*)(&nbsp;<span class='penicon.*)" ) if penicon then url = u1 end -- strip out html tags and [ ] from url url = (url or ''):gsub("<[^>]*>", ""):gsub("[%[%]]", "") -- truncate anything after a space url = url:gsub("%%20", " "):gsub(" .*", "") return (p._url(url, text, msg) or "") .. (penicon or "") end return p 8d7a4c6fe04a01815e940475cf64b28e1ef48cfb Module:Unicode data/scripts 828 598 1184 2022-09-28T15:04:27Z wikipedia>Drmccreedy 0 Revert script name Nko back to NKo per request Scribunto text/plain --[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]). --]=] local data = { singles = { [0x000AA] = "Latn", [0x000BA] = "Latn", [0x000D7] = "Zyyy", [0x000F7] = "Zyyy", [0x00374] = "Zyyy", [0x0037E] = "Zyyy", [0x0037F] = "Grek", [0x00384] = "Grek", [0x00385] = "Zyyy", [0x00386] = "Grek", [0x00387] = "Zyyy", [0x0038C] = "Grek", [0x00605] = "Zyyy", [0x0060C] = "Zyyy", [0x0061B] = "Zyyy", [0x0061F] = "Zyyy", [0x00640] = "Zyyy", [0x00670] = "Zinh", [0x006DD] = "Zyyy", [0x0085E] = "Mand", [0x008E2] = "Zyyy", [0x009B2] = "Beng", [0x009D7] = "Beng", [0x00A3C] = "Guru", [0x00A51] = "Guru", [0x00A5E] = "Guru", [0x00AD0] = "Gujr", [0x00B9C] = "Taml", [0x00BD0] = "Taml", [0x00BD7] = "Taml", [0x00C5D] = "Telu", [0x00DBD] = "Sinh", [0x00DCA] = "Sinh", [0x00DD6] = "Sinh", [0x00E3F] = "Zyyy", [0x00E84] = "Laoo", [0x00EA5] = "Laoo", [0x00EC6] = "Laoo", [0x010C7] = "Geor", [0x010CD] = "Geor", [0x010FB] = "Zyyy", [0x01258] = "Ethi", [0x012C0] = "Ethi", [0x0171F] = "Tglg", [0x01804] = "Mong", [0x01805] = "Zyyy", [0x01940] = "Limb", [0x01CD3] = "Zyyy", [0x01CE1] = "Zyyy", [0x01CED] = "Zinh", [0x01CF4] = "Zinh", [0x01CFA] = "Zyyy", [0x01D2B] = "Cyrl", [0x01D78] = "Cyrl", [0x01DBF] = "Grek", [0x01F59] = "Grek", [0x01F5B] = "Grek", [0x01F5D] = "Grek", [0x02071] = "Latn", [0x0207F] = "Latn", [0x02126] = "Grek", [0x02132] = "Latn", [0x0214E] = "Latn", [0x02D27] = "Geor", [0x02D2D] = "Geor", [0x02D7F] = "Tfng", [0x03005] = "Hani", [0x03006] = "Zyyy", [0x03007] = "Hani", [0x030A0] = "Zyyy", [0x032FF] = "Zyyy", [0x0A7D3] = "Latn", [0x0A92E] = "Zyyy", [0x0A92F] = "Kali", [0x0A95F] = "Rjng", [0x0A9CF] = "Zyyy", [0x0AB5B] = "Zyyy", [0x0AB65] = "Grek", [0x0FB3E] = "Hebr", [0x0FDCF] = "Arab", [0x0FEFF] = "Zyyy", [0x0FF70] = "Zyyy", [0x101A0] = "Grek", [0x101FD] = "Zinh", [0x102E0] = "Zinh", [0x1039F] = "Ugar", [0x1056F] = "Aghb", [0x10808] = "Cprt", [0x1083C] = "Cprt", [0x1083F] = "Cprt", [0x1091F] = "Phnx", [0x1093F] = "Lydi", [0x1107F] = "Brah", [0x110CD] = "Kthi", [0x11288] = "Mult", [0x1133B] = "Zinh", [0x11350] = "Gran", [0x11357] = "Gran", [0x118FF] = "Wara", [0x11909] = "Diak", [0x11D3A] = "Gonm", [0x11FB0] = "Lisu", [0x11FFF] = "Taml", [0x16FE0] = "Tang", [0x16FE1] = "Nshu", [0x16FE4] = "Kits", [0x1B000] = "Kana", [0x1B132] = "Hira", [0x1B155] = "Kana", [0x1D4A2] = "Zyyy", [0x1D4BB] = "Zyyy", [0x1D546] = "Zyyy", [0x1E08F] = "Cyrl", [0x1E2FF] = "Wcho", [0x1EE24] = "Arab", [0x1EE27] = "Arab", [0x1EE39] = "Arab", [0x1EE3B] = "Arab", [0x1EE42] = "Arab", [0x1EE47] = "Arab", [0x1EE49] = "Arab", [0x1EE4B] = "Arab", [0x1EE54] = "Arab", [0x1EE57] = "Arab", [0x1EE59] = "Arab", [0x1EE5B] = "Arab", [0x1EE5D] = "Arab", [0x1EE5F] = "Arab", [0x1EE64] = "Arab", [0x1EE7E] = "Arab", [0x1F200] = "Hira", [0x1F7F0] = "Zyyy", [0xE0001] = "Zyyy", }, ranges = { { 0x00000, 0x00040, "Zyyy" }, { 0x00041, 0x0005A, "Latn" }, { 0x0005B, 0x00060, "Zyyy" }, { 0x00061, 0x0007A, "Latn" }, { 0x0007B, 0x000A9, "Zyyy" }, { 0x000AB, 0x000B9, "Zyyy" }, { 0x000BB, 0x000BF, "Zyyy" }, { 0x000C0, 0x000D6, "Latn" }, { 0x000D8, 0x000F6, "Latn" }, { 0x000F8, 0x002B8, "Latn" }, { 0x002B9, 0x002DF, "Zyyy" }, { 0x002E0, 0x002E4, "Latn" }, { 0x002E5, 0x002E9, "Zyyy" }, { 0x002EA, 0x002EB, "Bopo" }, { 0x002EC, 0x002FF, "Zyyy" }, { 0x00300, 0x0036F, "Zinh" }, { 0x00370, 0x00373, "Grek" }, { 0x00375, 0x00377, "Grek" }, { 0x0037A, 0x0037D, "Grek" }, { 0x00388, 0x0038A, "Grek" }, { 0x0038E, 0x003A1, "Grek" }, { 0x003A3, 0x003E1, "Grek" }, { 0x003E2, 0x003EF, "Copt" }, { 0x003F0, 0x003FF, "Grek" }, { 0x00400, 0x00484, "Cyrl" }, { 0x00485, 0x00486, "Zinh" }, { 0x00487, 0x0052F, "Cyrl" }, { 0x00531, 0x00556, "Armn" }, { 0x00559, 0x0058A, "Armn" }, { 0x0058D, 0x0058F, "Armn" }, { 0x00591, 0x005C7, "Hebr" }, { 0x005D0, 0x005EA, "Hebr" }, { 0x005EF, 0x005F4, "Hebr" }, { 0x00600, 0x00604, "Arab" }, { 0x00606, 0x0060B, "Arab" }, { 0x0060D, 0x0061A, "Arab" }, { 0x0061C, 0x0061E, "Arab" }, { 0x00620, 0x0063F, "Arab" }, { 0x00641, 0x0064A, "Arab" }, { 0x0064B, 0x00655, "Zinh" }, { 0x00656, 0x0066F, "Arab" }, { 0x00671, 0x006DC, "Arab" }, { 0x006DE, 0x006FF, "Arab" }, { 0x00700, 0x0070D, "Syrc" }, { 0x0070F, 0x0074A, "Syrc" }, { 0x0074D, 0x0074F, "Syrc" }, { 0x00750, 0x0077F, "Arab" }, { 0x00780, 0x007B1, "Thaa" }, { 0x007C0, 0x007FA, "Nkoo" }, { 0x007FD, 0x007FF, "Nkoo" }, { 0x00800, 0x0082D, "Samr" }, { 0x00830, 0x0083E, "Samr" }, { 0x00840, 0x0085B, "Mand" }, { 0x00860, 0x0086A, "Syrc" }, { 0x00870, 0x0088E, "Arab" }, { 0x00890, 0x00891, "Arab" }, { 0x00898, 0x008E1, "Arab" }, { 0x008E3, 0x008FF, "Arab" }, { 0x00900, 0x00950, "Deva" }, { 0x00951, 0x00954, "Zinh" }, { 0x00955, 0x00963, "Deva" }, { 0x00964, 0x00965, "Zyyy" }, { 0x00966, 0x0097F, "Deva" }, { 0x00980, 0x00983, "Beng" }, { 0x00985, 0x0098C, "Beng" }, { 0x0098F, 0x00990, "Beng" }, { 0x00993, 0x009A8, "Beng" }, { 0x009AA, 0x009B0, "Beng" }, { 0x009B6, 0x009B9, "Beng" }, { 0x009BC, 0x009C4, "Beng" }, { 0x009C7, 0x009C8, "Beng" }, { 0x009CB, 0x009CE, "Beng" }, { 0x009DC, 0x009DD, "Beng" }, { 0x009DF, 0x009E3, "Beng" }, { 0x009E6, 0x009FE, "Beng" }, { 0x00A01, 0x00A03, "Guru" }, { 0x00A05, 0x00A0A, "Guru" }, { 0x00A0F, 0x00A10, "Guru" }, { 0x00A13, 0x00A28, "Guru" }, { 0x00A2A, 0x00A30, "Guru" }, { 0x00A32, 0x00A33, "Guru" }, { 0x00A35, 0x00A36, "Guru" }, { 0x00A38, 0x00A39, "Guru" }, { 0x00A3E, 0x00A42, "Guru" }, { 0x00A47, 0x00A48, "Guru" }, { 0x00A4B, 0x00A4D, "Guru" }, { 0x00A59, 0x00A5C, "Guru" }, { 0x00A66, 0x00A76, "Guru" }, { 0x00A81, 0x00A83, "Gujr" }, { 0x00A85, 0x00A8D, "Gujr" }, { 0x00A8F, 0x00A91, "Gujr" }, { 0x00A93, 0x00AA8, "Gujr" }, { 0x00AAA, 0x00AB0, "Gujr" }, { 0x00AB2, 0x00AB3, "Gujr" }, { 0x00AB5, 0x00AB9, "Gujr" }, { 0x00ABC, 0x00AC5, "Gujr" }, { 0x00AC7, 0x00AC9, "Gujr" }, { 0x00ACB, 0x00ACD, "Gujr" }, { 0x00AE0, 0x00AE3, "Gujr" }, { 0x00AE6, 0x00AF1, "Gujr" }, { 0x00AF9, 0x00AFF, "Gujr" }, { 0x00B01, 0x00B03, "Orya" }, { 0x00B05, 0x00B0C, "Orya" }, { 0x00B0F, 0x00B10, "Orya" }, { 0x00B13, 0x00B28, "Orya" }, { 0x00B2A, 0x00B30, "Orya" }, { 0x00B32, 0x00B33, "Orya" }, { 0x00B35, 0x00B39, "Orya" }, { 0x00B3C, 0x00B44, "Orya" }, { 0x00B47, 0x00B48, "Orya" }, { 0x00B4B, 0x00B4D, "Orya" }, { 0x00B55, 0x00B57, "Orya" }, { 0x00B5C, 0x00B5D, "Orya" }, { 0x00B5F, 0x00B63, "Orya" }, { 0x00B66, 0x00B77, "Orya" }, { 0x00B82, 0x00B83, "Taml" }, { 0x00B85, 0x00B8A, "Taml" }, { 0x00B8E, 0x00B90, "Taml" }, { 0x00B92, 0x00B95, "Taml" }, { 0x00B99, 0x00B9A, "Taml" }, { 0x00B9E, 0x00B9F, "Taml" }, { 0x00BA3, 0x00BA4, "Taml" }, { 0x00BA8, 0x00BAA, "Taml" }, { 0x00BAE, 0x00BB9, "Taml" }, { 0x00BBE, 0x00BC2, "Taml" }, { 0x00BC6, 0x00BC8, "Taml" }, { 0x00BCA, 0x00BCD, "Taml" }, { 0x00BE6, 0x00BFA, "Taml" }, { 0x00C00, 0x00C0C, "Telu" }, { 0x00C0E, 0x00C10, "Telu" }, { 0x00C12, 0x00C28, "Telu" }, { 0x00C2A, 0x00C39, "Telu" }, { 0x00C3C, 0x00C44, "Telu" }, { 0x00C46, 0x00C48, "Telu" }, { 0x00C4A, 0x00C4D, "Telu" }, { 0x00C55, 0x00C56, "Telu" }, { 0x00C58, 0x00C5A, "Telu" }, { 0x00C60, 0x00C63, "Telu" }, { 0x00C66, 0x00C6F, "Telu" }, { 0x00C77, 0x00C7F, "Telu" }, { 0x00C80, 0x00C8C, "Knda" }, { 0x00C8E, 0x00C90, "Knda" }, { 0x00C92, 0x00CA8, "Knda" }, { 0x00CAA, 0x00CB3, "Knda" }, { 0x00CB5, 0x00CB9, "Knda" }, { 0x00CBC, 0x00CC4, "Knda" }, { 0x00CC6, 0x00CC8, "Knda" }, { 0x00CCA, 0x00CCD, "Knda" }, { 0x00CD5, 0x00CD6, "Knda" }, { 0x00CDD, 0x00CDE, "Knda" }, { 0x00CE0, 0x00CE3, "Knda" }, { 0x00CE6, 0x00CEF, "Knda" }, { 0x00CF1, 0x00CF3, "Knda" }, { 0x00D00, 0x00D0C, "Mlym" }, { 0x00D0E, 0x00D10, "Mlym" }, { 0x00D12, 0x00D44, "Mlym" }, { 0x00D46, 0x00D48, "Mlym" }, { 0x00D4A, 0x00D4F, "Mlym" }, { 0x00D54, 0x00D63, "Mlym" }, { 0x00D66, 0x00D7F, "Mlym" }, { 0x00D81, 0x00D83, "Sinh" }, { 0x00D85, 0x00D96, "Sinh" }, { 0x00D9A, 0x00DB1, "Sinh" }, { 0x00DB3, 0x00DBB, "Sinh" }, { 0x00DC0, 0x00DC6, "Sinh" }, { 0x00DCF, 0x00DD4, "Sinh" }, { 0x00DD8, 0x00DDF, "Sinh" }, { 0x00DE6, 0x00DEF, "Sinh" }, { 0x00DF2, 0x00DF4, "Sinh" }, { 0x00E01, 0x00E3A, "Thai" }, { 0x00E40, 0x00E5B, "Thai" }, { 0x00E81, 0x00E82, "Laoo" }, { 0x00E86, 0x00E8A, "Laoo" }, { 0x00E8C, 0x00EA3, "Laoo" }, { 0x00EA7, 0x00EBD, "Laoo" }, { 0x00EC0, 0x00EC4, "Laoo" }, { 0x00EC8, 0x00ECE, "Laoo" }, { 0x00ED0, 0x00ED9, "Laoo" }, { 0x00EDC, 0x00EDF, "Laoo" }, { 0x00F00, 0x00F47, "Tibt" }, { 0x00F49, 0x00F6C, "Tibt" }, { 0x00F71, 0x00F97, "Tibt" }, { 0x00F99, 0x00FBC, "Tibt" }, { 0x00FBE, 0x00FCC, "Tibt" }, { 0x00FCE, 0x00FD4, "Tibt" }, { 0x00FD5, 0x00FD8, "Zyyy" }, { 0x00FD9, 0x00FDA, "Tibt" }, { 0x01000, 0x0109F, "Mymr" }, { 0x010A0, 0x010C5, "Geor" }, { 0x010D0, 0x010FA, "Geor" }, { 0x010FC, 0x010FF, "Geor" }, { 0x01100, 0x011FF, "Hang" }, { 0x01200, 0x01248, "Ethi" }, { 0x0124A, 0x0124D, "Ethi" }, { 0x01250, 0x01256, "Ethi" }, { 0x0125A, 0x0125D, "Ethi" }, { 0x01260, 0x01288, "Ethi" }, { 0x0128A, 0x0128D, "Ethi" }, { 0x01290, 0x012B0, "Ethi" }, { 0x012B2, 0x012B5, "Ethi" }, { 0x012B8, 0x012BE, "Ethi" }, { 0x012C2, 0x012C5, "Ethi" }, { 0x012C8, 0x012D6, "Ethi" }, { 0x012D8, 0x01310, "Ethi" }, { 0x01312, 0x01315, "Ethi" }, { 0x01318, 0x0135A, "Ethi" }, { 0x0135D, 0x0137C, "Ethi" }, { 0x01380, 0x01399, "Ethi" }, { 0x013A0, 0x013F5, "Cher" }, { 0x013F8, 0x013FD, "Cher" }, { 0x01400, 0x0167F, "Cans" }, { 0x01680, 0x0169C, "Ogam" }, { 0x016A0, 0x016EA, "Runr" }, { 0x016EB, 0x016ED, "Zyyy" }, { 0x016EE, 0x016F8, "Runr" }, { 0x01700, 0x01715, "Tglg" }, { 0x01720, 0x01734, "Hano" }, { 0x01735, 0x01736, "Zyyy" }, { 0x01740, 0x01753, "Buhd" }, { 0x01760, 0x0176C, "Tagb" }, { 0x0176E, 0x01770, "Tagb" }, { 0x01772, 0x01773, "Tagb" }, { 0x01780, 0x017DD, "Khmr" }, { 0x017E0, 0x017E9, "Khmr" }, { 0x017F0, 0x017F9, "Khmr" }, { 0x01800, 0x01801, "Mong" }, { 0x01802, 0x01803, "Zyyy" }, { 0x01806, 0x01819, "Mong" }, { 0x01820, 0x01878, "Mong" }, { 0x01880, 0x018AA, "Mong" }, { 0x018B0, 0x018F5, "Cans" }, { 0x01900, 0x0191E, "Limb" }, { 0x01920, 0x0192B, "Limb" }, { 0x01930, 0x0193B, "Limb" }, { 0x01944, 0x0194F, "Limb" }, { 0x01950, 0x0196D, "Tale" }, { 0x01970, 0x01974, "Tale" }, { 0x01980, 0x019AB, "Talu" }, { 0x019B0, 0x019C9, "Talu" }, { 0x019D0, 0x019DA, "Talu" }, { 0x019DE, 0x019DF, "Talu" }, { 0x019E0, 0x019FF, "Khmr" }, { 0x01A00, 0x01A1B, "Bugi" }, { 0x01A1E, 0x01A1F, "Bugi" }, { 0x01A20, 0x01A5E, "Lana" }, { 0x01A60, 0x01A7C, "Lana" }, { 0x01A7F, 0x01A89, "Lana" }, { 0x01A90, 0x01A99, "Lana" }, { 0x01AA0, 0x01AAD, "Lana" }, { 0x01AB0, 0x01ACE, "Zinh" }, { 0x01B00, 0x01B4C, "Bali" }, { 0x01B50, 0x01B7E, "Bali" }, { 0x01B80, 0x01BBF, "Sund" }, { 0x01BC0, 0x01BF3, "Batk" }, { 0x01BFC, 0x01BFF, "Batk" }, { 0x01C00, 0x01C37, "Lepc" }, { 0x01C3B, 0x01C49, "Lepc" }, { 0x01C4D, 0x01C4F, "Lepc" }, { 0x01C50, 0x01C7F, "Olck" }, { 0x01C80, 0x01C88, "Cyrl" }, { 0x01C90, 0x01CBA, "Geor" }, { 0x01CBD, 0x01CBF, "Geor" }, { 0x01CC0, 0x01CC7, "Sund" }, { 0x01CD0, 0x01CD2, "Zinh" }, { 0x01CD4, 0x01CE0, "Zinh" }, { 0x01CE2, 0x01CE8, "Zinh" }, { 0x01CE9, 0x01CEC, "Zyyy" }, { 0x01CEE, 0x01CF3, "Zyyy" }, { 0x01CF5, 0x01CF7, "Zyyy" }, { 0x01CF8, 0x01CF9, "Zinh" }, { 0x01D00, 0x01D25, "Latn" }, { 0x01D26, 0x01D2A, "Grek" }, { 0x01D2C, 0x01D5C, "Latn" }, { 0x01D5D, 0x01D61, "Grek" }, { 0x01D62, 0x01D65, "Latn" }, { 0x01D66, 0x01D6A, "Grek" }, { 0x01D6B, 0x01D77, "Latn" }, { 0x01D79, 0x01DBE, "Latn" }, { 0x01DC0, 0x01DFF, "Zinh" }, { 0x01E00, 0x01EFF, "Latn" }, { 0x01F00, 0x01F15, "Grek" }, { 0x01F18, 0x01F1D, "Grek" }, { 0x01F20, 0x01F45, "Grek" }, { 0x01F48, 0x01F4D, "Grek" }, { 0x01F50, 0x01F57, "Grek" }, { 0x01F5F, 0x01F7D, "Grek" }, { 0x01F80, 0x01FB4, "Grek" }, { 0x01FB6, 0x01FC4, "Grek" }, { 0x01FC6, 0x01FD3, "Grek" }, { 0x01FD6, 0x01FDB, "Grek" }, { 0x01FDD, 0x01FEF, "Grek" }, { 0x01FF2, 0x01FF4, "Grek" }, { 0x01FF6, 0x01FFE, "Grek" }, { 0x02000, 0x0200B, "Zyyy" }, { 0x0200C, 0x0200D, "Zinh" }, { 0x0200E, 0x02064, "Zyyy" }, { 0x02066, 0x02070, "Zyyy" }, { 0x02074, 0x0207E, "Zyyy" }, { 0x02080, 0x0208E, "Zyyy" }, { 0x02090, 0x0209C, "Latn" }, { 0x020A0, 0x020C0, "Zyyy" }, { 0x020D0, 0x020F0, "Zinh" }, { 0x02100, 0x02125, "Zyyy" }, { 0x02127, 0x02129, "Zyyy" }, { 0x0212A, 0x0212B, "Latn" }, { 0x0212C, 0x02131, "Zyyy" }, { 0x02133, 0x0214D, "Zyyy" }, { 0x0214F, 0x0215F, "Zyyy" }, { 0x02160, 0x02188, "Latn" }, { 0x02189, 0x0218B, "Zyyy" }, { 0x02190, 0x02426, "Zyyy" }, { 0x02440, 0x0244A, "Zyyy" }, { 0x02460, 0x027FF, "Zyyy" }, { 0x02800, 0x028FF, "Brai" }, { 0x02900, 0x02B73, "Zyyy" }, { 0x02B76, 0x02B95, "Zyyy" }, { 0x02B97, 0x02BFF, "Zyyy" }, { 0x02C00, 0x02C5F, "Glag" }, { 0x02C60, 0x02C7F, "Latn" }, { 0x02C80, 0x02CF3, "Copt" }, { 0x02CF9, 0x02CFF, "Copt" }, { 0x02D00, 0x02D25, "Geor" }, { 0x02D30, 0x02D67, "Tfng" }, { 0x02D6F, 0x02D70, "Tfng" }, { 0x02D80, 0x02D96, "Ethi" }, { 0x02DA0, 0x02DA6, "Ethi" }, { 0x02DA8, 0x02DAE, "Ethi" }, { 0x02DB0, 0x02DB6, "Ethi" }, { 0x02DB8, 0x02DBE, "Ethi" }, { 0x02DC0, 0x02DC6, "Ethi" }, { 0x02DC8, 0x02DCE, "Ethi" }, { 0x02DD0, 0x02DD6, "Ethi" }, { 0x02DD8, 0x02DDE, "Ethi" }, { 0x02DE0, 0x02DFF, "Cyrl" }, { 0x02E00, 0x02E5D, "Zyyy" }, { 0x02E80, 0x02E99, "Hani" }, { 0x02E9B, 0x02EF3, "Hani" }, { 0x02F00, 0x02FD5, "Hani" }, { 0x02FF0, 0x02FFB, "Zyyy" }, { 0x03000, 0x03004, "Zyyy" }, { 0x03008, 0x03020, "Zyyy" }, { 0x03021, 0x03029, "Hani" }, { 0x0302A, 0x0302D, "Zinh" }, { 0x0302E, 0x0302F, "Hang" }, { 0x03030, 0x03037, "Zyyy" }, { 0x03038, 0x0303B, "Hani" }, { 0x0303C, 0x0303F, "Zyyy" }, { 0x03041, 0x03096, "Hira" }, { 0x03099, 0x0309A, "Zinh" }, { 0x0309B, 0x0309C, "Zyyy" }, { 0x0309D, 0x0309F, "Hira" }, { 0x030A1, 0x030FA, "Kana" }, { 0x030FB, 0x030FC, "Zyyy" }, { 0x030FD, 0x030FF, "Kana" }, { 0x03105, 0x0312F, "Bopo" }, { 0x03131, 0x0318E, "Hang" }, { 0x03190, 0x0319F, "Zyyy" }, { 0x031A0, 0x031BF, "Bopo" }, { 0x031C0, 0x031E3, "Zyyy" }, { 0x031F0, 0x031FF, "Kana" }, { 0x03200, 0x0321E, "Hang" }, { 0x03220, 0x0325F, "Zyyy" }, { 0x03260, 0x0327E, "Hang" }, { 0x0327F, 0x032CF, "Zyyy" }, { 0x032D0, 0x032FE, "Kana" }, { 0x03300, 0x03357, "Kana" }, { 0x03358, 0x033FF, "Zyyy" }, { 0x03400, 0x04DBF, "Hani" }, { 0x04DC0, 0x04DFF, "Zyyy" }, { 0x04E00, 0x09FFF, "Hani" }, { 0x0A000, 0x0A48C, "Yiii" }, { 0x0A490, 0x0A4C6, "Yiii" }, { 0x0A4D0, 0x0A4FF, "Lisu" }, { 0x0A500, 0x0A62B, "Vaii" }, { 0x0A640, 0x0A69F, "Cyrl" }, { 0x0A6A0, 0x0A6F7, "Bamu" }, { 0x0A700, 0x0A721, "Zyyy" }, { 0x0A722, 0x0A787, "Latn" }, { 0x0A788, 0x0A78A, "Zyyy" }, { 0x0A78B, 0x0A7CA, "Latn" }, { 0x0A7D0, 0x0A7D1, "Latn" }, { 0x0A7D5, 0x0A7D9, "Latn" }, { 0x0A7F2, 0x0A7FF, "Latn" }, { 0x0A800, 0x0A82C, "Sylo" }, { 0x0A830, 0x0A839, "Zyyy" }, { 0x0A840, 0x0A877, "Phag" }, { 0x0A880, 0x0A8C5, "Saur" }, { 0x0A8CE, 0x0A8D9, "Saur" }, { 0x0A8E0, 0x0A8FF, "Deva" }, { 0x0A900, 0x0A92D, "Kali" }, { 0x0A930, 0x0A953, "Rjng" }, { 0x0A960, 0x0A97C, "Hang" }, { 0x0A980, 0x0A9CD, "Java" }, { 0x0A9D0, 0x0A9D9, "Java" }, { 0x0A9DE, 0x0A9DF, "Java" }, { 0x0A9E0, 0x0A9FE, "Mymr" }, { 0x0AA00, 0x0AA36, "Cham" }, { 0x0AA40, 0x0AA4D, "Cham" }, { 0x0AA50, 0x0AA59, "Cham" }, { 0x0AA5C, 0x0AA5F, "Cham" }, { 0x0AA60, 0x0AA7F, "Mymr" }, { 0x0AA80, 0x0AAC2, "Tavt" }, { 0x0AADB, 0x0AADF, "Tavt" }, { 0x0AAE0, 0x0AAF6, "Mtei" }, { 0x0AB01, 0x0AB06, "Ethi" }, { 0x0AB09, 0x0AB0E, "Ethi" }, { 0x0AB11, 0x0AB16, "Ethi" }, { 0x0AB20, 0x0AB26, "Ethi" }, { 0x0AB28, 0x0AB2E, "Ethi" }, { 0x0AB30, 0x0AB5A, "Latn" }, { 0x0AB5C, 0x0AB64, "Latn" }, { 0x0AB66, 0x0AB69, "Latn" }, { 0x0AB6A, 0x0AB6B, "Zyyy" }, { 0x0AB70, 0x0ABBF, "Cher" }, { 0x0ABC0, 0x0ABED, "Mtei" }, { 0x0ABF0, 0x0ABF9, "Mtei" }, { 0x0AC00, 0x0D7A3, "Hang" }, { 0x0D7B0, 0x0D7C6, "Hang" }, { 0x0D7CB, 0x0D7FB, "Hang" }, { 0x0F900, 0x0FA6D, "Hani" }, { 0x0FA70, 0x0FAD9, "Hani" }, { 0x0FB00, 0x0FB06, "Latn" }, { 0x0FB13, 0x0FB17, "Armn" }, { 0x0FB1D, 0x0FB36, "Hebr" }, { 0x0FB38, 0x0FB3C, "Hebr" }, { 0x0FB40, 0x0FB41, "Hebr" }, { 0x0FB43, 0x0FB44, "Hebr" }, { 0x0FB46, 0x0FB4F, "Hebr" }, { 0x0FB50, 0x0FBC2, "Arab" }, { 0x0FBD3, 0x0FD3D, "Arab" }, { 0x0FD3E, 0x0FD3F, "Zyyy" }, { 0x0FD40, 0x0FD8F, "Arab" }, { 0x0FD92, 0x0FDC7, "Arab" }, { 0x0FDF0, 0x0FDFF, "Arab" }, { 0x0FE00, 0x0FE0F, "Zinh" }, { 0x0FE10, 0x0FE19, "Zyyy" }, { 0x0FE20, 0x0FE2D, "Zinh" }, { 0x0FE2E, 0x0FE2F, "Cyrl" }, { 0x0FE30, 0x0FE52, "Zyyy" }, { 0x0FE54, 0x0FE66, "Zyyy" }, { 0x0FE68, 0x0FE6B, "Zyyy" }, { 0x0FE70, 0x0FE74, "Arab" }, { 0x0FE76, 0x0FEFC, "Arab" }, { 0x0FF01, 0x0FF20, "Zyyy" }, { 0x0FF21, 0x0FF3A, "Latn" }, { 0x0FF3B, 0x0FF40, "Zyyy" }, { 0x0FF41, 0x0FF5A, "Latn" }, { 0x0FF5B, 0x0FF65, "Zyyy" }, { 0x0FF66, 0x0FF6F, "Kana" }, { 0x0FF71, 0x0FF9D, "Kana" }, { 0x0FF9E, 0x0FF9F, "Zyyy" }, { 0x0FFA0, 0x0FFBE, "Hang" }, { 0x0FFC2, 0x0FFC7, "Hang" }, { 0x0FFCA, 0x0FFCF, "Hang" }, { 0x0FFD2, 0x0FFD7, "Hang" }, { 0x0FFDA, 0x0FFDC, "Hang" }, { 0x0FFE0, 0x0FFE6, "Zyyy" }, { 0x0FFE8, 0x0FFEE, "Zyyy" }, { 0x0FFF9, 0x0FFFD, "Zyyy" }, { 0x10000, 0x1000B, "Linb" }, { 0x1000D, 0x10026, "Linb" }, { 0x10028, 0x1003A, "Linb" }, { 0x1003C, 0x1003D, "Linb" }, { 0x1003F, 0x1004D, "Linb" }, { 0x10050, 0x1005D, "Linb" }, { 0x10080, 0x100FA, "Linb" }, { 0x10100, 0x10102, "Zyyy" }, { 0x10107, 0x10133, "Zyyy" }, { 0x10137, 0x1013F, "Zyyy" }, { 0x10140, 0x1018E, "Grek" }, { 0x10190, 0x1019C, "Zyyy" }, { 0x101D0, 0x101FC, "Zyyy" }, { 0x10280, 0x1029C, "Lyci" }, { 0x102A0, 0x102D0, "Cari" }, { 0x102E1, 0x102FB, "Zyyy" }, { 0x10300, 0x10323, "Ital" }, { 0x1032D, 0x1032F, "Ital" }, { 0x10330, 0x1034A, "Goth" }, { 0x10350, 0x1037A, "Perm" }, { 0x10380, 0x1039D, "Ugar" }, { 0x103A0, 0x103C3, "Xpeo" }, { 0x103C8, 0x103D5, "Xpeo" }, { 0x10400, 0x1044F, "Dsrt" }, { 0x10450, 0x1047F, "Shaw" }, { 0x10480, 0x1049D, "Osma" }, { 0x104A0, 0x104A9, "Osma" }, { 0x104B0, 0x104D3, "Osge" }, { 0x104D8, 0x104FB, "Osge" }, { 0x10500, 0x10527, "Elba" }, { 0x10530, 0x10563, "Aghb" }, { 0x10570, 0x1057A, "Vith" }, { 0x1057C, 0x1058A, "Vith" }, { 0x1058C, 0x10592, "Vith" }, { 0x10594, 0x10595, "Vith" }, { 0x10597, 0x105A1, "Vith" }, { 0x105A3, 0x105B1, "Vith" }, { 0x105B3, 0x105B9, "Vith" }, { 0x105BB, 0x105BC, "Vith" }, { 0x10600, 0x10736, "Lina" }, { 0x10740, 0x10755, "Lina" }, { 0x10760, 0x10767, "Lina" }, { 0x10780, 0x10785, "Latn" }, { 0x10787, 0x107B0, "Latn" }, { 0x107B2, 0x107BA, "Latn" }, { 0x10800, 0x10805, "Cprt" }, { 0x1080A, 0x10835, "Cprt" }, { 0x10837, 0x10838, "Cprt" }, { 0x10840, 0x10855, "Armi" }, { 0x10857, 0x1085F, "Armi" }, { 0x10860, 0x1087F, "Palm" }, { 0x10880, 0x1089E, "Nbat" }, { 0x108A7, 0x108AF, "Nbat" }, { 0x108E0, 0x108F2, "Hatr" }, { 0x108F4, 0x108F5, "Hatr" }, { 0x108FB, 0x108FF, "Hatr" }, { 0x10900, 0x1091B, "Phnx" }, { 0x10920, 0x10939, "Lydi" }, { 0x10980, 0x1099F, "Mero" }, { 0x109A0, 0x109B7, "Merc" }, { 0x109BC, 0x109CF, "Merc" }, { 0x109D2, 0x109FF, "Merc" }, { 0x10A00, 0x10A03, "Khar" }, { 0x10A05, 0x10A06, "Khar" }, { 0x10A0C, 0x10A13, "Khar" }, { 0x10A15, 0x10A17, "Khar" }, { 0x10A19, 0x10A35, "Khar" }, { 0x10A38, 0x10A3A, "Khar" }, { 0x10A3F, 0x10A48, "Khar" }, { 0x10A50, 0x10A58, "Khar" }, { 0x10A60, 0x10A7F, "Sarb" }, { 0x10A80, 0x10A9F, "Narb" }, { 0x10AC0, 0x10AE6, "Mani" }, { 0x10AEB, 0x10AF6, "Mani" }, { 0x10B00, 0x10B35, "Avst" }, { 0x10B39, 0x10B3F, "Avst" }, { 0x10B40, 0x10B55, "Prti" }, { 0x10B58, 0x10B5F, "Prti" }, { 0x10B60, 0x10B72, "Phli" }, { 0x10B78, 0x10B7F, "Phli" }, { 0x10B80, 0x10B91, "Phlp" }, { 0x10B99, 0x10B9C, "Phlp" }, { 0x10BA9, 0x10BAF, "Phlp" }, { 0x10C00, 0x10C48, "Orkh" }, { 0x10C80, 0x10CB2, "Hung" }, { 0x10CC0, 0x10CF2, "Hung" }, { 0x10CFA, 0x10CFF, "Hung" }, { 0x10D00, 0x10D27, "Rohg" }, { 0x10D30, 0x10D39, "Rohg" }, { 0x10E60, 0x10E7E, "Arab" }, { 0x10E80, 0x10EA9, "Yezi" }, { 0x10EAB, 0x10EAD, "Yezi" }, { 0x10EB0, 0x10EB1, "Yezi" }, { 0x10EFD, 0x10EFF, "Arab" }, { 0x10F00, 0x10F27, "Sogo" }, { 0x10F30, 0x10F59, "Sogd" }, { 0x10F70, 0x10F89, "Ougr" }, { 0x10FB0, 0x10FCB, "Chrs" }, { 0x10FE0, 0x10FF6, "Elym" }, { 0x11000, 0x1104D, "Brah" }, { 0x11052, 0x11075, "Brah" }, { 0x11080, 0x110C2, "Kthi" }, { 0x110D0, 0x110E8, "Sora" }, { 0x110F0, 0x110F9, "Sora" }, { 0x11100, 0x11134, "Cakm" }, { 0x11136, 0x11147, "Cakm" }, { 0x11150, 0x11176, "Mahj" }, { 0x11180, 0x111DF, "Shrd" }, { 0x111E1, 0x111F4, "Sinh" }, { 0x11200, 0x11211, "Khoj" }, { 0x11213, 0x11241, "Khoj" }, { 0x11280, 0x11286, "Mult" }, { 0x1128A, 0x1128D, "Mult" }, { 0x1128F, 0x1129D, "Mult" }, { 0x1129F, 0x112A9, "Mult" }, { 0x112B0, 0x112EA, "Sind" }, { 0x112F0, 0x112F9, "Sind" }, { 0x11300, 0x11303, "Gran" }, { 0x11305, 0x1130C, "Gran" }, { 0x1130F, 0x11310, "Gran" }, { 0x11313, 0x11328, "Gran" }, { 0x1132A, 0x11330, "Gran" }, { 0x11332, 0x11333, "Gran" }, { 0x11335, 0x11339, "Gran" }, { 0x1133C, 0x11344, "Gran" }, { 0x11347, 0x11348, "Gran" }, { 0x1134B, 0x1134D, "Gran" }, { 0x1135D, 0x11363, "Gran" }, { 0x11366, 0x1136C, "Gran" }, { 0x11370, 0x11374, "Gran" }, { 0x11400, 0x1145B, "Newa" }, { 0x1145D, 0x11461, "Newa" }, { 0x11480, 0x114C7, "Tirh" }, { 0x114D0, 0x114D9, "Tirh" }, { 0x11580, 0x115B5, "Sidd" }, { 0x115B8, 0x115DD, "Sidd" }, { 0x11600, 0x11644, "Modi" }, { 0x11650, 0x11659, "Modi" }, { 0x11660, 0x1166C, "Mong" }, { 0x11680, 0x116B9, "Takr" }, { 0x116C0, 0x116C9, "Takr" }, { 0x11700, 0x1171A, "Ahom" }, { 0x1171D, 0x1172B, "Ahom" }, { 0x11730, 0x11746, "Ahom" }, { 0x11800, 0x1183B, "Dogr" }, { 0x118A0, 0x118F2, "Wara" }, { 0x11900, 0x11906, "Diak" }, { 0x1190C, 0x11913, "Diak" }, { 0x11915, 0x11916, "Diak" }, { 0x11918, 0x11935, "Diak" }, { 0x11937, 0x11938, "Diak" }, { 0x1193B, 0x11946, "Diak" }, { 0x11950, 0x11959, "Diak" }, { 0x119A0, 0x119A7, "Nand" }, { 0x119AA, 0x119D7, "Nand" }, { 0x119DA, 0x119E4, "Nand" }, { 0x11A00, 0x11A47, "Zanb" }, { 0x11A50, 0x11AA2, "Soyo" }, { 0x11AB0, 0x11ABF, "Cans" }, { 0x11AC0, 0x11AF8, "Pauc" }, { 0x11B00, 0x11B09, "Deva" }, { 0x11C00, 0x11C08, "Bhks" }, { 0x11C0A, 0x11C36, "Bhks" }, { 0x11C38, 0x11C45, "Bhks" }, { 0x11C50, 0x11C6C, "Bhks" }, { 0x11C70, 0x11C8F, "Marc" }, { 0x11C92, 0x11CA7, "Marc" }, { 0x11CA9, 0x11CB6, "Marc" }, { 0x11D00, 0x11D06, "Gonm" }, { 0x11D08, 0x11D09, "Gonm" }, { 0x11D0B, 0x11D36, "Gonm" }, { 0x11D3C, 0x11D3D, "Gonm" }, { 0x11D3F, 0x11D47, "Gonm" }, { 0x11D50, 0x11D59, "Gonm" }, { 0x11D60, 0x11D65, "Gong" }, { 0x11D67, 0x11D68, "Gong" }, { 0x11D6A, 0x11D8E, "Gong" }, { 0x11D90, 0x11D91, "Gong" }, { 0x11D93, 0x11D98, "Gong" }, { 0x11DA0, 0x11DA9, "Gong" }, { 0x11EE0, 0x11EF8, "Maka" }, { 0x11F00, 0x11F10, "Kawi" }, { 0x11F12, 0x11F3A, "Kawi" }, { 0x11F3E, 0x11F59, "Kawi" }, { 0x11FC0, 0x11FF1, "Taml" }, { 0x12000, 0x12399, "Xsux" }, { 0x12400, 0x1246E, "Xsux" }, { 0x12470, 0x12474, "Xsux" }, { 0x12480, 0x12543, "Xsux" }, { 0x12F90, 0x12FF2, "Cpmn" }, { 0x13000, 0x13455, "Egyp" }, { 0x14400, 0x14646, "Hluw" }, { 0x16800, 0x16A38, "Bamu" }, { 0x16A40, 0x16A5E, "Mroo" }, { 0x16A60, 0x16A69, "Mroo" }, { 0x16A6E, 0x16A6F, "Mroo" }, { 0x16A70, 0x16ABE, "Tnsa" }, { 0x16AC0, 0x16AC9, "Tnsa" }, { 0x16AD0, 0x16AED, "Bass" }, { 0x16AF0, 0x16AF5, "Bass" }, { 0x16B00, 0x16B45, "Hmng" }, { 0x16B50, 0x16B59, "Hmng" }, { 0x16B5B, 0x16B61, "Hmng" }, { 0x16B63, 0x16B77, "Hmng" }, { 0x16B7D, 0x16B8F, "Hmng" }, { 0x16E40, 0x16E9A, "Medf" }, { 0x16F00, 0x16F4A, "Plrd" }, { 0x16F4F, 0x16F87, "Plrd" }, { 0x16F8F, 0x16F9F, "Plrd" }, { 0x16FE2, 0x16FE3, "Hani" }, { 0x16FF0, 0x16FF1, "Hani" }, { 0x17000, 0x187F7, "Tang" }, { 0x18800, 0x18AFF, "Tang" }, { 0x18B00, 0x18CD5, "Kits" }, { 0x18D00, 0x18D08, "Tang" }, { 0x1AFF0, 0x1AFF3, "Kana" }, { 0x1AFF5, 0x1AFFB, "Kana" }, { 0x1AFFD, 0x1AFFE, "Kana" }, { 0x1B001, 0x1B11F, "Hira" }, { 0x1B120, 0x1B122, "Kana" }, { 0x1B150, 0x1B152, "Hira" }, { 0x1B164, 0x1B167, "Kana" }, { 0x1B170, 0x1B2FB, "Nshu" }, { 0x1BC00, 0x1BC6A, "Dupl" }, { 0x1BC70, 0x1BC7C, "Dupl" }, { 0x1BC80, 0x1BC88, "Dupl" }, { 0x1BC90, 0x1BC99, "Dupl" }, { 0x1BC9C, 0x1BC9F, "Dupl" }, { 0x1BCA0, 0x1BCA3, "Zyyy" }, { 0x1CF00, 0x1CF2D, "Zinh" }, { 0x1CF30, 0x1CF46, "Zinh" }, { 0x1CF50, 0x1CFC3, "Zyyy" }, { 0x1D000, 0x1D0F5, "Zyyy" }, { 0x1D100, 0x1D126, "Zyyy" }, { 0x1D129, 0x1D166, "Zyyy" }, { 0x1D167, 0x1D169, "Zinh" }, { 0x1D16A, 0x1D17A, "Zyyy" }, { 0x1D17B, 0x1D182, "Zinh" }, { 0x1D183, 0x1D184, "Zyyy" }, { 0x1D185, 0x1D18B, "Zinh" }, { 0x1D18C, 0x1D1A9, "Zyyy" }, { 0x1D1AA, 0x1D1AD, "Zinh" }, { 0x1D1AE, 0x1D1EA, "Zyyy" }, { 0x1D200, 0x1D245, "Grek" }, { 0x1D2C0, 0x1D2D3, "Zyyy" }, { 0x1D2E0, 0x1D2F3, "Zyyy" }, { 0x1D300, 0x1D356, "Zyyy" }, { 0x1D360, 0x1D378, "Zyyy" }, { 0x1D400, 0x1D454, "Zyyy" }, { 0x1D456, 0x1D49C, "Zyyy" }, { 0x1D49E, 0x1D49F, "Zyyy" }, { 0x1D4A5, 0x1D4A6, "Zyyy" }, { 0x1D4A9, 0x1D4AC, "Zyyy" }, { 0x1D4AE, 0x1D4B9, "Zyyy" }, { 0x1D4BD, 0x1D4C3, "Zyyy" }, { 0x1D4C5, 0x1D505, "Zyyy" }, { 0x1D507, 0x1D50A, "Zyyy" }, { 0x1D50D, 0x1D514, "Zyyy" }, { 0x1D516, 0x1D51C, "Zyyy" }, { 0x1D51E, 0x1D539, "Zyyy" }, { 0x1D53B, 0x1D53E, "Zyyy" }, { 0x1D540, 0x1D544, "Zyyy" }, { 0x1D54A, 0x1D550, "Zyyy" }, { 0x1D552, 0x1D6A5, "Zyyy" }, { 0x1D6A8, 0x1D7CB, "Zyyy" }, { 0x1D7CE, 0x1D7FF, "Zyyy" }, { 0x1D800, 0x1DA8B, "Sgnw" }, { 0x1DA9B, 0x1DA9F, "Sgnw" }, { 0x1DAA1, 0x1DAAF, "Sgnw" }, { 0x1DF00, 0x1DF1E, "Latn" }, { 0x1DF25, 0x1DF2A, "Latn" }, { 0x1E000, 0x1E006, "Glag" }, { 0x1E008, 0x1E018, "Glag" }, { 0x1E01B, 0x1E021, "Glag" }, { 0x1E023, 0x1E024, "Glag" }, { 0x1E026, 0x1E02A, "Glag" }, { 0x1E030, 0x1E06D, "Cyrl" }, { 0x1E100, 0x1E12C, "Hmnp" }, { 0x1E130, 0x1E13D, "Hmnp" }, { 0x1E140, 0x1E149, "Hmnp" }, { 0x1E14E, 0x1E14F, "Hmnp" }, { 0x1E290, 0x1E2AE, "Toto" }, { 0x1E2C0, 0x1E2F9, "Wcho" }, { 0x1E4D0, 0x1E4F9, "Nagm" }, { 0x1E7E0, 0x1E7E6, "Ethi" }, { 0x1E7E8, 0x1E7EB, "Ethi" }, { 0x1E7ED, 0x1E7EE, "Ethi" }, { 0x1E7F0, 0x1E7FE, "Ethi" }, { 0x1E800, 0x1E8C4, "Mend" }, { 0x1E8C7, 0x1E8D6, "Mend" }, { 0x1E900, 0x1E94B, "Adlm" }, { 0x1E950, 0x1E959, "Adlm" }, { 0x1E95E, 0x1E95F, "Adlm" }, { 0x1EC71, 0x1ECB4, "Zyyy" }, { 0x1ED01, 0x1ED3D, "Zyyy" }, { 0x1EE00, 0x1EE03, "Arab" }, { 0x1EE05, 0x1EE1F, "Arab" }, { 0x1EE21, 0x1EE22, "Arab" }, { 0x1EE29, 0x1EE32, "Arab" }, { 0x1EE34, 0x1EE37, "Arab" }, { 0x1EE4D, 0x1EE4F, "Arab" }, { 0x1EE51, 0x1EE52, "Arab" }, { 0x1EE61, 0x1EE62, "Arab" }, { 0x1EE67, 0x1EE6A, "Arab" }, { 0x1EE6C, 0x1EE72, "Arab" }, { 0x1EE74, 0x1EE77, "Arab" }, { 0x1EE79, 0x1EE7C, "Arab" }, { 0x1EE80, 0x1EE89, "Arab" }, { 0x1EE8B, 0x1EE9B, "Arab" }, { 0x1EEA1, 0x1EEA3, "Arab" }, { 0x1EEA5, 0x1EEA9, "Arab" }, { 0x1EEAB, 0x1EEBB, "Arab" }, { 0x1EEF0, 0x1EEF1, "Arab" }, { 0x1F000, 0x1F02B, "Zyyy" }, { 0x1F030, 0x1F093, "Zyyy" }, { 0x1F0A0, 0x1F0AE, "Zyyy" }, { 0x1F0B1, 0x1F0BF, "Zyyy" }, { 0x1F0C1, 0x1F0CF, "Zyyy" }, { 0x1F0D1, 0x1F0F5, "Zyyy" }, { 0x1F100, 0x1F1AD, "Zyyy" }, { 0x1F1E6, 0x1F1FF, "Zyyy" }, { 0x1F201, 0x1F202, "Zyyy" }, { 0x1F210, 0x1F23B, "Zyyy" }, { 0x1F240, 0x1F248, "Zyyy" }, { 0x1F250, 0x1F251, "Zyyy" }, { 0x1F260, 0x1F265, "Zyyy" }, { 0x1F300, 0x1F6D7, "Zyyy" }, { 0x1F6DC, 0x1F6EC, "Zyyy" }, { 0x1F6F0, 0x1F6FC, "Zyyy" }, { 0x1F700, 0x1F776, "Zyyy" }, { 0x1F77B, 0x1F7D9, "Zyyy" }, { 0x1F7E0, 0x1F7EB, "Zyyy" }, { 0x1F800, 0x1F80B, "Zyyy" }, { 0x1F810, 0x1F847, "Zyyy" }, { 0x1F850, 0x1F859, "Zyyy" }, { 0x1F860, 0x1F887, "Zyyy" }, { 0x1F890, 0x1F8AD, "Zyyy" }, { 0x1F8B0, 0x1F8B1, "Zyyy" }, { 0x1F900, 0x1FA53, "Zyyy" }, { 0x1FA60, 0x1FA6D, "Zyyy" }, { 0x1FA70, 0x1FA7C, "Zyyy" }, { 0x1FA80, 0x1FA88, "Zyyy" }, { 0x1FA90, 0x1FABD, "Zyyy" }, { 0x1FABF, 0x1FAC5, "Zyyy" }, { 0x1FACE, 0x1FADB, "Zyyy" }, { 0x1FAE0, 0x1FAE8, "Zyyy" }, { 0x1FAF0, 0x1FAF8, "Zyyy" }, { 0x1FB00, 0x1FB92, "Zyyy" }, { 0x1FB94, 0x1FBCA, "Zyyy" }, { 0x1FBF0, 0x1FBF9, "Zyyy" }, { 0x20000, 0x2A6DF, "Hani" }, { 0x2A700, 0x2B739, "Hani" }, { 0x2B740, 0x2B81D, "Hani" }, { 0x2B820, 0x2CEA1, "Hani" }, { 0x2CEB0, 0x2EBE0, "Hani" }, { 0x2F800, 0x2FA1D, "Hani" }, { 0x30000, 0x3134A, "Hani" }, { 0x31350, 0x323AF, "Hani" }, { 0xE0020, 0xE007F, "Zyyy" }, { 0xE0100, 0xE01EF, "Zinh" }, }, -- Scripts.txt gives full names; here we consider them aliases to save space. aliases = { Adlm = "Adlam", Aghb = "Caucasian Albanian", Ahom = "Ahom", Arab = "Arabic", Armi = "Imperial Aramaic", Armn = "Armenian", Avst = "Avestan", Bali = "Balinese", Bamu = "Bamum", Bass = "Bassa Vah", Batk = "Batak", Beng = "Bengali", Bhks = "Bhaiksuki", Bopo = "Bopomofo", Brah = "Brahmi", Brai = "Braille", Bugi = "Buginese", Buhd = "Buhid", Cakm = "Chakma", Cans = "Canadian Aboriginal", Cari = "Carian", Cham = "Cham", Cher = "Cherokee", Chrs = "Chorasmian", Copt = "Coptic", Cpmn = "Cypro Minoan", Cprt = "Cypriot", Cyrl = "Cyrillic", Deva = "Devanagari", Diak = "Dives Akuru", Dogr = "Dogra", Dsrt = "Deseret", Dupl = "Duployan", Egyp = "Egyptian Hieroglyphs", Elba = "Elbasan", Elym = "Elymaic", Ethi = "Ethiopic", Geor = "Georgian", Glag = "Glagolitic", Gong = "Gunjala Gondi", Gonm = "Masaram Gondi", Goth = "Gothic", Gran = "Grantha", Grek = "Greek", Gujr = "Gujarati", Guru = "Gurmukhi", Hang = "Hangul", Hani = "Han", Hano = "Hanunoo", Hatr = "Hatran", Hebr = "Hebrew", Hira = "Hiragana", Hluw = "Anatolian Hieroglyphs", Hmng = "Pahawh Hmong", Hmnp = "Nyiakeng Puachue Hmong", Hrkt = "Katakana Or Hiragana", Hung = "Old Hungarian", Ital = "Old Italic", Java = "Javanese", Kali = "Kayah Li", Kana = "Katakana", Kawi = "Kawi", Khar = "Kharoshthi", Khmr = "Khmer", Khoj = "Khojki", Kits = "Khitan Small Script", Knda = "Kannada", Kthi = "Kaithi", Lana = "Tai Tham", Laoo = "Lao", Latn = "Latin", Lepc = "Lepcha", Limb = "Limbu", Lina = "Linear A", Linb = "Linear B", Lisu = "Lisu", Lyci = "Lycian", Lydi = "Lydian", Mahj = "Mahajani", Maka = "Makasar", Mand = "Mandaic", Mani = "Manichaean", Marc = "Marchen", Medf = "Medefaidrin", Mend = "Mende Kikakui", Merc = "Meroitic Cursive", Mero = "Meroitic Hieroglyphs", Mlym = "Malayalam", Modi = "Modi", Mong = "Mongolian", Mroo = "Mro", Mtei = "Meetei Mayek", Mult = "Multani", Mymr = "Myanmar", Nagm = "Nag Mundari", Nand = "Nandinagari", Narb = "Old North Arabian", Nbat = "Nabataean", Newa = "Newa", Nkoo = "NKo", Nshu = "Nushu", Ogam = "Ogham", Olck = "Ol Chiki", Orkh = "Old Turkic", Orya = "Oriya", Osge = "Osage", Osma = "Osmanya", Ougr = "Old Uyghur", Palm = "Palmyrene", Pauc = "Pau Cin Hau", Perm = "Old Permic", Phag = "Phags Pa", Phli = "Inscriptional Pahlavi", Phlp = "Psalter Pahlavi", Phnx = "Phoenician", Plrd = "Miao", Prti = "Inscriptional Parthian", Rjng = "Rejang", Rohg = "Hanifi Rohingya", Runr = "Runic", Samr = "Samaritan", Sarb = "Old South Arabian", Saur = "Saurashtra", Sgnw = "SignWriting", Shaw = "Shavian", Shrd = "Sharada", Sidd = "Siddham", Sind = "Khudawadi", Sinh = "Sinhala", Sogd = "Sogdian", Sogo = "Old Sogdian", Sora = "Sora Sompeng", Soyo = "Soyombo", Sund = "Sundanese", Sylo = "Syloti Nagri", Syrc = "Syriac", Tagb = "Tagbanwa", Takr = "Takri", Tale = "Tai Le", Talu = "New Tai Lue", Taml = "Tamil", Tang = "Tangut", Tavt = "Tai Viet", Telu = "Telugu", Tfng = "Tifinagh", Tglg = "Tagalog", Thaa = "Thaana", Thai = "Thai", Tibt = "Tibetan", Tirh = "Tirhuta", Tnsa = "Tangsa", Toto = "Toto", Ugar = "Ugaritic", Vaii = "Vai", Vith = "Vithkuqi", Wara = "Warang Citi", Wcho = "Wancho", Xpeo = "Old Persian", Xsux = "Cuneiform", Yezi = "Yezidi", Yiii = "Yi", Zanb = "Zanabazar Square", Zinh = "Inherited", Zyyy = "Common", Zzzz = "Unknown", }, } -- Required for binary search function in [[Module:Language/scripts]]. -- Cannot get length of module loaded with mw.loadData. data.ranges.length = #data.ranges data.rtl = {} for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- [[Module:Lang/data]] has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = true end return data f887eb9f8d53e83c36af36a127f534c3e063e358 Module:Format link 828 335 660 2022-10-04T13:37:11Z wikipedia>Pppery 0 Avoid Lua erroring when we run out of expensive parser function calls Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Template:Cob 10 667 1322 2022-10-07T15:01:20Z wikipedia>DatGuy 0 +r from template shortcut wikitext text/x-wiki #REDIRECT [[Template:Collapse bottom]] {{Redirect category shell| {{R from template shortcut}} }} 1cd16c56552caeb938d794d973d1a13c885f7830 Module:Protection banner 828 339 668 2022-10-21T08:07:11Z wikipedia>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Section link 828 736 1461 2022-10-22T09:09:53Z wikipedia>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{section link}}. require('strict'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 5cc61d43dc601ca43e9472500fc5cd09ca7cea44 Module:Message box 828 316 622 2022-10-23T04:26:44Z wikipedia>Legoktm 0 Replace [[Module:No globals]] with require( "strict" ) Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) bdb0ecc9f26f26b9c0ce12a066a183ac9d4f0705 Module:Message box/doc 828 710 1409 2022-10-23T07:33:41Z wikipedia>WOSlinker 0 remove no globals link wikitext text/x-wiki {{Used in system}} {{module rating|p}} {{Lua|Module:Message box/configuration|Module:Yesno|Module:Arguments|Module:Category handler}} {{Uses TemplateStyles|Module:Message box/ambox.css|Module:Message box/cmbox.css|Module:Message box/fmbox.css|Module:Message box/imbox.css|Module:Message box/ombox.css|Module:Message box/tmbox.css}} This is a meta-module that implements the message box templates {{tl|mbox}}, {{tl|ambox}}, {{tl|cmbox}}, {{tl|fmbox}}, {{tl|imbox}}, {{tl|ombox}}, and {{tl|tmbox}}. It is intended to be used from Lua modules, and should not be used directly from wiki pages. If you want to use this module's functionality from a wiki page, please use the individual message box templates instead. == Usage == To use this module from another Lua module, first you need to load it. <syntaxhighlight lang="lua"> local messageBox = require('Module:Message box') </syntaxhighlight> To create a message box, use the <code>main</code> function. It takes two parameters: the first is the box type (as a string), and the second is a table containing the message box parameters. <syntaxhighlight lang="lua"> local box = messageBox.main( boxType, { param1 = param1, param2 = param2, -- More parameters... }) </syntaxhighlight> There are seven available box types: {| class="wikitable" ! Box type !! Template !! Purpose |- | <code>mbox</code> || {{tl|mbox}} || For message boxes to be used in multiple namespaces |- | <code>ambox</code> || {{tl|ambox}} || For article message boxes |- | <code>cmbox</code> || {{tl|cmbox}} || For category message boxes |- | <code>fmbox</code> || {{tl|fmbox}} || For interface message boxes |- | <code>imbox</code> || {{tl|imbox}} || For file namespace message boxes |- | <code>tmbox</code> || {{tl|tmbox}} || For talk page message boxes |- | <code>ombox</code> || {{tl|ombox}} || For message boxes in other namespaces |} See the template page of each box type for the available parameters. == Usage from #invoke == As well as the <code>main</code> function, this module has separate functions for each box type. They are accessed using the code <code><nowiki>{{#invoke:Message box|mbox|...}}</nowiki></code>, <code><nowiki>{{#invoke:Message box|ambox|...}}</nowiki></code>, etc. These will work when called from other modules, but they access code used to process arguments passed from #invoke, and so calling them will be less efficient than calling <code>main</code>. == Technical details == The module uses the same basic code for each of the templates listed above; the differences between each of them are configured using the data at [[Module:Message box/configuration]]. Here are the various configuration options and what they mean: * <code>types</code> – a table containing data used by the type parameter of the message box. The table keys are the values that can be passed to the type parameter, and the table values are tables containing the class and the image used by that type. * <code>default</code> – the type to use if no value was passed to the type parameter, or if an invalid value was specified. * <code>showInvalidTypeError</code> – whether to show an error if the value passed to the type parameter was invalid. * <code>allowBlankParams</code> – usually blank values are stripped from parameters passed to the module. However, whitespace is preserved for the parameters included in the allowBlankParams table. * <code>allowSmall</code> – whether a small version of the message box can be produced with "small=yes". * <code>smallParam</code> – a custom name for the small parameter. For example, if set to "left" you can produce a small message box using "small=left". * <code>smallClass</code> – the class to use for small message boxes. * <code>substCheck</code> – whether to perform a subst check or not. * <code>classes</code> – an array of classes to use with the message box. * <code>imageEmptyCell</code> – whether to use an empty {{tag|td}} cell if there is no image set. This is used to preserve spacing for message boxes with a width of less than 100% of the screen. * <code>imageEmptyCellStyle</code> – whether empty image cells should be styled. * <code>imageCheckBlank</code> – whether "image=blank" results in no image being displayed. * <code>imageSmallSize</code> – usually, images used in small message boxes are set to 30x30px. This sets a custom size. * <code>imageCellDiv</code> – whether to enclose the image in a div enforcing a maximum image size. * <code>useCollapsibleTextFields</code> – whether to use text fields that can be collapsed, i.e. "issue", "fix", "talk", etc. Currently only used in ambox. * <code>imageRightNone</code> – whether imageright=none results in no image being displayed on the right-hand side of the message box. * <code>sectionDefault</code> – the default name for the "section" parameter. Depends on <code>useCollapsibleTextFields</code>. * <code>allowMainspaceCategories</code> – allow categorisation in the main namespace. * <code>templateCategory</code> – the name of a category to be placed on the template page. * <code>templateCategoryRequireName</code> – whether the <code>name</code> parameter is required to display the template category. * <code>templateErrorCategory</code> – the name of the error category to be used on the template page. * <code>templateErrorParamsToCheck</code> – an array of parameter names to check. If any are absent, the <code>templateErrorCategory</code> is applied to the template page. fd6bb8dc654a1b8bb0a0f771130e9b2b5a5c05ad Module:Native name 828 627 1242 2022-12-08T18:00:44Z wikipedia>Izno 0 use module:list, simplify _native_name_list return Scribunto text/plain require('strict'); local getArgs = require ('Module:Arguments').getArgs; local lang_module = require ('Module:Lang'); local yes_no = require('Module:Yesno') local defined_values = { italic = {['no']='no', ['off']='no'}, -- values accepted by |italic= and |italics=; {{lang}} expects 'no' so 'off' must be translated paren = {['no']=true, ['off']=true, ['omit']=true}, -- values accepted by |paren= } local messages_t = { tag_required = 'an IETF language tag as parameter {{{1}}} is required', -- for {{native name}} name_required = 'a name as parameter {{{2}}} is required', tag_required_idx = 'an IETF language tag in |tag%s= is required', -- for {{native name}} when called from {{native name list}} name_required_idx = 'a name in |name%s= is required', empty_list = 'list is empty', -- for {{native name list}} positional = 'positional parameters not supported', br_list = '&lt;br /> lists not allowed', -- for {{native name checker}} list_markup = 'list markup expected for multiple names', malformed_param = 'parameter value is malformed', } local help_links_t = { ['native name'] = '[[Template:Native name|help]]', ['native name checker'] = '[[Template:Native name checker|help]]', ['native name list'] = '[[Template:Native name list|help]]', } local error_cats_t = { ['native name'] = '[[Category:Native name template errors]]', ['native name checker'] = '[[Category:Native name checker template errors]]', ['native name list'] = '[[Category:Native name list template errors]]', } --[[--------------------------< E R R O R _ M S G >------------------------------------------------------------ returns a formatted error message ]] local function error_msg (msg, template, index) local cat = ((0 == mw.title.getCurrentTitle().namespace) and error_cats_t[template]) or ''; if index then local message = string.format (msg, index); return string.format ('<span style="color:#d33">Error {{%s}}: %s (%s)</span>%s', template, message, help_links_t[template], cat) end return string.format ('<span style="color:#d33">Error {{%s}}: %s (%s)</span>%s', template, msg, help_links_t[template], cat) end --[=[-------------------------< _ N A T I V E _ N A M E >------------------------------------------------------ implements {{native name}}; entry point from a module <args_t> is a table of parameter name/value pairs. Parameters that are supported are: args_t[1] - IETF language tag (required) args_t[2] - the native name (required) args_t.italic - accepts string values 'no' or 'off'; {{lang}} expects 'no' so 'off' must be translated args_t.italics - alias of |italic= args_t.paren - accepts 'omit', 'off', or 'no' args_t.icon - alias of paren args_t.parensize - args_t.fontsize - deprecated alias of |parensize= args_t.nolink - any value inhibits wikilinking of language name args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty' error message; mostly for use within another template this function calls these functions in Module:lang: _is_ietf_tag _lang _name_from_tag TODO: add support for romanization and transliteration? add support for postfix so that 'mis' can render something like this: {{native|name|mis|Chotilapacquen|parent=omit|postfix=&#32;([[Coahuiltecan languages|Coahuiltecan]])}} Chotilapacquen (Coahuiltecan) ]=] local function _native_name (args_t) local template = (args_t.template and args_t.template) or 'native name'; -- for error messaging; use 'native name list' when called from native_name_list(), etc if not (args_t[1] or args_t[2]) and yes_no (args_t.suppress_empty_list_error) then return ''; -- if empty list error is suppressed, return empty string elseif not args_t[1] then return error_msg ((args_t.index and messages_t.tag_required_idx) or messages_t.tag_required, template, args_t.index) elseif not args_t[2] then return error_msg ((args_t.index and messages_t.name_required_idx) or messages_t.name_required, template, args_t.index) end args_t.italic = args_t.italics or args_t.italic; -- plural form first in {{native name}} but singular form for {{lang}} args_t.italic = defined_values.italic[args_t.italic] or nil; -- translate assigned value args_t.italics = nil; -- so unset as unneeded args_t.paren = args_t.paren or args_t.icon; args_t.icon = nil; -- unset as unneeded args_t.parensize = args_t.parensize or args_t.fontsize or '100%'; args_t.fontsize = nil; -- unset as unneeded local out_t = {}; table.insert (out_t, lang_module._lang ({args_t[1], args_t[2], ['italic']=args_t.italic, ['template']=template})); if not defined_values.paren[args_t.paren] then table.insert (out_t, '&nbsp;'); table.insert (out_t, table.concat ({ '<span class="languageicon" style="font-size:', args_t.parensize, '; font-weight:normal">'})); if args_t.nolink then table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['template']=template}), ')'})); else if lang_module._is_ietf_tag (args_t[1]) then table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['link'] ='yes', ['template']=template}), ')'})); else table.insert (out_t, '(language?)'); -- TODO: any reason to keep this? end end table.insert (out_t, '</span>'); end return table.concat (out_t); end --[[--------------------------< N A T I V E _ N A M E >-------------------------------------------------------- implements {{native name}}; entry point from the template {{#invoke:native name|native_name|<tag>|<name>|italic=|paren=|parensize=|nolink=}} ]] local function native_name (frame) return _native_name (getArgs (frame)); end --[[--------------------------> _ N A T I V E _ N A M E _ L I S T >-------------------------------------------- implements {{native name}}; entry point from a module <args_t> is a table of parameter name/value pairs. Supports enumerated forms of the {{native name}} parameters: args_t.tagn - IETF language tag (|tag1= required) args_t.namen - the native name (|name1= required) args_t.italicn - accepts string values 'no' or 'off' args_t.italicsn - alias of |italicn= args_t.parenn - accepts 'omit', 'off', or 'no' args_t.iconn - alias of paren args_t.parensizen - args_t.fontsizen - deprecated alias of |parensizen= args_t.nolinkn - any value inhibits wikilinking of language name also supports: args_t.postfixn - wikitext to be appended to list item n (references other appropriate text) args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty list' error message; mostly for use within another template ]] local function _native_name_list (args_t) if args_t[1] then return error_msg (messages_t.positional, 'native name list') end local unsorted_enumerators_t = {} -- unsorted k/v table of tagn and namen enumerators where k is the enumerator and v is always true for param, _ in pairs (args_t) do -- loop through all parameters local enumerator = mw.ustring.match (param, "^tag(%d+)$") -- is this a |tagn= parameter? extract enumerator if present if enumerator then -- if there is an enumerator unsorted_enumerators_t[tonumber(enumerator)] = true -- add enumerator to the table else local name_match = mw.ustring.match (param, "^name(%d+)$") -- is this a |tagn= parameter? extract enumerator if present if name_match then -- if there is an enumerator unsorted_enumerators_t[tonumber (name_match)] = true -- add enumerator to the table end end end local enumerators_t = {} -- will hold a sorted sequence of enumerators for n, _ in pairs (unsorted_enumerators_t) do -- loop through the k/v table of enumerators table.insert (enumerators_t, n) -- add the enumerator to the sequence end table.sort (enumerators_t) -- and ascending sort local list_t = {}; -- list of formatted native names goes here for _, n in ipairs (enumerators_t) do -- loop through the sorted enumerators table.insert (list_t, table.concat ({ _native_name ({ -- go render the native name args_t['tag'..n], args_t['name'..n], ['italic'] = args_t['italic'..n], ['italics'] = args_t['italics'..n], ['paren'] = args_t['paren'..n], ['icon'] = args_t['icon'..n], ['parensize'] = args_t['parensize'..n], ['fontsize'] = args_t['fontsize'..n], ['nolink'] = args_t['nolink'..n], ['template'] = 'native name list', -- for error messaging ['index'] = n, -- for error messaging }), args_t['postfix'..n] or '', })); end if 0 == #list_t then return (yes_no (args_t.suppress_empty_list_error) and '') or -- return empty string when error suppressed error_msg (messages_t.empty_list, 'native name list'); -- otherwise error elseif 1 == #list_t then return list_t[1]; -- return the very short list; TODO: add error? else return require ('Module:List').unbulleted (list_t); -- use unbulleted list from module end end --[[--------------------------< N A T I V E _ N A M E _ L I S T >---------------------------------------------- implements {{native name list}}; entry point from the template {{#invoke:native name list|native_name_list|tag1=<tag>|name1=<name>|italic1=|paren1=|parensize1=|nolink1=}} ]] local function native_name_list (frame) return _native_name_list (getArgs (frame)); end --[[--------------------------< _ N A T I V E _ N A M E _ C H E C K E R >-------------------------------------- entry point from a module implements {{native name checker}} for use inside infoboxen: |dataxx = {{native name checker|{{{native_name|}}}}} inspects rendered content of {{{native_name}}}: expects: at least one lang="<valid IETF tag>" html attribute; tag must begin with 2 or three letters followed by a hyphen or double quote character: lang="zh-Hant" or lang="nav" or lang="oj" emits error message when 2 or more lang="<valid IETF tag>" html attribute but list markup <li> tag not found emits error message if any form of '<br />' tag is found per MOS:NOBREAK returns: nothing when |native_name= is omitted or empty assigned value when no error error message on error ]] local function _native_name_checker (args_t) local value = args_t[1]; if not value then -- if |native_name= is omitted or empty return; -- return nothing end local _, count = value:gsub ('lang="%a%a%a?[%-"]%a*', '%1'); if 0 == count then return table.concat ({value, error_msg (messages_t.malformed_param, 'native name checker')}, ' '); -- no {{lang}} or {{native_name}} template end if 1 < count then if not value:find ('<div class="plainlist *" *>') or not value:find ('</div>$') then -- must be wrapped in 'plainlist' div return table.concat ({value, error_msg (messages_t.list_markup, 'native name checker')}, ' '); end end if value:find ('< */? *[Bb][Rr] */? *>') then -- look for something that vaguely resembles a <br /> tag return table.concat ({value, error_msg (messages_t.br_list, 'native name checker')}, ' '); end return value; -- no failed tests, return the value as is end --[[--------------------------< N A T I V E _ N A M E _ C H E C K E R >-------------------------------------- entry point from a module implements {{native name checker}} ]] local function native_name_checker (frame) return _native_name_checker (getArgs (frame)); end --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { native_name = native_name, -- template interface native_name_list = native_name_list, native_name_checker = native_name_checker, _native_name = _native_name, -- other module interface _native_name_list = _native_name_list, _native_name_checker = _native_name_checker, } b58f845623d3e920e8098e96bd84a56d2d3079bb Template:Mlx 10 738 1465 2022-12-10T23:52:31Z wikipedia>HouseBlaster 0 HouseBlaster moved page [[Template:Mlx]] to [[Template:Module link expanded]]: harmonize with [[Template:template link expanded]] wikitext text/x-wiki #REDIRECT [[Template:Module link expanded]] {{Redirect category shell| {{R from move}} }} 3a80cf77e735d41b1611f1bd7f028ce9941330a2 Module:Side box 828 372 734 2022-12-13T04:33:19Z wikipedia>Izno 0 we cookin with plainlist templatestyles now Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 096bef4a3721857fc16eb509a4f8d75973484485 Module:Infobox 828 273 536 2022-12-27T21:29:12Z wikipedia>Izno 0 merge hlist here Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:Collapsible list 828 614 1216 2022-12-29T03:55:22Z wikipedia>Izno 0 run fast, break things, and then go to bed (this was in fact tested) Scribunto text/plain local p = {} local function gettitlestyletracking( ts ) if not ts then return '' end ts = mw.ustring.gsub(mw.ustring.lower(ts), '%s', '') local tsvals = mw.text.split(ts, ';') table.sort(tsvals) local skey = table.concat(tsvals,';') skey = mw.ustring.gsub(skey, '^;', '') skey = mw.text.encode(mw.text.encode(skey),'%c%[%]=') if (mw.ustring.match(';' .. ts, ';background:') or mw.ustring.match(';' .. ts, ';background%-color:')) and mw.ustring.match(';' .. ts, ';text%-align:') then return '[[Category:Pages using collapsible list with both background and text-align in titlestyle|' .. skey .. ' ]]' end return '[[Category:Pages using collapsible list without both background and text-align in titlestyle|' .. skey .. ' ]]' end local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height: inherit; margin: 0">%s</li>', data ) end -- Returns an array containing the keys of all positional arguments -- that contain data (i.e. non-whitespace values). local function getArgNums( args ) local nums = {} for k, v in pairs( args ) do if type( k ) == 'number' and k >= 1 and math.floor( k ) == k and type( v ) == 'string' and mw.ustring.match( v, '%S' ) then table.insert( nums, k ) end end table.sort( nums ) return nums end -- Formats a list of classes, styles or other attributes. local function formatAttributes( attrType, ... ) local attributes = { ... } local nums = getArgNums( attributes ) local t = {} for i, num in ipairs( nums ) do table.insert( t, attributes[ num ] ) end if #t == 0 then return '' -- Return the blank string so concatenation will work. end return mw.ustring.format( ' %s="%s"', attrType, table.concat( t, ' ' ) ) end -- TODO: use Module:List. Since the update for this comment is routine, -- this is blocked without a consensus discussion by -- [[MediaWiki_talk:Common.css/Archive_15#plainlist_+_hlist_indentation]] -- if we decide hlist in plainlist in this template isn't an issue, we can use -- module:list directly -- [https://en.wikipedia.org/w/index.php?title=Module:Collapsible_list/sandbox&oldid=1130172480] -- is an implementation (that will code rot slightly I expect) local function buildList( args ) -- Get the list items. local listItems = {} local argNums = getArgNums( args ) for i, num in ipairs( argNums ) do table.insert( listItems, getListItem( args[ num ] ) ) end if #listItems == 0 then return '' end listItems = table.concat( listItems ) -- hack around mw-collapsible show/hide jumpiness by looking for text-alignment -- by setting a margin if centered local textAlignmentCentered = 'text%-align%s*:%s*center' local centeredTitle = (args.title_style and args.title_style:lower():match(textAlignmentCentered) or args.titlestyle and args.titlestyle:lower():match(textAlignmentCentered)) local centeredTitleSpacing if centeredTitle then centeredTitleSpacing = 'margin: 0 4em' else centeredTitleSpacing = '' end -- Get class, style and title data. local collapsibleContainerClass = formatAttributes( 'class', 'collapsible-list', 'mw-collapsible', not args.expand and 'mw-collapsed' ) local collapsibleContainerStyle = formatAttributes( 'style', -- mostly work around .infobox-full-data defaulting to centered 'text-align: left;', args.frame_style, args.framestyle ) local collapsibleTitleStyle = formatAttributes( 'style', 'line-height: 1.6em; font-weight: bold;', args.title_style, args.titlestyle ) local jumpyTitleStyle = formatAttributes( 'style', centeredTitleSpacing ) local title = args.title or 'List' local ulclass = formatAttributes( 'class', 'mw-collapsible-content', args.hlist and 'hlist' ) local ulstyle = formatAttributes( 'style', 'margin-top: 0; margin-bottom: 0; line-height: inherit;', not args.bullets and 'list-style: none; margin-left: 0;', args.list_style, args.liststyle ) local hlist_templatestyles = '' if args.hlist then hlist_templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } end -- Build the list. return mw.ustring.format( '%s<div%s%s>\n<div%s><div%s>%s</div></div>\n<ul%s%s>%s</ul>\n</div>', hlist_templatestyles, collapsibleContainerClass, collapsibleContainerStyle, collapsibleTitleStyle, jumpyTitleStyle, title, ulclass, ulstyle, listItems ) .. gettitlestyletracking(args.title_style or args.titlestyle) end function p.main( frame ) local origArgs if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args for k, v in pairs( frame.args ) do origArgs = frame.args break end else origArgs = frame end local args = {} for k, v in pairs( origArgs ) do if type( k ) == 'number' or v ~= '' then args[ k ] = v end end return buildList( args ) end return p ca7247627fa3951693881fb8ec18d15c7ba84f79 Module:List 828 309 608 2022-12-29T17:57:56Z wikipedia>Izno 0 add templatestyles for hlist Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:Sidebar/doc 828 703 1395 2022-12-29T18:01:46Z wikipedia>Izno 0 hlist tstyles wikitext text/x-wiki {{High-risk|155000+}} {{module rating|protected}} {{Lua|Module:Sidebar/configuration|Module:Navbar|Module:Arguments}} {{Uses TemplateStyles|Module:Sidebar/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}} This module implements the templates {{tl|sidebar}} and {{tl|sidebar with collapsible lists}}. See the individual template pages for documentation. <includeonly>{{sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Sidebar meta-templates| ]] [[Category:Modules that add a tracking category]] [[Category:Modules that check for strip markers]] }}</includeonly> 710222793e9c5fe515b611d11ddac712a409e814 Module:Navbox/doc 828 716 1421 2022-12-29T18:13:31Z wikipedia>Izno 0 hlist wikitext text/x-wiki {{High-use}} {{module rating|protected}} {{Lua|Module:Navbox/configuration|Module:Navbar|Module:Color contrast|Module:Arguments}} {{Uses TemplateStyles|Module:Navbox/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}} {{Lua sidebar}} This module implements the {{tl|Navbox}} template. Please see the [[Template:Navbox|template page]] for usage instructions. == Tracking/maintenance categories == * {{clc|Navbox orphans}} * {{clc|Navigational boxes without horizontal lists}} * {{clc|Navboxes using background colours}} * {{clc|Potentially illegible navboxes}} * {{clc|Navboxes using borders}} <includeonly>{{sandbox other|| [[Category:Modules that add a tracking category]] [[Category:Modules that check for strip markers]] }}</includeonly> 6d5ec445d8ec7f7f89a9354af5a49421f0fe0d6a Module:Navbox/configuration 828 287 564 2022-12-29T18:14:27Z wikipedia>Izno 0 get these in Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbar/configuration 828 284 558 2022-12-29T18:18:21Z wikipedia>Izno 0 add hlist/styles.css Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbar 828 283 556 2022-12-29T18:20:02Z wikipedia>Izno 0 add templatestyles for hlist Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 79f907e59eaa8bbf8dd50bb751933ebeaaa7eb17 Module:Navbar/doc 828 728 1445 2022-12-29T18:20:41Z wikipedia>Izno 0 add hlist tstyles wikitext text/x-wiki {{used in system}} {{module rating|protected}} {{Lua|Module:Navbar/configuration|Module:Arguments|Module:TableTools}} {{Uses TemplateStyles|Module:Navbar/styles.css|Template:Hlist/styles.css}} This is a [[WP:Lua|Lua]] implementation of {{tl|Navbar}}. It is used in [[Module:Navbox]]. 8525efb014e023829e4454a637299cf4a8cd958b Module:If empty/doc 828 744 1477 2023-01-11T10:44:19Z wikipedia>Hike395 0 add link to test cases wikitext text/x-wiki {{Module rating|protected}} {{Lua|Module:Arguments}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-use}} This module supports [[Template:If empty]]. See [[Template:If empty/testcases|here]] for test cases. <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly> 0844a4ab85f2957e0875fd5df410d374ab611346 Module:Side box/styles.css 828 393 776 2023-01-19T20:36:50Z wikipedia>TheDJ 0 use display flow-root to force a new Block formatting context text text/plain /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; } } @media (min-width: 720px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } 5be55dbc33007e62deac23036c134ed064dbe603 Module:If empty 828 280 550 2023-01-26T18:33:28Z wikipedia>MSGJ 0 lastk is not needed Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p 4790391408957dea3ff9f453834c05f6b379a45c Template:DMCA 10 729 1447 2023-02-03T21:12:07Z wikipedia>Paine Ellsworth 0 add [[WP:RCAT|rcat template]] wikitext text/x-wiki #REDIRECT [[Template:Dated maintenance category (articles)]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} 711d3f1c53fa704297f675a8dcf1a56719c5b654 Module:Exponential search 828 597 1182 2023-02-10T20:10:53Z wikipedia>Uzume 0 strict Scribunto text/plain -- This module provides a generic exponential search algorithm. require[[strict]] local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc, i, lower, upper) else upper = i i = midPoint(lower, upper) return search(testFunc, i, lower, upper) end end return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init == math.huge) then error(string.format( "invalid init value '%s' detected in argument #2 to " .. "'Exponential search' (init value must be a positive integer)", tostring(init) ), 2) end init = init or 2 if not testFunc(1) then return nil end return search(testFunc, init, 1, nil) end a9037be0c44536be79b2d7a26155bfb907368ae7 Module:Lua banner 828 319 628 2023-02-16T14:39:53Z wikipedia>Uzume 0 [[Module:Citation]] has been blanked since [[Wikipedia:Templates for discussion/Log/2018 May 13#Module:Citation]]; remove special handling Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Module:Lang/data 828 362 714 2023-03-09T14:48:18Z wikipedia>Trappist the monk 0 fix; Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> iana registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active) for k, v in pairs (source.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Language/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug colsole: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ca-x-old"] = "Old Catalan", ["cel-x-proto"] = "Proto-Celtic", -- cel in IANA is Celtic languages ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmw-x-ecg"] = "East Central German", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koinē Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name>-language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij"] = "Ligurian (Romance language)", -- Ligurian; see Template_talk:Lang#Ligurian_dab ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ['qwm'] = "Kuman (Russia)", -- Kuman (Russia); to avoid Kuman dab page ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["xlg"] = "Ligurian (ancient language)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['pny'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, }; return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; 44981b3b66900e816590946e3e049c421ebecc80 Module:Authority control/doc 828 724 1437 2023-03-13T18:21:48Z wikipedia>MSGJ 0 update wikitext text/x-wiki {{High-risk}} {{Module rating|protected}} {{Authority control/related}} {{Lua|Module:Navbox|Module:ResolveEntityId}} This module contains the code for the {{T|Authority control}} template. Please see [[Template:Authority control/doc]]. <includeonly>{{sandbox other|| [[Category:Modules using data from Wikidata]] [[Category:Wikipedia authority control]] }}</includeonly> 7b92fcf75d5208e71e4bbc4dd06b8171884722e4 Module:Sidebar/configuration 828 342 674 2023-03-14T22:32:24Z wikipedia>Izno 0 add hlist and plainlist_templatestyles keys Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content' } } } dc2a980ac2162a898f7c21e6d6ba7e994dfeb315 Module:Sidebar 828 341 672 2023-03-14T22:35:53Z wikipedia>Izno 0 move these items to config, discovered during work at meta Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function hasSubgroup(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleclass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then root :tag('tr') :tag('td') :addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup or cfg.i18n.class.content) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles } } local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (child and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 71fe765846593e025ca2f94371315e9dbb5bb4d2 Help:Infobox/user style 12 358 706 2023-04-03T14:00:08Z wikipedia>Maddy from Celeste 0 blatant self-promotion wikitext text/x-wiki {{{heading| ==Infoboxes and user style == }}} Users can have [[WP:User style|user CSS]] that hides<!--, moves, or makes collapsible--> any infoboxes in their own browsers. To hide all infoboxes, add the following to [[Special:MyPage/common.css]] (for all [[WP:Skin|skins]], or [[Special:MyPage/skin.css]] for just the current skin), on a line by itself: <syntaxhighlight lang="css">div.mw-parser-output .infobox { display: none; }</syntaxhighlight> Alternatively, you can add the following code to [[Special:MyPage/common.js|your common.js]] or into a browser user script that is executed by an extension like [[Greasemonkey]]: <syntaxhighlight lang="js">$('.infobox').hide();</syntaxhighlight> Be aware that although{{#if:{{{guideline|}}}||, per [[WP:Manual of Style/Infoboxes]],}} all information in an infobox ideally should also be found in the main body of an article, there isn't perfect compliance with this guideline. For example, the full taxonomic hierarchy in {{tlx|Taxobox}}, and the OMIM and other medical database codes of {{tlx|Infobox disease}} are often not found in the main article content. The infobox is also often the location of the most significant, even only, image in an article. There is a userscript which removes infoboxes but moves the images contained to separate thumbnails: [[User:Maddy from Celeste/disinfobox.js]].<!-- Needs Special:Mypage/common.js options for: * Making infoboxes collapsible ** Making them auto-collapsed * Moving infoboxes to bottom of page --><noinclude> {{Documentation|content= This documentation snippet is transcluded at [[Help:Infobox]], [[Template:Infobox/doc]], [[WP:Customisation#Hiding specific messages]], [[Help:User style]], [[WP:Manual of Style/Infoboxes]], and other places where this information is relevant. As a template, this snippet takes a {{para|heading}} parameter to replace the level-2 <code>==Infoboxes and user style==</code> section heading code, as needed. E.g., for a <code>=== ... ===</code> level-3 heading: <code><nowiki>heading={{=}}{{=}}{{=}}Infoboxes and user style{{=}}{{=}}{{=}}</nowiki></code> }} </noinclude> ba4dac68eb2bdc49a32f2a11b9afd52381bf06b5 Template:High-risk 10 699 1387 2023-04-09T16:46:44Z wikipedia>Nagsb 0 wikitext text/x-wiki #REDIRECT [[Template:High-use]] {{Rcat shell| {{R with Wikidata item}} {{R from merge}} {{R from template shortcut}} }} 52c9a8c75748fd2b20183ed6c60e1f3c3a435cc9 Module:Check for unknown parameters/doc 828 743 1475 2023-04-18T14:26:49Z wikipedia>Lemondoge 0 /* Lua patterns */ Updated patterns here in docs to reflect changes to the regex of [[Module:Infobox3cols]]; used {{tl}} wikitext text/x-wiki {{used in system|in [[MediaWiki:Abusefilter-warning-DS]]}} {{module rating|p}} {{Lua|Module:If preview|noprotcat=yes}} This module may be appended to a template to check for uses of unknown parameters. Unlike many other modules, this module is ''not'' implemented by a template. == Usage == === Basic usage === <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category]] |arg1|arg2|arg3|argN}} </pre> or to sort the entries in the tracking category by parameter with a preview error message <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category|_VALUE_]] |preview=unknown parameter "_VALUE_" |arg1|arg2|...|argN}} </pre> or for an explicit red error message <pre> {{#invoke:check for unknown parameters|check |unknown=<span class="error">Sorry, I don't recognize _VALUE_</span> |arg1|arg2|...|argN}} </pre> Here, <code>arg1</code>, <code>arg2</code>, ..., <code>argN</code>, are the known parameters. Unnamed (positional) parameters can be added too: <code><nowiki>|1|2|argname1|argname2|...</nowiki></code>. Any parameter which is used, but not on this list, will cause the module to return whatever is passed with the <code>unknown</code> parameter. The <code>_VALUE_</code> keyword, if used, will be changed to the name of the parameter. This is useful for either sorting the entries in a tracking category, or for provide more explicit information. By default, the module makes no distinction between a defined-but-blank parameter and a non-blank parameter. That is, both unlisted {{para|foo|x}} and {{para|foo}} are reported. To only track non-blank parameters use {{para|ignoreblank|1}}. By default, the module ignores blank positional parameters. That is, an unlisted {{para|2}} is ignored. To ''include'' blank positional parameters in the tracking use {{para|showblankpositional|1}}. === Lua patterns === This module supports [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]] (similar to [[regular expression]]s), which are useful when there are many known parameters which use a systematic pattern. For example, {{tl|Infobox3cols}} uses <pre> | regexp1 = header[%d]+ | regexp2 = label[%d]+ | regexp3 = data[%d]+[abc]? | regexp4 = class[%d]+[abc]? | regexp5 = rowclass[%d]+ | regexp6 = rowstyle[%d]+ | regexp7 = rowcellstyle[%d]+ </pre> to match all parameters of the form <code>headerNUM</code>, <code>labelNUM</code>, <code>dataNUM</code>, <code>dataNUMa</code>, <code>dataNUMb</code>, <code>dataNUMc</code>, ..., <code>rowcellstyleNUM</code>, where NUM is a string of digits. == Example == <pre> {{Infobox | above = {{{name|}}} | label1 = Height | data1 = {{{height|}}} | label2 = Weight | data2 = {{{weight|}}} | label3 = Website | data3 = {{{website|}}} }}<!-- end infobox, start tracking -->{{#invoke:Check for unknown parameters|check | unknown = {{main other|[[Category:Some tracking category|_VALUE_]]}} | preview = unknown parameter "_VALUE_" | name | height | weight | website }} </pre> ==Call from within Lua code== See the end of [[Module:Rugby box]] for a simple example or [[Module:Infobox3cols]] or [[Module:Flag]] for more complicated examples. ==See also== * {{clc|Unknown parameters}} (category page can have header {{tl|Unknown parameters category}}) * [[Template:Checks for unknown parameters]] – adds documentation to templates using this module * [[Module:Check for deprecated parameters]] – similar module that checks for deprecated parameters * [[Module:Check for clobbered parameters]] – module that checks for conflicting parameters * [[Module:TemplatePar]] – similar function (originally from dewiki) * [[Template:Parameters]] and [[Module:Parameters]] – generates a list of parameter names for a given template * [[Project:TemplateData]] based template parameter validation * [[Module:Parameter validation]] checks a lot more * [[User:Bamyers99/TemplateParametersTool]] - A tool for checking usage of template parameters <includeonly>{{sandbox other|| <!-- Categories go here and interwikis go in Wikidata. --> [[Category:Modules that add a tracking category]] }}</includeonly> 4a8def527d795ff7957b9621293228925cb83596 Module:Convert/text 828 585 1158 2023-04-19T04:48:47Z wikipedia>Johnuniq 0 update from sandbox per [[Template talk:Convert#Module version 28]] Scribunto text/plain -- Text used by Module:Convert for enwiki. -- This is a separate module to simplify translation for use on another wiki. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- Some units accept an SI prefix before the unit code, such as "kg" for kilogram. local SIprefixes = { -- The prefix field is what the prefix should be, if different from the prefix used. ['Q'] = { exponent = 30, name = 'quetta', }, ['R'] = { exponent = 27, name = 'ronna', }, ['Y'] = { exponent = 24, name = 'yotta', }, ['Z'] = { exponent = 21, name = 'zetta', }, ['E'] = { exponent = 18, name = 'exa' , }, ['P'] = { exponent = 15, name = 'peta' , }, ['T'] = { exponent = 12, name = 'tera' , }, ['G'] = { exponent = 9, name = 'giga' , }, ['M'] = { exponent = 6, name = 'mega' , }, ['k'] = { exponent = 3, name = 'kilo' , }, ['h'] = { exponent = 2, name = 'hecto', }, ['da']= { exponent = 1, name = 'deca' , name_us = 'deka' }, ['d'] = { exponent = -1, name = 'deci' , }, ['c'] = { exponent = -2, name = 'centi', }, ['m'] = { exponent = -3, name = 'milli', }, ['μ'] = { exponent = -6, name = 'micro', }, -- key = 'GREEK SMALL LETTER MU' (U+03BC) utf-8 CE BC ['µ'] = { exponent = -6, name = 'micro', prefix = 'μ' }, -- key = 'MICRO SIGN' (U+00B5) utf-8 C2 B5 ['u'] = { exponent = -6, name = 'micro', prefix = 'μ' }, -- not an SI prefix, but allow for people typing this ['n'] = { exponent = -9, name = 'nano' , }, ['p'] = { exponent =-12, name = 'pico' , }, ['f'] = { exponent =-15, name = 'femto', }, ['a'] = { exponent =-18, name = 'atto' , }, ['z'] = { exponent =-21, name = 'zepto', }, ['y'] = { exponent =-24, name = 'yocto', }, ['r'] = { exponent =-27, name = 'ronto', }, ['q'] = { exponent =-30, name = 'quecto', }, } -- Some units can be qualified with one of the following prefixes, when linked. local customary_units = { { "US", link = "United States customary units" }, { "U.S.", link = "United States customary units" }, { "imperial", link = "Imperial units" }, { "imp", link = "Imperial units" }, } -- Names when using engineering notation (a prefix of "eN" where N is a number; example "e6km"). -- key = { "name", link = "article title", exponent = numeric_key_value } -- If lk=on and link is defined, the name of the number will appear as a link. local eng_scales = { ["3"] = { "thousand", exponent = 3 }, ["6"] = { "million", exponent = 6 }, ["9"] = { "billion", link = "1000000000 (number)", exponent = 9 }, ["12"] = { "trillion", link = "1000000000000 (number)", exponent = 12 }, ["15"] = { "quadrillion", link = "1000000000000000 (number)", exponent = 15 }, } local all_categories = { unit = "[[Category:Convert errors]]", option = "[[Category:Convert errors]]", warning = '[[Category:Convert invalid options]]', tracking = '[[Category:Convert tracking]]', } -- For some error messages, the following puts the wanted style around -- each unit code marked like '...%{ft%}...'. local unitcode_regex = '%%([{}])' local unitcode_replace = { ['{'] = '"', ['}'] = '"' } -- no longer need the more elaborate substitute used before 2013-09-28 -- All messages that may be displayed if a problem occurs. local all_messages = { -- Message format string: $1=title, $2=text, $3=category, $4=anchor. -- Each displayed message starts with "Convert:" so can easily locate by searching article. cvt_format = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[<i>[[Help:Convert messages#$4|<span title="Convert: $1">convert: $2</span>]]</i>]</sup>$3<span class="error"></span>', cvt_format2 = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[[Help:Convert messages#$4|<span title="Convert: $1">$2</span>]]</sup>$3<span class="error"></span>', cvt_format_preview = '<strong class="error">Error in convert: $1 [[Help:Convert messages#$4|(help)]]</strong>$3', -- Each of following messages is a table: -- { [1] = 'title', -- mouseover title text -- [2] = 'text', -- link text displayed in article -- [3] = 'category key', -- key to lookup category in all_categories -- [4] = 'anchor', -- anchor for link to relevant section on help page -- regex = gsub_regex, -- replace = gsub_table, -- } Mouseover title text Link text CatKey Anchor cvt_bad_input = { 'input "$1" must be a number and unit' , 'invalid input' , 'option', 'invalid_input' }, cvt_bad_num = { 'Value "$1" must be a number' , 'invalid number' , 'option', 'invalid_number' }, cvt_big_prec = { 'Precision "$1" is too large' , 'precision too large' , 'option', 'precision_too_large' }, cvt_invalid_num = { 'Number has overflowed' , 'number overflow' , 'option', 'number_overflow' }, cvt_no_num = { 'Needs the number to be converted' , 'needs a number' , 'option', 'needs_number' }, cvt_no_num2 = { 'Needs another number for a range' , 'needs another number', 'option', 'needs_another_number' }, cvt_bad_altitude = { '"$1" needs an integer' , 'invalid altitude' , 'option', 'invalid_altitude' }, cvt_bad_frac = { '"$1" needs an integer above 1' , 'invalid fraction' , 'option', 'invalid_fraction' }, cvt_bad_prec = { 'Precision "$1" must be an integer' , 'invalid precision' , 'option', 'invalid_precision' }, cvt_bad_sigfig = { '"$1" needs a positive integer' , 'invalid sigfig' , 'option', 'invalid_sigfig' }, cvt_empty_option = { 'Ignored empty option "$1"' , 'empty option' , 'option', 'empty_option' }, cvt_deprecated = { 'Option "$1" is deprecated' , '*' , 'option', 'deprecated_option', format = 'cvt_format2', nowarn = true }, cvt_no_spell = { 'Spelling is not available' , 'bug, ask for help' , 'option', 'ask_for_help' }, cvt_unknown_option = { 'Ignored invalid option "$1"' , 'invalid option' , 'option', 'invalid_option' }, cvt_wd_fail = { 'Unable to access Wikidata' , 'wikidata problem' , 'option', 'wikidata_problem' }, cvt_bad_default = { 'Unit "$1" has an invalid default' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_bad_unit = { 'Unit "$1" is invalid here' , 'unit invalid here' , 'unit' , 'unit_invalid_here' }, cvt_no_default = { 'Unit "$1" has no default output unit' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_no_unit = { 'Needs name of unit' , 'needs unit name' , 'unit' , 'needs_unit_name' }, cvt_unknown = { 'Unit name "$1" is not known' , 'unknown unit' , 'unit' , 'unknown_unit' }, cvt_should_be = { '$1' , 'ambiguous unit' , 'unit' , 'ambiguous_unit', regex = unitcode_regex, replace = unitcode_replace }, cvt_mismatch = { 'Cannot convert "$1" to "$2"' , 'unit mismatch' , 'unit' , 'unit_mismatch' }, cvt_bug_convert = { 'Bug: Cannot convert between specified units', 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_lookup = { 'Unit "$1" is incorrectly defined' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, } -- Text to join input value/unit with output value/unit. local disp_joins = { -- [1]=before output, [2]=after output, [3]=between outputs in a combination; default "; " -- [wantname] gives default abbr=off ["or"] = { " or " , "" , " or ", wantname = true }, ["sqbr-sp"] = { " [" , "]" }, ["sqbr-nbsp"] = { "&nbsp;[" , "]" }, ["comma"] = { ", " , "" , ", " }, ["semicolon"] = { "; " , "" }, ["slash-sp"] = { " / " , "" , wantname = true }, ["slash-nbsp"] = { "&nbsp;/ ", "" , wantname = true }, ["slash-nosp"] = { "/" , "" , wantname = true }, ["b"] = { " (" , ")" }, ["(or)"] = { " (" , ")", " or " }, ["br"] = { "<br />" , "" , wantname = true }, ["br()"] = { "<br />(" , ")", wantname = true }, } -- Text to separate values in a range. local range_types = { -- Specifying a table requires either: -- * "off" and "on" values (for "abbr=off" and "abbr=on"), or -- * "input" and "output" values (for LHS and RHS); -- other fields are optional. -- When "adj=on|abbr=off" applies, spaces in range text are replaced with hyphens. -- With "exception = true", that also occurs with "adj=on|abbr=on". -- If "adj" is defined here, that text (unchanged) is used with "adj=on". ["+"] = " + ", [","] = ",&nbsp;", [", and"] = ", and ", [", or"] = ", or ", ["by"] = " by ", ["-"] = "–", ["to about"] = " to about ", ["and"] = { off = " and ", on = " and ", exception = true }, ["and(-)"] = { input = " and ", output = "–" }, ["or"] = { off = " or " , on = " or " , exception = true }, ["to"] = { off = " to " , on = " to " , exception = true }, ["to(-)"] = { input = "&nbsp;to ", output = "–" }, ["+/-"] = { off = "&nbsp;±&nbsp;", on = "&nbsp;±&nbsp;", adj = "&nbsp;±&nbsp;", is_range_change = true }, ["by(x)"] = { input = " by ", output = " ×&nbsp;", out_range_x = true }, ["x"] = { off = " by ", on = " ×&nbsp;", abbr_range_x = true }, ["xx"] = "&nbsp;×&nbsp;", ["*"] = "×", ["/"] = "&thinsp;/&thinsp;", -- for a table of high/low temperatures with {{convert|83|/|63|F|disp=br()|abbr=values}} } local range_aliases = { -- ["alternative name for a range"] = "standard range name" ["–"] = "-", ["&ndash;"] = "-", ["×"] = "x", ["&times;"] = "x", ["±"] = "+/-", ["&plusmn;"] = "+/-", } -- Convert accepts range text delimited with whitespace, for example, {{convert|1 to 2|ft}}. -- In addition, the following "words" are accepted without spaces, for example, {{convert|1-2|ft}}. -- Words must be in correct order for searching, for example, 'x' after 'xx'. local range_words = { '-', '–', 'xx', 'x', '*' } local ranges = { types = range_types, aliases = range_aliases, words = range_words, } -- Valid option names. local en_option_name = { -- ["local text for option name"] = "en name used in this module" ["$"] = "$", ["abbr"] = "abbr", ["adj"] = "adj", ["altitude_ft"] = "altitude_ft", ["altitude_m"] = "altitude_m", ["comma"] = "comma", ["debug"] = "debug", ["disp"] = "disp", ["frac"] = "frac", ["input"] = "input", ["lang"] = "lang", ["lk"] = "lk", ["order"] = "order", ["qid"] = "qid", ["qual"] = "qual", ["qualifier"] = "qual", ["round"] = "round", ["sigfig"] = "sigfig", ["sing"] = "adj", -- "sing" is an old alias for "adj" ["sortable"] = "sortable", ["sp"] = "sp", ["spell"] = "spell", ["stylein"] = "stylein", ["styleout"] = "styleout", ["tracking"] = "tracking", } -- Valid option values. -- Convention: parms.opt_xxx refers to an option that is set here -- (not intended to be set by the template which invokes this module). -- Example: At enwiki, "abbr" includes: -- ["values"] = "opt_values" -- As a result, if the template uses abbr=values, Module:Convert sets: -- parms["opt_values"] = true -- parms["abbr"] = nil -- Therefore parms.abbr will be nil, or will have one of the listed values -- that do not start with "opt_". -- An option value of form "xxx?" is the same as "xxx" but shows the input as deprecated. local en_option_value = { ["$"] = 'TEXT', -- TEXT should be a currency symbol that will be used instead of "$" ["abbr"] = { -- ["local text for option value"] = "en value used in this module" ["def"] = "", -- ignored (some wrapper templates call convert with "abbr=def" to mean "default abbreviation") ["h"] = "on", -- abbr=on + use "h" for hand unit (default) ["hh"] = "opt_hand_hh", -- abbr=on + use "hh" for hand unit ["in"] = "in", -- use symbol for LHS unit ["none"] = "off", -- old name for "off" ["off"] = "off", -- use name for all units ["on"] = "on", -- use symbol for all units ["out"] = "out", -- use symbol for RHS unit (default) ["unit"] = "unit", -- abbr=on but abbreviate units only: e6km → million km (not ×10⁶ km) ["values"] = "opt_values", -- show only input and output numbers, not units ["~"] = "opt_also_symbol", -- show input unit symbol as well as name }, ["adj"] = { ["mid"] = "opt_adjectival, opt_adj_mid", -- adj=on with user-specified text after input unit (between input and output) ["off"] = "", -- ignored (off is the default) ["on"] = "opt_adjectival", -- unit name is singular and hyphenated ["pre"] = "opt_one_preunit", -- user-specified text before input unit ["ri0"] = "opt_ri=0", -- round input with precision = 0 ["ri1"] = "opt_ri=1", -- round input with precision = 1 ["ri2"] = "opt_ri=2", -- round input with precision = 2 ["ri3"] = "opt_ri=3", -- round input with precision = 3 }, ["altitude_ft"] = 'INTEGER', ["altitude_m"] = 'INTEGER', ["comma"] = { ["5"] = "opt_comma5", -- only use numsep grouping if 5 or more digits ["gaps"] = "opt_gaps", -- use gaps, not numsep, to separate groups of digits ["gaps3"] = "opt_gaps, opt_gaps3", -- group only in threes rather than default of no gap before a single digit after decimal mark ["off"] = "opt_nocomma", -- no numsep in input or output numbers }, ["debug"] = { ["yes"] = "opt_sortable_debug", -- make the normally hidden sort key visible }, ["disp"] = { ["5"] = "opt_round=5?", -- round output value to nearest 5 ["b"] = "b", -- join: '(...)' ["(or)"] = "(or)", -- join: '(...)' with 'or' between outputs in a combination ["br"] = "br", -- join: '<br />' ["br()"] = "br()", -- join: '<br />(...)' ["comma"] = "comma", -- join: ',' ["flip"] = "opt_flip", -- reverse order of input/output ["number"] = "opt_output_number_only", -- display output value (not input, and not output symbol/name) ["or"] = "or", -- join: 'or' ["out"] = "opt_output_only", ["output number only"] = "opt_output_number_only", ["output only"] = "opt_output_only", ["preunit"] = "opt_two_preunits", -- user-specified text before input and output units ["semicolon"] = "semicolon", -- join: ';' ["sqbr"] = "sqbr", -- join: '[...]' ["table"] = "opt_table", -- output is suitable for a table cell with align="right" ["tablecen"] = "opt_tablecen", -- output is suitable for a table cell with align="center" ["unit"] = "opt_input_unit_only", -- display input symbol/name (not output, and not input value) ["unit or text"] = "opt_input_unit_only, opt_ignore_error", -- display input symbol/name, or given unit code if not known ["unit2"] = "opt_output_unit_only", ["x"] = "x", -- join: <first>...<second> (user-specified text) }, ["frac"] = 'INTEGER', ["input"] = 'TEXT', -- TEXT should be value><space><unitcode> or <wikidata-property-id> ["lang"] = { -- language for output digits (both en and local digits are always accepted for input) ["en"] = "opt_lang_en", -- use en digits for numbers, regardless of local language ["local"] = "opt_lang_local", -- use local digits for numbers (default, although config can change default to en) }, ["lk"] = { ["in"] = "in", -- link LHS unit name or symbol ["off"] = "off", -- do not link: same as default except for hand unit ["on"] = "on", -- link all unit names or symbols (but not twice for the same unit) ["out"] = "out", -- link RHS unit name or symbol }, ["order"] = { ["flip"] = "opt_flip", -- reverse order of input/output ["out"] = "opt_order_out", -- do not show input; instead, use order in output combination, with the first output shown as the input }, ["qid"] = 'TEXT', -- TEXT should be a Wikidata Q item identifier ["qual"] = 'TEXT', -- TEXT should be a Wikidata Q item identifier ["round"] = { ["0.5"] = "opt_round=0.5", -- round output value to nearest 0.5 ["5"] = "opt_round=5", -- round output value to nearest 5 ["10"] = "opt_round=10", -- round output value to nearest 10 (same as but clearer than "|-1") ["25"] = "opt_round=25", -- round output value to nearest 25 ["50"] = "opt_round=50", -- round output value to nearest 50 ["each"] = "opt_round_each", -- using default precision in a range, round each output separately (default uses highest precision of each item in range) }, ["sigfig"] = 'INTEGER', ["sortable"] = { ["off"] = "", -- ignored (off is the default) ["on"] = "opt_sortable_on", -- output sort key for use in a sortable table, based on value from converting to a standard base unit ["debug"] = "opt_sortable_on, opt_sortable_debug", -- |sortable=debug is the same as |sortable=on|debug=yes }, ["sp"] = { ["us"] = "opt_sp_us", -- use U.S. spelling (like "meter" instead of default "metre") }, ["spell"] = { -- only English spelling is supported; not scientific notation; only some fractions ["in"] = "opt_spell_in", -- spell input value in words ["In"] = "opt_spell_in, opt_spell_upper", -- spell input value in words with first letter uppercase ["on"] = "opt_spell_in, opt_spell_out", -- spell input and output values in words ["On"] = "opt_spell_in, opt_spell_out, opt_spell_upper", -- same, with first letter of first word in result uppercase ["us"] = "opt_sp_us", -- use U.S. spelling; same as sp=us so spell=us also works }, ["stylein"] = 'TEXT', ["styleout"] = 'TEXT', ["tracking"] = 'TEXT', } local titles = { ["frac"] = "Fraction/styles.css", ["sfrac"] = "Sfrac/styles.css", } return { SIprefixes = SIprefixes, all_categories = all_categories, all_messages = all_messages, currency = { ['$'] = true, ['£'] = true, ['€'] = true, ['₱'] = true, ['₽'] = true, ['¥'] = true }, customary_units = customary_units, disp_joins = disp_joins, en_option_name = en_option_name, en_option_value = en_option_value, eng_scales = eng_scales, ranges = ranges, titles = titles, } ff98cf24da87736f3469f82401084ca608335d55 Module:Protection banner/config 828 340 670 2023-05-08T11:41:01Z wikipedia>Fayenatic london 0 Update categories from "fully-protected" to "fully protected", removing hyphen, per valid request at [[WP:CFDS]] Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } a20552ae38cb5253a4fa29aa126abc74215a589f Module:Convert/data 828 584 1156 2023-05-10T03:20:18Z wikipedia>Johnuniq 0 update from sandbox per [[Template talk:Convert#Module version 29]] Scribunto text/plain -- Conversion data used by [[Module:Convert]] which uses mw.loadData() for -- read-only access to this module so that it is loaded only once per page. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- -- These data tables follow: -- all_units all properties for a unit, including default output -- default_exceptions exceptions for default output ('kg' and 'g' have different defaults) -- link_exceptions exceptions for links ('kg' and 'g' have different links) -- -- These tables are generated by a script which reads the wikitext of a page that -- documents the required properties of each unit; see [[:en:Module:Convert/doc]]. --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local all_units = { ["Gy"] = { _name1 = "gray", _symbol = "Gy", utype = "absorbed radiation dose", scale = 1, prefixes = 1, default = "rad", link = "Gray (unit)", }, ["rad"] = { _name1 = "rad", _symbol = "rad", utype = "absorbed radiation dose", scale = 0.01, prefixes = 1, default = "Gy", link = "Rad (unit)", }, ["cm/s2"] = { name1 = "centimetre per second squared", name1_us = "centimeter per second squared", name2 = "centimetres per second squared", name2_us = "centimeters per second squared", symbol = "cm/s<sup>2</sup>", utype = "acceleration", scale = 0.01, default = "ft/s2", link = "Gal (unit)", }, ["ft/s2"] = { name1 = "foot per second squared", name2 = "feet per second squared", symbol = "ft/s<sup>2</sup>", utype = "acceleration", scale = 0.3048, default = "m/s2", }, ["g0"] = { name1 = "standard gravity", name2 = "standard gravities", symbol = "''g''<sub>0</sub>", utype = "acceleration", scale = 9.80665, default = "m/s2", }, ["g-force"] = { name2 = "''g''", symbol = "''g''", utype = "acceleration", scale = 9.80665, default = "m/s2", link = "g-force", }, ["km/hs"] = { name1 = "kilometre per hour per second", name1_us = "kilometer per hour per second", name2 = "kilometres per hour per second", name2_us = "kilometers per hour per second", symbol = "km/(h⋅s)", utype = "acceleration", scale = 0.27777777777777779, default = "mph/s", link = "Acceleration", }, ["km/s2"] = { name1 = "kilometre per second squared", name1_us = "kilometer per second squared", name2 = "kilometres per second squared", name2_us = "kilometers per second squared", symbol = "km/s<sup>2</sup>", utype = "acceleration", scale = 1000, default = "mph/s", link = "Acceleration", }, ["m/s2"] = { name1 = "metre per second squared", name1_us = "meter per second squared", name2 = "metres per second squared", name2_us = "meters per second squared", symbol = "m/s<sup>2</sup>", utype = "acceleration", scale = 1, default = "ft/s2", }, ["mph/s"] = { name1 = "mile per hour per second", name2 = "miles per hour per second", symbol = "mph/s", utype = "acceleration", scale = 0.44704, default = "km/hs", link = "Acceleration", }, ["km/h/s"] = { target = "km/hs", }, ["standard gravity"] = { target = "g0", }, ["1000sqft"] = { name1 = "thousand square feet", name2 = "thousand square feet", symbol = "1000&nbsp;sq&nbsp;ft", utype = "area", scale = 92.90304, default = "m2", link = "Square foot", }, ["a"] = { _name1 = "are", _symbol = "a", utype = "area", scale = 100, prefixes = 1, default = "sqft", link = "Hectare#Are", }, ["acre"] = { symbol = "acre", usename = 1, utype = "area", scale = 4046.8564224, default = "ha", subdivs = { ["rood"] = { 4, default = "ha" }, ["sqperch"] = { 160, default = "ha" } }, }, ["acre-sing"] = { target = "acre", }, ["arpent"] = { symbol = "arpent", usename = 1, utype = "area", scale = 3418.89, default = "ha", }, ["cda"] = { name1 = "cuerda", symbol = "cda", utype = "area", scale = 3930.395625, default = "ha acre", }, ["daa"] = { name1 = "decare", symbol = "daa", utype = "area", scale = 1000, default = "km2 sqmi", }, ["dunam"] = { symbol = "dunam", usename = 1, utype = "area", scale = 1000, default = "km2 sqmi", }, ["dunum"] = { symbol = "dunum", usename = 1, utype = "area", scale = 1000, default = "km2 sqmi", link = "Dunam", }, ["ha"] = { name1 = "hectare", symbol = "ha", utype = "area", scale = 10000, default = "acre", }, ["hectare"] = { name1 = "hectare", symbol = "ha", usename = 1, utype = "area", scale = 10000, default = "acre", }, ["Irish acre"] = { name1 = "Irish acre", symbol = "Irish&nbsp;acres", utype = "area", scale = 6555.2385024, default = "ha", link = "Acre (Irish)", }, ["m2"] = { _name1 = "square metre", _name1_us= "square meter", _symbol = "m<sup>2</sup>", prefix_position= 8, utype = "area", scale = 1, prefixes = 2, default = "sqft", link = "Square metre", }, ["pondemaat"] = { name1 = "pondemaat", name2 = "pondemaat", symbol = "pond", utype = "area", scale = 3674.363358816, default = "m2", link = ":nl:pondemaat", }, ["pyeong"] = { name2 = "pyeong", symbol = "pyeong", usename = 1, utype = "area", scale = 3.3057851239669422, default = "m2", }, ["rai"] = { name2 = "rai", symbol = "rai", utype = "area", scale = 1600, default = "m2", link = "Rai (unit)", }, ["rood"] = { symbol = "rood", usename = 1, utype = "area", scale = 1011.7141056, default = "sqft m2", subdivs = { ["sqperch"] = { 40, default = "m2" } }, link = "Rood (unit)", }, ["sqfoot"] = { name1 = "square foot", name2 = "square foot", symbol = "sq&nbsp;ft", utype = "area", scale = 0.09290304, default = "m2", }, ["sqft"] = { name1 = "square foot", name2 = "square feet", symbol = "sq&nbsp;ft", utype = "area", scale = 0.09290304, default = "m2", }, ["sqin"] = { name1 = "square inch", name2 = "square inches", symbol = "sq&nbsp;in", utype = "area", scale = 0.00064516, default = "cm2", }, ["sqmi"] = { name1 = "square mile", symbol = "sq&nbsp;mi", utype = "area", scale = 2589988.110336, default = "km2", }, ["sqnmi"] = { name1 = "square nautical mile", symbol = "sq&nbsp;nmi", utype = "area", scale = 3429904, default = "km2 sqmi", link = "Nautical mile", }, ["sqperch"] = { name2 = "perches", symbol = "perch", usename = 1, utype = "area", scale = 25.29285264, default = "m2", link = "Rod (unit)#Area and volume", }, ["sqverst"] = { symbol = "square verst", usename = 1, utype = "area", scale = 1138062.24, default = "km2 sqmi", link = "Verst", }, ["sqyd"] = { name1 = "square yard", symbol = "sq&nbsp;yd", utype = "area", scale = 0.83612736, default = "m2", }, ["tsubo"] = { name2 = "tsubo", symbol = "tsubo", usename = 1, utype = "area", scale = 3.3057851239669422, default = "m2", link = "Japanese units of measurement#Area", }, ["acres"] = { target = "acre", }, ["are"] = { target = "a", }, ["decare"] = { target = "daa", }, ["foot2"] = { target = "sqfoot", }, ["ft2"] = { target = "sqft", }, ["in2"] = { target = "sqin", symbol = "in<sup>2</sup>", }, ["km²"] = { target = "km2", }, ["mi2"] = { target = "sqmi", }, ["million acre"] = { target = "e6acre", }, ["million acres"] = { target = "e6acre", }, ["million hectares"] = { target = "e6ha", }, ["m²"] = { target = "m2", }, ["nmi2"] = { target = "sqnmi", }, ["pond"] = { target = "pondemaat", }, ["sq arp"] = { target = "arpent", }, ["sqkm"] = { target = "km2", }, ["sqm"] = { target = "m2", }, ["square verst"] = { target = "sqverst", }, ["verst2"] = { target = "sqverst", }, ["yd2"] = { target = "sqyd", }, ["m2/ha"] = { name1 = "square metre per hectare", name1_us = "square meter per hectare", name2 = "square metres per hectare", name2_us = "square meters per hectare", symbol = "m<sup>2</sup>/ha", utype = "area per unit area", scale = 0.0001, default = "sqft/acre", link = "Basal area", }, ["sqft/acre"] = { name1 = "square foot per acre", name2 = "square feet per acre", symbol = "sq&nbsp;ft/acre", utype = "area per unit area", scale = 2.295684113865932e-5, default = "m2/ha", link = "Basal area", }, ["cent"] = { name1 = "cent", symbol = "¢", utype = "cent", scale = 1, default = "cent", link = "Cent (currency)", }, ["¢"] = { target = "cent", }, ["A.h"] = { name1 = "ampere hour", symbol = "A⋅h", utype = "charge", scale = 3600, default = "coulomb", }, ["coulomb"] = { _name1 = "coulomb", _symbol = "C", utype = "charge", scale = 1, prefixes = 1, default = "e", link = "Coulomb", }, ["e"] = { name1 = "elementary charge", symbol = "''e''", utype = "charge", scale = 1.602176487e-19, default = "coulomb", }, ["g-mol"] = { name1 = "gram-mole", symbol = "g&#8209;mol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["gmol"] = { name1 = "gram-mole", symbol = "gmol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["kmol"] = { name1 = "kilomole", symbol = "kmol", utype = "chemical amount", scale = 1000, default = "lbmol", link = "Mole (unit)", }, ["lb-mol"] = { name1 = "pound-mole", symbol = "lb&#8209;mol", utype = "chemical amount", scale = 453.59237, default = "mol", }, ["lbmol"] = { name1 = "pound-mole", symbol = "lbmol", utype = "chemical amount", scale = 453.59237, default = "mol", }, ["mol"] = { name1 = "mole", symbol = "mol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["kgCO2/L"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg(CO<sub>2</sub>)/L", utype = "co2 per unit volume", scale = 1000, default = "lbCO2/USgal", link = "Exhaust gas", }, ["lbCO2/USgal"] = { name1 = "pound per US gallon", name2 = "pounds per US gallon", symbol = "lbCO2/US&nbsp;gal", utype = "co2 per unit volume", scale = 119.82642731689663, default = "kgCO2/L", link = "Exhaust gas", }, ["oz/lb"] = { per = { "oz", "lb" }, utype = "concentration", default = "mg/kg", }, ["mg/kg"] = { per = { "mg", "kg" }, utype = "concentration", default = "oz/lb", }, ["g/dm3"] = { name1 = "gram per cubic decimetre", name1_us = "gram per cubic decimeter", name2 = "grams per cubic decimetre", name2_us = "grams per cubic decimeter", symbol = "g/dm<sup>3</sup>", utype = "density", scale = 1, default = "kg/m3", link = "Density", }, ["g/L"] = { name1 = "gram per litre", name1_us = "gram per liter", name2 = "grams per litre", name2_us = "grams per liter", symbol = "g/L", utype = "density", scale = 1, default = "lb/cuin", link = "Density", }, ["g/mL"] = { name1 = "gram per millilitre", name1_us = "gram per milliliter", name2 = "grams per millilitre", name2_us = "grams per milliliter", symbol = "g/mL", utype = "density", scale = 1000, default = "lb/cuin", link = "Density", }, ["g/ml"] = { name1 = "gram per millilitre", name1_us = "gram per milliliter", name2 = "grams per millilitre", name2_us = "grams per milliliter", symbol = "g/ml", utype = "density", scale = 1000, default = "lb/cuin", link = "Density", }, ["kg/dm3"] = { name1 = "kilogram per cubic decimetre", name1_us = "kilogram per cubic decimeter", name2 = "kilograms per cubic decimetre", name2_us = "kilograms per cubic decimeter", symbol = "kg/dm<sup>3</sup>", utype = "density", scale = 1000, default = "lb/cuft", link = "Density", }, ["kg/L"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg/L", utype = "density", scale = 1000, default = "lb/USgal", link = "Density", }, ["kg/l"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg/l", utype = "density", scale = 1000, default = "lb/USgal", link = "Density", }, ["kg/m3"] = { name1 = "kilogram per cubic metre", name1_us = "kilogram per cubic meter", name2 = "kilograms per cubic metre", name2_us = "kilograms per cubic meter", symbol = "kg/m<sup>3</sup>", utype = "density", scale = 1, default = "lb/cuyd", link = "Density", }, ["lb/cuft"] = { name1 = "pound per cubic foot", name2 = "pounds per cubic foot", symbol = "lb/cu&nbsp;ft", utype = "density", scale = 16.018463373960142, default = "g/cm3", link = "Density", }, ["lb/cuin"] = { name1 = "pound per cubic inch", name2 = "pounds per cubic inch", symbol = "lb/cu&nbsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["lb/cuyd"] = { name1 = "pound per cubic yard", name2 = "pounds per cubic yard", symbol = "lb/cu&nbsp;yd", utype = "density", scale = 0.5932764212577829, default = "kg/m3", link = "Density", }, ["lb/impgal"] = { name1 = "pound per imperial gallon", name2 = "pounds per imperial gallon", symbol = "lb/imp&nbsp;gal", utype = "density", scale = 99.776372663101697, default = "kg/L", link = "Density", }, ["lb/in3"] = { name1 = "pound per cubic inch", name2 = "pounds per cubic inch", symbol = "lb/cu&thinsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["lb/U.S.gal"] = { name1 = "pound per U.S. gallon", name2 = "pounds per U.S. gallon", symbol = "lb/U.S.&nbsp;gal", utype = "density", scale = 119.82642731689663, default = "kg/L", link = "Density", }, ["lb/USbu"] = { name1 = "pound per US bushel", name2 = "pounds per US bushel", symbol = "lb/US&nbsp;bu", utype = "density", scale = 12.871859780974471, default = "kg/m3", link = "Bushel", }, ["lb/USgal"] = { name1 = "pound per US gallon", name2 = "pounds per US gallon", symbol = "lb/US&nbsp;gal", utype = "density", scale = 119.82642731689663, default = "kg/L", link = "Density", }, ["lbm/cuin"] = { name1 = "pound mass per cubic inch", name2 = "pounds mass per cubic inch", symbol = "lbm/cu&thinsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["mg/L"] = { name1 = "milligram per litre", name1_us = "milligram per liter", name2 = "milligrams per litre", name2_us = "milligrams per liter", symbol = "mg/L", utype = "density", scale = 0.001, default = "lb/cuin", link = "Density", }, ["oz/cuin"] = { name1 = "ounce per cubic inch", name2 = "ounces per cubic inch", symbol = "oz/cu&nbsp;in", utype = "density", scale = 1729.9940443876951, default = "g/cm3", link = "Density", }, ["g/cm3"] = { per = { "g", "cm3" }, utype = "density", default = "lb/cuin", }, ["g/m3"] = { per = { "g", "m3" }, utype = "density", default = "lb/cuyd", link = "Density", }, ["Mg/m3"] = { per = { "Mg", "m3" }, utype = "density", default = "lb/cuft", }, ["mg/l"] = { per = { "mg", "ll" }, utype = "density", default = "oz/cuin", }, ["μg/dL"] = { per = { "μg", "dL" }, utype = "density", default = "lb/cuin", }, ["μg/l"] = { per = { "μg", "ll" }, utype = "density", default = "oz/cuin", }, ["lb/ft3"] = { target = "lb/cuft", }, ["lb/yd3"] = { target = "lb/cuyd", }, ["lbm/in3"] = { target = "lbm/cuin", }, ["mcg/dL"] = { target = "μg/dL", }, ["oz/in3"] = { target = "oz/cuin", }, ["ug/dL"] = { target = "μg/dL", }, ["ug/l"] = { target = "μg/l", }, ["B.O.T.U."] = { name1 = "Board of Trade Unit", symbol = "B.O.T.U.", utype = "energy", scale = 3600000, default = "MJ", link = "Kilowatt-hour", }, ["bboe"] = { name1 = "barrel of oil equivalent", name2 = "barrels of oil equivalent", symbol = "bboe", utype = "energy", scale = 6117863200, default = "GJ", }, ["BOE"] = { name1 = "barrel of oil equivalent", name2 = "barrels of oil equivalent", symbol = "BOE", utype = "energy", scale = 6117863200, default = "GJ", }, ["BTU"] = { name1 = "British thermal unit", symbol = "BTU", utype = "energy", scale = 1055.05585262, default = "kJ", }, ["Btu"] = { name1 = "British thermal unit", symbol = "Btu", utype = "energy", scale = 1055.05585262, default = "kJ", }, ["BTU-39F"] = { name1 = "British thermal unit (39°F)", name2 = "British thermal units (39°F)", symbol = "BTU<sub>39°F</sub>", utype = "energy", scale = 1059.67, default = "kJ", link = "British thermal unit", }, ["Btu-39F"] = { name1 = "British thermal unit (39°F)", name2 = "British thermal units (39°F)", symbol = "Btu<sub>39°F</sub>", utype = "energy", scale = 1059.67, default = "kJ", link = "British thermal unit", }, ["BTU-59F"] = { name1 = "British thermal unit (59°F)", name2 = "British thermal units (59°F)", symbol = "BTU<sub>59°F</sub>", utype = "energy", scale = 1054.804, default = "kJ", link = "British thermal unit", }, ["Btu-59F"] = { name1 = "British thermal unit (59°F)", name2 = "British thermal units (59°F)", symbol = "Btu<sub>59°F</sub>", utype = "energy", scale = 1054.804, default = "kJ", link = "British thermal unit", }, ["BTU-60F"] = { name1 = "British thermal unit (60°F)", name2 = "British thermal units (60°F)", symbol = "BTU<sub>60°F</sub>", utype = "energy", scale = 1054.68, default = "kJ", link = "British thermal unit", }, ["Btu-60F"] = { name1 = "British thermal unit (60°F)", name2 = "British thermal units (60°F)", symbol = "Btu<sub>60°F</sub>", utype = "energy", scale = 1054.68, default = "kJ", link = "British thermal unit", }, ["BTU-63F"] = { name1 = "British thermal unit (63°F)", name2 = "British thermal units (63°F)", symbol = "BTU<sub>63°F</sub>", utype = "energy", scale = 1054.6, default = "kJ", link = "British thermal unit", }, ["Btu-63F"] = { name1 = "British thermal unit (63°F)", name2 = "British thermal units (63°F)", symbol = "Btu<sub>63°F</sub>", utype = "energy", scale = 1054.6, default = "kJ", link = "British thermal unit", }, ["BTU-ISO"] = { name1 = "British thermal unit (ISO)", name2 = "British thermal units (ISO)", symbol = "BTU<sub>ISO</sub>", utype = "energy", scale = 1055.056, default = "kJ", link = "British thermal unit", }, ["Btu-ISO"] = { target = "BTU-ISO", }, ["BTU-IT"] = { name1 = "British thermal unit (IT)", name2 = "British thermal units (IT)", symbol = "BTU<sub>IT</sub>", utype = "energy", scale = 1055.05585262, default = "kJ", link = "British thermal unit", }, ["Btu-IT"] = { name1 = "British thermal unit (IT)", name2 = "British thermal units (IT)", symbol = "Btu<sub>IT</sub>", utype = "energy", scale = 1055.05585262, default = "kJ", link = "British thermal unit", }, ["BTU-mean"] = { name1 = "British thermal unit (mean)", name2 = "British thermal units (mean)", symbol = "BTU<sub>mean</sub>", utype = "energy", scale = 1055.87, default = "kJ", link = "British thermal unit", }, ["Btu-mean"] = { name1 = "British thermal unit (mean)", name2 = "British thermal units (mean)", symbol = "Btu<sub>mean</sub>", utype = "energy", scale = 1055.87, default = "kJ", link = "British thermal unit", }, ["BTU-th"] = { name1 = "British thermal unit (thermochemical)", name2 = "British thermal units (thermochemical)", symbol = "BTU<sub>th</sub>", utype = "energy", scale = 1054.35026444, default = "kJ", link = "British thermal unit", }, ["Btu-th"] = { name1 = "British thermal unit (thermochemical)", name2 = "British thermal units (thermochemical)", symbol = "Btu<sub>th</sub>", utype = "energy", scale = 1054.35026444, default = "kJ", link = "British thermal unit", }, ["Cal"] = { name1 = "calorie", symbol = "Cal", utype = "energy", scale = 4184, default = "kJ", }, ["cal"] = { name1 = "calorie", symbol = "cal", utype = "energy", scale = 4.184, default = "J", }, ["Cal-15"] = { name1 = "Calorie (15°C)", name2 = "Calories (15°C)", symbol = "Cal<sub>15</sub>", utype = "energy", scale = 4185.8, default = "kJ", link = "Calorie", }, ["cal-15"] = { name1 = "calorie (15°C)", name2 = "calories (15°C)", symbol = "cal<sub>15</sub>", utype = "energy", scale = 4.1858, default = "J", link = "Calorie", }, ["Cal-IT"] = { name1 = "Calorie (International Steam Table)", name2 = "Calories (International Steam Table)", symbol = "Cal<sub>IT</sub>", utype = "energy", scale = 4186.8, default = "kJ", link = "Calorie", }, ["cal-IT"] = { name1 = "calorie (International Steam Table)", name2 = "calories (International Steam Table)", symbol = "cal<sub>IT</sub>", utype = "energy", scale = 4.1868, default = "J", link = "Calorie", }, ["Cal-th"] = { name1 = "Calorie (thermochemical)", name2 = "Calories (thermochemical)", symbol = "Cal<sub>th</sub>", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["cal-th"] = { name1 = "calorie (thermochemical)", name2 = "calories (thermochemical)", symbol = "cal<sub>th</sub>", utype = "energy", scale = 4.184, default = "J", link = "Calorie", }, ["CHU-IT"] = { name1 = "Celsius heat unit (International Table)", name2 = "Celsius heat units (International Table)", symbol = "CHU<sub>IT</sub>", utype = "energy", scale = 1899.100534716, default = "kJ", link = "Conversion of units#Energy", }, ["cufootnaturalgas"] = { name1 = "cubic foot of natural gas", name2 = "cubic foot of natural gas", symbol = "cuftnaturalgas", usename = 1, utype = "energy", scale = 1055055.85262, default = "MJ", link = "Conversion of units#Energy", }, ["cuftnaturalgas"] = { name1 = "cubic foot of natural gas", name2 = "cubic feet of natural gas", symbol = "cuftnaturalgas", usename = 1, utype = "energy", scale = 1055055.85262, default = "MJ", link = "Conversion of units#Energy", }, ["Eh"] = { name1 = "Hartree", symbol = "''E''<sub>h</sub>", utype = "energy", scale = 4.35974417e-18, default = "eV", }, ["erg"] = { symbol = "erg", utype = "energy", scale = 0.0000001, default = "μJ", }, ["eV"] = { name1 = "electronvolt", symbol = "eV", utype = "energy", scale = 1.602176487e-19, default = "aJ", }, ["feV"] = { name1 = "femtoelectronvolt", symbol = "feV", utype = "energy", scale = 1.602176487e-34, default = "yJ", link = "Electronvolt", }, ["foe"] = { symbol = "foe", utype = "energy", scale = 1e44, default = "YJ", link = "Foe (unit)", }, ["ftlb"] = { name1 = "foot-pound", symbol = "ft⋅lb", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftlb-f"] = { name1 = "foot-pound force", name2 = "foot-pounds force", symbol = "ft⋅lb<sub>f</sub>", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftlbf"] = { name1 = "foot-pound force", name2 = "foot-pounds force", symbol = "ft⋅lbf", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftpdl"] = { name1 = "foot-poundal", symbol = "ft⋅pdl", utype = "energy", scale = 0.0421401100938048, default = "J", }, ["GeV"] = { name1 = "gigaelectronvolt", symbol = "GeV", utype = "energy", scale = 1.602176487e-10, default = "nJ", link = "Electronvolt", }, ["gTNT"] = { name2 = "grams of TNT", symbol = "gram of TNT", usename = 1, utype = "energy", scale = 4184, default = "kJ", link = "TNT equivalent", }, ["Gtoe"] = { name1 = "gigatonne of oil equivalent", name2 = "gigatonnes of oil equivalent", symbol = "Gtoe", utype = "energy", scale = 4.1868e19, default = "EJ", link = "Tonne of oil equivalent", }, ["GtonTNT"] = { name2 = "gigatons of TNT", symbol = "gigaton of TNT", usename = 1, utype = "energy", scale = 4.184e18, default = "EJ", link = "TNT equivalent", }, ["GtTNT"] = { name2 = "gigatonnes of TNT", symbol = "gigatonne of TNT", usename = 1, utype = "energy", scale = 4.184e18, default = "EJ", link = "TNT equivalent", }, ["GW.h"] = { name1 = "gigawatt-hour", symbol = "GW⋅h", utype = "energy", scale = 3.6e12, default = "TJ", link = "Kilowatt-hour", }, ["GWh"] = { name1 = "gigawatt-hour", symbol = "GWh", utype = "energy", scale = 3.6e12, default = "TJ", link = "Kilowatt-hour", }, ["hph"] = { name1 = "horsepower-hour", symbol = "hp⋅h", utype = "energy", scale = 2684519.537696172792, default = "kWh", link = "Horsepower", }, ["inlb"] = { name1 = "inch-pound", symbol = "in⋅lb", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inlb-f"] = { name1 = "inch-pound force", name2 = "inch-pounds force", symbol = "in⋅lb<sub>f</sub>", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inlbf"] = { name1 = "inch-pound force", name2 = "inch-pounds force", symbol = "in⋅lbf", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inoz-f"] = { name1 = "inch-ounce force", name2 = "inch-ounces force", symbol = "in⋅oz<sub>f</sub>", utype = "energy", alttype = "torque", scale = 0.00706155181422604375, default = "mJ", link = "Foot-pound (energy)", }, ["inozf"] = { name1 = "inch-ounce force", name2 = "inch-ounces force", symbol = "in⋅ozf", utype = "energy", alttype = "torque", scale = 0.00706155181422604375, default = "mJ", link = "Foot-pound (energy)", }, ["J"] = { _name1 = "joule", _symbol = "J", utype = "energy", scale = 1, prefixes = 1, default = "cal", link = "Joule", }, ["kBOE"] = { name1 = "kilo barrel of oil equivalent", name2 = "kilo barrels of oil equivalent", symbol = "kBOE", utype = "energy", scale = 6.1178632e12, default = "TJ", link = "Barrel of oil equivalent", }, ["kcal"] = { name1 = "kilocalorie", symbol = "kcal", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["kcal-15"] = { name1 = "kilocalorie (15°C)", name2 = "kilocalories (15°C)", symbol = "kcal<sub>15</sub>", utype = "energy", scale = 4185.8, default = "kJ", link = "Calorie", }, ["kcal-IT"] = { name1 = "kilocalorie (International Steam Table)", name2 = "kilocalories (International Steam Table)", symbol = "kcal<sub>IT</sub>", utype = "energy", scale = 4186.8, default = "kJ", link = "Calorie", }, ["kcal-th"] = { name1 = "kilocalorie (thermochemical)", name2 = "kilocalories (thermochemical)", symbol = "kcal<sub>th</sub>", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["kerg"] = { name1 = "kiloerg", symbol = "kerg", utype = "energy", scale = 0.0001, default = "mJ", link = "Erg", }, ["keV"] = { name1 = "kiloelectronvolt", symbol = "keV", utype = "energy", scale = 1.602176487e-16, default = "fJ", link = "Electronvolt", }, ["kgTNT"] = { name2 = "kilograms of TNT", symbol = "kilogram of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["kt(TNT)"] = { name1 = "kilotonne", name1_us = "kiloton", symbol = "kt", utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["ktoe"] = { name1 = "kilotonne of oil equivalent", name2 = "kilotonnes of oil equivalent", symbol = "ktoe", utype = "energy", scale = 4.1868e13, default = "TJ", link = "Tonne of oil equivalent", }, ["ktonTNT"] = { name1 = "kiloton of TNT", name2 = "kilotons of TNT", symbol = "kt", utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["ktTNT"] = { name2 = "kilotonnes of TNT", symbol = "kilotonne of TNT", usename = 1, utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["kW.h"] = { name1 = "kilowatt-hour", symbol = "kW⋅h", utype = "energy", scale = 3600000, default = "MJ", }, ["kWh"] = { name1 = "kilowatt-hour", symbol = "kWh", utype = "energy", scale = 3600000, default = "MJ", }, ["Mcal"] = { name1 = "megacalorie", symbol = "Mcal", utype = "energy", scale = 4184000, default = "MJ", link = "Calorie", }, ["mcal"] = { name1 = "millicalorie", symbol = "mcal", utype = "energy", scale = 0.004184, default = "mJ", link = "Calorie", }, ["Mcal-15"] = { name1 = "megacalorie (15°C)", name2 = "megacalories (15°C)", symbol = "Mcal<sub>15</sub>", utype = "energy", scale = 4185800, default = "MJ", link = "Calorie", }, ["mcal-15"] = { name1 = "millicalorie (15°C)", name2 = "millicalories (15°C)", symbol = "mcal<sub>15</sub>", utype = "energy", scale = 0.0041858, default = "mJ", link = "Calorie", }, ["Mcal-IT"] = { name1 = "megacalorie (International Steam Table)", name2 = "megacalories (International Steam Table)", symbol = "Mcal<sub>IT</sub>", utype = "energy", scale = 4186800, default = "MJ", link = "Calorie", }, ["mcal-IT"] = { name1 = "millicalorie (International Steam Table)", name2 = "millicalories (International Steam Table)", symbol = "mcal<sub>IT</sub>", utype = "energy", scale = 0.0041868, default = "mJ", link = "Calorie", }, ["Mcal-th"] = { name1 = "megacalorie (thermochemical)", name2 = "megacalories (thermochemical)", symbol = "Mcal<sub>th</sub>", utype = "energy", scale = 4184000, default = "MJ", link = "Calorie", }, ["mcal-th"] = { name1 = "millicalorie (thermochemical)", name2 = "millicalories (thermochemical)", symbol = "mcal<sub>th</sub>", utype = "energy", scale = 0.004184, default = "mJ", link = "Calorie", }, ["Merg"] = { name1 = "megaerg", symbol = "Merg", utype = "energy", scale = 0.1, default = "J", link = "Erg", }, ["merg"] = { name1 = "millierg", symbol = "merg", utype = "energy", scale = 0.0000000001, default = "μJ", link = "Erg", }, ["MeV"] = { name1 = "megaelectronvolt", symbol = "MeV", utype = "energy", scale = 1.602176487e-13, default = "pJ", link = "Electronvolt", }, ["meV"] = { name1 = "millielectronvolt", symbol = "meV", utype = "energy", scale = 1.602176487e-22, default = "zJ", link = "Electronvolt", }, ["MMBtu"] = { name1 = "million British thermal units", name2 = "million British thermal units", symbol = "MMBtu", utype = "energy", scale = 1055055852.62, default = "GJ", link = "British thermal unit", }, ["Mt(TNT)"] = { name1 = "megatonne", name1_us = "megaton", symbol = "Mt", utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["Mtoe"] = { name1 = "megatonne of oil equivalent", name2 = "megatonnes of oil equivalent", symbol = "Mtoe", utype = "energy", scale = 4.1868e16, default = "PJ", link = "Tonne of oil equivalent", }, ["MtonTNT"] = { name1 = "megaton of TNT", name2 = "megatons of TNT", symbol = "Mt", utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["mtonTNT"] = { name2 = "millitons of TNT", symbol = "milliton of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["MtTNT"] = { name2 = "megatonnes of TNT", symbol = "megatonne of TNT", usename = 1, utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["mtTNT"] = { name2 = "millitonnes of TNT", symbol = "millitonne of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["MW.h"] = { name1 = "megawatt-hour", symbol = "MW⋅h", utype = "energy", scale = 3600000000, default = "GJ", link = "Kilowatt-hour", }, ["mW.h"] = { name1 = "milliwatt-hour", symbol = "mW⋅h", utype = "energy", scale = 3.6, default = "J", link = "Kilowatt-hour", }, ["MWh"] = { name1 = "megawatt-hour", symbol = "MWh", utype = "energy", scale = 3600000000, default = "GJ", link = "Kilowatt-hour", }, ["mWh"] = { name1 = "milliwatt-hour", symbol = "mWh", utype = "energy", scale = 3.6, default = "J", link = "Kilowatt-hour", }, ["neV"] = { name1 = "nanoelectronvolt", symbol = "neV", utype = "energy", scale = 1.602176487e-28, default = "yJ", link = "Electronvolt", }, ["PeV"] = { name1 = "petaelectronvolt", symbol = "PeV", utype = "energy", scale = 0.0001602176487, default = "mJ", link = "Electronvolt", }, ["peV"] = { name1 = "picoelectronvolt", symbol = "peV", utype = "energy", scale = 1.602176487e-31, default = "yJ", link = "Electronvolt", }, ["PSh"] = { name1 = "Pferdestärkenstunde", symbol = "PSh", utype = "energy", scale = 2647795.5, default = "kWh", }, ["quad"] = { name1 = "quadrillion British thermal units", name2 = "quadrillion British thermal units", symbol = "quad", utype = "energy", scale = 1.054804e18, default = "EJ", link = "Quad (unit)", }, ["Ry"] = { name1 = "rydberg", symbol = "Ry", utype = "energy", scale = 2.1798741e-18, default = "eV", link = "Rydberg constant", }, ["scf"] = { name1 = "standard cubic foot", name2 = "standard cubic feet", symbol = "scf", utype = "energy", scale = 2869.2044809344, default = "kJ", }, ["scfoot"] = { name1 = "standard cubic foot", name2 = "standard cubic foot", symbol = "scf", utype = "energy", scale = 2869.2044809344, default = "kJ", }, ["t(TNT)"] = { name1 = "tonne", name1_us = "ton", symbol = "t", utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["TeV"] = { name1 = "teraelectronvolt", symbol = "TeV", utype = "energy", scale = 1.602176487e-7, default = "μJ", link = "Electronvolt", }, ["th"] = { name1 = "thermie", symbol = "th", utype = "energy", scale = 4186800, default = "MJ", link = "Conversion of units#Energy", }, ["thm-EC"] = { name1 = "therm (EC)", name2 = "therms (EC)", symbol = "thm (EC)", utype = "energy", scale = 105506000, default = "MJ", link = "Therm", }, ["thm-UK"] = { name1 = "therm (UK)", name2 = "therms (UK)", symbol = "thm (UK)", utype = "energy", scale = 105505585.257348, default = "MJ", link = "Therm", }, ["thm-US"] = { name1 = "therm (US)", name1_us = "therm (U.S.)", name2 = "therms (US)", name2_us = "therms (U.S.)", symbol = "thm (US)", sym_us = "thm (U.S.)", utype = "energy", scale = 105480400, default = "MJ", link = "Therm", }, ["toe"] = { name1 = "tonne of oil equivalent", name2 = "tonnes of oil equivalent", symbol = "toe", utype = "energy", scale = 41868000000, default = "GJ", }, ["tonTNT"] = { name2 = "tons of TNT", symbol = "ton of TNT", usename = 1, utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["tTNT"] = { name2 = "tonnes of TNT", symbol = "tonne of TNT", usename = 1, utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["TtonTNT"] = { name2 = "teratons of TNT", symbol = "teraton of TNT", usename = 1, utype = "energy", scale = 4.184e21, default = "ZJ", link = "TNT equivalent", }, ["TtTNT"] = { name2 = "teratonnes of TNT", symbol = "teratonne of TNT", usename = 1, utype = "energy", scale = 4.184e21, default = "ZJ", link = "TNT equivalent", }, ["TW.h"] = { name1 = "terawatt-hour", symbol = "TW⋅h", utype = "energy", scale = 3.6e15, default = "PJ", link = "Kilowatt-hour", }, ["TWh"] = { name1 = "terawatt-hour", symbol = "TWh", utype = "energy", scale = 3.6e15, default = "PJ", link = "Kilowatt-hour", }, ["W.h"] = { name1 = "watt-hour", symbol = "W⋅h", utype = "energy", scale = 3600, default = "kJ", link = "Kilowatt-hour", }, ["Wh"] = { name1 = "watt-hour", symbol = "Wh", utype = "energy", scale = 3600, default = "kJ", link = "Kilowatt-hour", }, ["μerg"] = { name1 = "microerg", symbol = "μerg", utype = "energy", scale = 1e-13, default = "nJ", link = "Erg", }, ["μeV"] = { name1 = "microelectronvolt", symbol = "μeV", utype = "energy", scale = 1.602176487e-25, default = "yJ", link = "Electronvolt", }, ["μW.h"] = { name1 = "microwatt-hour", symbol = "μW⋅h", utype = "energy", scale = 0.0036, default = "mJ", link = "Kilowatt-hour", }, ["μWh"] = { name1 = "microwatt-hour", symbol = "μWh", utype = "energy", scale = 0.0036, default = "mJ", link = "Kilowatt-hour", }, ["-kW.h"] = { target = "kW.h", link = "Kilowatt hour", }, ["btu"] = { target = "BTU", }, ["Calorie"] = { target = "Cal", }, ["ft.lbf"] = { target = "ftlbf", }, ["ft·lbf"] = { target = "ftlbf", }, ["g-cal-15"] = { target = "cal-15", }, ["g-cal-IT"] = { target = "cal-IT", }, ["g-cal-th"] = { target = "cal-th", }, ["g-kcal-15"] = { target = "kcal-15", }, ["g-kcal-IT"] = { target = "kcal-IT", }, ["g-kcal-th"] = { target = "kcal-th", }, ["g-Mcal-15"] = { target = "Mcal-15", }, ["g-mcal-15"] = { target = "mcal-15", }, ["g-Mcal-IT"] = { target = "Mcal-IT", }, ["g-mcal-IT"] = { target = "mcal-IT", }, ["g-Mcal-th"] = { target = "Mcal-th", }, ["g-mcal-th"] = { target = "mcal-th", }, ["GW-h"] = { target = "GW.h", }, ["GW·h"] = { target = "GW.h", }, ["Hartree"] = { target = "Eh", }, ["hp.h"] = { target = "hph", }, ["in.lb-f"] = { target = "inlb-f", }, ["in.lbf"] = { target = "inlbf", }, ["in.oz-f"] = { target = "inoz-f", }, ["in.ozf"] = { target = "inozf", }, ["kbboe"] = { target = "kBOE", symbol = "kbboe", }, ["kg-cal-15"] = { target = "Cal-15", }, ["kg-cal-IT"] = { target = "Cal-IT", }, ["kg-cal-th"] = { target = "Cal-th", }, ["kW-h"] = { target = "kW.h", }, ["kW·h"] = { target = "kW.h", }, ["MW-h"] = { target = "MW.h", }, ["mW-h"] = { target = "mW.h", }, ["MW·h"] = { target = "MW.h", }, ["TW-h"] = { target = "TW.h", }, ["uerg"] = { target = "μerg", }, ["ueV"] = { target = "μeV", }, ["uW-h"] = { target = "μW.h", }, ["uW.h"] = { target = "μW.h", }, ["uWh"] = { target = "μWh", }, ["W-h"] = { target = "W.h", }, ["eVpar"] = { _name1 = "electronvolt", _symbol = "eV", utype = "energy per chemical amount", scale = 96485.329522144166, prefixes = 1, default = "kcal/mol", link = "Electronvolt", }, ["kcal/mol"] = { per = { "kcal", "mol" }, utype = "energy per chemical amount", default = "kJ/mol", link = "Kilocalorie per mole", }, ["kJ/mol"] = { per = { "kJ", "mol" }, utype = "energy per chemical amount", default = "kcal/mol", link = "Joule per mole", }, ["kWh/100 km"] = { name1 = "kilowatt-hour per 100 kilometres", name1_us = "kilowatt-hour per 100 kilometers", name2 = "kilowatt-hours per 100 kilometres", name2_us = "kilowatt-hours per 100 kilometers", symbol = "kW⋅h/100&nbsp;km", utype = "energy per unit length", scale = 36, default = "MJ/km kWh/mi", link = "Kilowatt-hour", }, ["kWh/100 mi"] = { name1 = "kilowatt-hour per 100 miles", name2 = "kilowatt-hours per 100 miles", symbol = "kW⋅h/100&nbsp;mi", utype = "energy per unit length", scale = 22.3694, default = "mpge", link = "Miles per gallon gasoline equivalent", }, ["MJ/100 km"] = { name1 = "megajoule per 100 kilometres", name1_us = "megajoule per 100 kilometers", name2 = "megajoules per 100 kilometres", name2_us = "megajoules per 100 kilometers", symbol = "MJ/100&nbsp;km", utype = "energy per unit length", scale = 10, default = "BTU/mi", link = "British thermal unit", }, ["mpge"] = { name1 = "mile per gallon gasoline equivalent", name2 = "miles per gallon gasoline equivalent", symbol = "mpg&#8209;e", utype = "energy per unit length", scale = 1.3263314048360777e-5, invert = -1, iscomplex= true, default = "kWh/100 mi", link = "Miles per gallon gasoline equivalent", }, ["BTU/mi"] = { per = { "BTU", "mi" }, utype = "energy per unit length", default = "v > 1525 ! M ! k ! J/km", }, ["kJ/km"] = { per = { "kJ", "km" }, utype = "energy per unit length", default = "BTU/mi", }, ["kWh/km"] = { per = { "-kW.h", "km" }, utype = "energy per unit length", default = "MJ/km kWh/mi", }, ["kWh/mi"] = { per = { "-kW.h", "mi" }, utype = "energy per unit length", default = "kWh/km MJ/km", }, ["MJ/km"] = { per = { "MJ", "km" }, utype = "energy per unit length", default = "BTU/mi", }, ["mpg-e"] = { target = "mpge", }, ["BTU/lb"] = { name1 = "British thermal unit per pound", name2 = "British thermal units per pound", symbol = "BTU/lb", utype = "energy per unit mass", scale = 2326, default = "kJ/kg", link = "British thermal unit", }, ["cal/g"] = { name1 = "calorie per gram", name2 = "calories per gram", symbol = "cal/g", utype = "energy per unit mass", scale = 4184, default = "J/g", }, ["GJ/kg"] = { name1 = "gigajoule per kilogram", name2 = "gigajoules per kilogram", symbol = "GJ/kg", utype = "energy per unit mass", scale = 1e9, default = "ktTNT/t", link = "Specific energy", }, ["J/g"] = { name1 = "joule per gram", name2 = "joules per gram", symbol = "J/g", utype = "energy per unit mass", scale = 1000, default = "kcal/g", link = "Specific energy", }, ["kcal/g"] = { name1 = "kilocalorie per gram", name2 = "kilocalories per gram", symbol = "kcal/g", utype = "energy per unit mass", scale = 4184000, default = "kJ/g", }, ["kJ/g"] = { name1 = "kilojoule per gram", name2 = "kilojoules per gram", symbol = "kJ/g", utype = "energy per unit mass", scale = 1000000, default = "kcal/g", link = "Specific energy", }, ["kJ/kg"] = { name1 = "kilojoule per kilogram", name2 = "kilojoules per kilogram", symbol = "kJ/kg", utype = "energy per unit mass", scale = 1000, default = "BTU/lb", link = "Specific energy", }, ["ktonTNT/MT"] = { name2 = "kilotons of TNT per metric ton", symbol = "kiloton of TNT per metric ton", usename = 1, utype = "energy per unit mass", scale = 4184000000, default = "GJ/kg", link = "TNT equivalent", }, ["ktTNT/t"] = { name2 = "kilotonnes of TNT per tonne", symbol = "kilotonne of TNT per tonne", usename = 1, utype = "energy per unit mass", scale = 4184000000, default = "GJ/kg", link = "TNT equivalent", }, ["MtonTNT/MT"] = { name2 = "megatons of TNT per metric ton", symbol = "megaton of TNT per metric ton", usename = 1, utype = "energy per unit mass", scale = 4.184e12, default = "TJ/kg", link = "TNT equivalent", }, ["MtTNT/MT"] = { name2 = "megatonnes of TNT per tonne", symbol = "megatonne of TNT per tonne", usename = 1, utype = "energy per unit mass", scale = 4.184e12, default = "TJ/kg", link = "TNT equivalent", }, ["TJ/kg"] = { name1 = "terajoule per kilogram", name2 = "terajoules per kilogram", symbol = "TJ/kg", utype = "energy per unit mass", scale = 1e12, default = "MtTNT/MT", link = "Specific energy", }, ["Cal/g"] = { per = { "Cal", "g" }, utype = "energy per unit mass", default = "kJ/g", }, ["BTU/cuft"] = { per = { "BTU", "cuft" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/12USoz(mL)serve"] = { per = { "Cal", "-12USoz(mL)serve" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/12USoz(ml)serve"] = { per = { "Cal", "-12USoz(ml)serve" }, utype = "energy per unit volume", default = "kJ/l", }, ["Cal/12USozserve"] = { per = { "Cal", "-12USozserve" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/USoz"] = { per = { "Cal", "USoz" }, utype = "energy per unit volume", default = "kJ/ml", }, ["kJ/L"] = { per = { "kJ", "L" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["kJ/l"] = { per = { "kJ", "ll" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["kJ/ml"] = { per = { "kJ", "ml" }, utype = "energy per unit volume", default = "Cal/USoz", }, ["MJ/m3"] = { per = { "MJ", "m3" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["Sv"] = { _name1 = "sievert", _symbol = "Sv", utype = "equivalent radiation dose", scale = 1, prefixes = 1, default = "rem", link = "Sievert", }, ["rem"] = { _name1 = "rem", _symbol = "rem", utype = "equivalent radiation dose", scale = 0.01, prefixes = 1, default = "Sv", link = "Roentgen equivalent man", }, ["g/km"] = { name1 = "gram per kilometre", name1_us = "gram per kilometer", name2 = "grams per kilometre", name2_us = "grams per kilometer", symbol = "g/km", utype = "exhaust emission", scale = 1e-6, default = "oz/mi", link = "Exhaust gas", }, ["g/mi"] = { name1 = "gram per mile", name2 = "grams per mile", symbol = "g/mi", utype = "exhaust emission", scale = 6.2137119223733397e-7, default = "g/km", link = "Exhaust gas", }, ["gCO2/km"] = { name1 = "gram of CO<sub>2</sub> per kilometre", name1_us = "gram of CO<sub>2</sub> per kilometer", name2 = "grams of CO<sub>2</sub> per kilometre", name2_us = "grams of CO<sub>2</sub> per kilometer", symbol = "g(CO<sub>2</sub>)/km", utype = "exhaust emission", scale = 1e-6, default = "ozCO2/mi", link = "Exhaust gas", }, ["gCO2/mi"] = { name1 = "gram of CO<sub>2</sub> per mile", name2 = "grams of CO<sub>2</sub> per mile", symbol = "g(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 6.2137119223733397e-7, default = "gCO2/km", link = "Exhaust gas", }, ["kg/km"] = { name1 = "kilogram per kilometre", name1_us = "kilogram per kilometer", name2 = "kilograms per kilometre", name2_us = "kilograms per kilometer", symbol = "kg/km", utype = "exhaust emission", scale = 0.001, default = "lb/mi", link = "Exhaust gas", }, ["kgCO2/km"] = { name1 = "kilogram of CO<sub>2</sub> per kilometre", name1_us = "kilogram of CO<sub>2</sub> per kilometer", name2 = "kilograms of CO<sub>2</sub> per kilometre", name2_us = "kilograms of CO<sub>2</sub> per kilometer", symbol = "kg(CO<sub>2</sub>)/km", utype = "exhaust emission", scale = 0.001, default = "lbCO2/mi", link = "Exhaust gas", }, ["lb/mi"] = { name1 = "pound per mile", name2 = "pounds per mile", symbol = "lb/mi", utype = "exhaust emission", scale = 0.00028184923173665794, default = "kg/km", link = "Exhaust gas", }, ["lbCO2/mi"] = { name1 = "pound of CO<sub>2</sub> per mile", name2 = "pounds of CO<sub>2</sub> per mile", symbol = "lb(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 0.00028184923173665794, default = "kgCO2/km", link = "Exhaust gas", }, ["oz/mi"] = { name1 = "ounce per mile", name2 = "ounces per mile", symbol = "oz/mi", utype = "exhaust emission", scale = 1.7615576983541121e-5, default = "g/km", link = "Exhaust gas", }, ["ozCO2/mi"] = { name1 = "ounce of CO<sub>2</sub> per mile", name2 = "ounces of CO<sub>2</sub> per mile", symbol = "oz(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 1.7615576983541121e-5, default = "gCO2/km", link = "Exhaust gas", }, ["cuft/a"] = { name1 = "cubic foot per annum", name2 = "cubic feet per annum", symbol = "cu&nbsp;ft/a", utype = "flow", scale = 8.9730672142368242e-10, default = "m3/a", link = "Cubic foot per second", }, ["cuft/d"] = { name1 = "cubic foot per day", name2 = "cubic feet per day", symbol = "cu&nbsp;ft/d", utype = "flow", scale = 3.2774128000000003e-7, default = "m3/d", link = "Cubic foot per second", }, ["cuft/h"] = { name1 = "cubic foot per hour", name2 = "cubic feet per hour", symbol = "cu&nbsp;ft/h", utype = "flow", scale = 7.8657907200000004e-6, default = "m3/h", link = "Cubic foot per second", }, ["cuft/min"] = { name1 = "cubic foot per minute", name2 = "cubic feet per minute", symbol = "cu&nbsp;ft/min", utype = "flow", scale = 0.00047194744319999999, default = "m3/min", }, ["cuft/s"] = { name1 = "cubic foot per second", name2 = "cubic feet per second", symbol = "cu&nbsp;ft/s", utype = "flow", scale = 28316846592e-12, default = "m3/s", }, ["cumi/a"] = { name1 = "cubic mile per annum", name2 = "cubic miles per annum", symbol = "cu&nbsp;mi/a", utype = "flow", scale = 132.08171170940057, default = "km3/a", link = "Cubic foot per second", }, ["cuyd/h"] = { name1 = "cubic yard per hour", name2 = "cubic yards per hour", symbol = "cuyd/h", utype = "flow", scale = 0.00021237634944000001, default = "m3/h", link = "Cubic foot per second", }, ["cuyd/s"] = { name1 = "cubic yard per second", name2 = "cubic yards per second", symbol = "cu&nbsp;yd/s", utype = "flow", scale = 0.76455485798400002, default = "m3/s", }, ["Goilbbl/a"] = { name1 = "billion barrels per year", name2 = "billion barrels per year", symbol = "Gbbl/a", utype = "flow", scale = 5.0380033629933836, default = "v * 1.58987294928 < 10 ! e6 ! e9 ! m3/a", link = "Barrel per day", }, ["impgal/h"] = { name1 = "imperial gallon per hour", name2 = "imperial gallons per hour", symbol = "imp&nbsp;gal/h", utype = "flow", scale = 1.2628027777777779e-6, default = "m3/h", link = "Gallon", }, ["impgal/min"] = { name1 = "imperial gallon per minute", name2 = "imperial gallons per minute", symbol = "imp gal/min", utype = "flow", scale = 7.5768166666666671e-5, default = "m3/s", link = "Gallon", }, ["impgal/s"] = { name1 = "imperial gallon per second", name2 = "imperial gallons per second", symbol = "impgal/s", utype = "flow", scale = 0.00454609, default = "m3/s", link = "Imperial gallons per second", }, ["km3/a"] = { name1 = "cubic kilometre per annum", name1_us = "cubic kilometer per annum", name2 = "cubic kilometres per annum", name2_us = "cubic kilometers per annum", symbol = "km<sup>3</sup>/a", utype = "flow", scale = 31.68808781402895, default = "cumi/a", link = "Cubic metre per second", }, ["km3/d"] = { name1 = "cubic kilometre per day", name1_us = "cubic kilometer per day", name2 = "cubic kilometres per day", name2_us = "cubic kilometers per day", symbol = "km<sup>3</sup>/d", utype = "flow", scale = 11574.074074074075, default = "cuft/d", link = "Cubic metre per second", }, ["koilbbl/a"] = { name1 = "thousand barrels per year", name2 = "thousand barrels per year", symbol = "kbbl/a", utype = "flow", scale = 5.0380033629933841e-6, default = "v * 1.58987294928 < 10 ! ! e3 ! m3/a", link = "Barrel per day", }, ["koilbbl/d"] = { name1 = "thousand barrels per day", name2 = "thousand barrels per day", symbol = "kbbl/d", utype = "flow", scale = 0.0018401307283333335, default = "v * 1.58987294928 < 10 ! ! e3 ! m3/d", link = "Barrel per day", }, ["L/h"] = { name1 = "litre per hour", name1_us = "liter per hour", name2 = "litres per hour", name2_us = "liters per hour", symbol = "L/h", utype = "flow", scale = 2.7777777777777776e-7, default = "impgal/h USgal/h", link = "Cubic metre per second", }, ["L/min"] = { name1 = "litre per minute", name1_us = "liter per minute", name2 = "litres per minute", name2_us = "liters per minute", symbol = "L/min", utype = "flow", scale = 1.6666666666666667e-5, default = "impgal/min USgal/min", link = "Cubic metre per second", }, ["L/s"] = { name1 = "litre per second", name1_us = "liter per second", name2 = "litres per second", name2_us = "liters per second", symbol = "L/s", utype = "flow", scale = 0.001, default = "cuft/s", link = "Cubic metre per second", }, ["m3/a"] = { name1 = "cubic metre per annum", name1_us = "cubic meter per annum", name2 = "cubic metres per annum", name2_us = "cubic meters per annum", symbol = "m<sup>3</sup>/a", utype = "flow", scale = 3.1688087814028947e-8, default = "cuft/a", link = "Cubic metre per second", }, ["m3/d"] = { name1 = "cubic metre per day", name1_us = "cubic meter per day", name2 = "cubic metres per day", name2_us = "cubic meters per day", symbol = "m<sup>3</sup>/d", utype = "flow", scale = 1.1574074074074073e-5, default = "cuft/d", link = "Cubic metre per second", }, ["m3/h"] = { name1 = "cubic metre per hour", name1_us = "cubic meter per hour", name2 = "cubic metres per hour", name2_us = "cubic meters per hour", symbol = "m<sup>3</sup>/h", utype = "flow", scale = 0.00027777777777777778, default = "cuft/h", link = "Cubic metre per second", }, ["m3/min"] = { name1 = "cubic metre per minute", name1_us = "cubic meter per minute", name2 = "cubic metres per minute", name2_us = "cubic meters per minute", symbol = "m<sup>3</sup>/min", utype = "flow", scale = 0.016666666666666666, default = "cuft/min", link = "Cubic metre per second", }, ["m3/s"] = { name1 = "cubic metre per second", name1_us = "cubic meter per second", name2 = "cubic metres per second", name2_us = "cubic meters per second", symbol = "m<sup>3</sup>/s", utype = "flow", scale = 1, default = "cuft/s", }, ["Moilbbl/a"] = { name1 = "million barrels per year", name2 = "million barrels per year", symbol = "Mbbl/a", utype = "flow", scale = 0.0050380033629933837, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3/a", link = "Barrel per day", }, ["Moilbbl/d"] = { name1 = "million barrels per day", name2 = "million barrels per day", symbol = "Mbbl/d", utype = "flow", scale = 1.8401307283333335, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3/d", link = "Barrel per day", }, ["oilbbl/a"] = { name1 = "barrel per year", name2 = "barrels per year", symbol = "bbl/a", utype = "flow", scale = 5.0380033629933841e-9, default = "m3/a", link = "Barrel per day", }, ["oilbbl/d"] = { name1 = "barrel per day", name2 = "barrels per day", symbol = "bbl/d", utype = "flow", scale = 1.8401307283333336e-6, default = "m3/d", }, ["Toilbbl/a"] = { name1 = "trillion barrels per year", name2 = "trillion barrels per year", symbol = "Tbbl/a", utype = "flow", scale = 5038.0033629933832, default = "v * 1.58987294928 < 10 ! e9 ! e12 ! m3/a", link = "Barrel per day", }, ["U.S.gal/d"] = { name1 = "U.S. gallon per day", name2 = "U.S. gallons per day", symbol = "U.S.&nbsp;gal/d", utype = "flow", scale = 4.3812636388888893e-8, default = "m3/s", customary= 1, }, ["U.S.gal/h"] = { name1 = "gallon per hour", name2 = "gallons per hour", symbol = "gal/h", utype = "flow", scale = 1.0515032733333334e-6, default = "m3/h", link = "Gallon", customary= 2, }, ["U.S.gal/min"] = { name1 = "U.S. gallon per minute", name2 = "U.S. gallons per minute", symbol = "U.S.&nbsp;gal/min", utype = "flow", scale = 6.3090196400000003e-5, default = "m3/s", link = "Gallon", }, ["USgal/a"] = { name1 = "US gallon per year", name2 = "US gallons per year", symbol = "US&nbsp;gal/a", utype = "flow", scale = 1.1995246102365199e-10, default = "m3/s", }, ["USgal/d"] = { name1 = "US gallon per day", name2 = "US gallons per day", symbol = "US&nbsp;gal/d", utype = "flow", scale = 4.3812636388888893e-8, default = "m3/s", }, ["USgal/h"] = { name1 = "gallon per hour", name2 = "gallons per hour", symbol = "gal/h", utype = "flow", scale = 1.0515032733333334e-6, default = "m3/h", link = "Gallon", customary= 1, }, ["USgal/min"] = { name1 = "US gallon per minute", name2 = "US gallons per minute", symbol = "US&nbsp;gal/min", utype = "flow", scale = 6.3090196400000003e-5, default = "m3/s", link = "Gallon", }, ["USgal/s"] = { name1 = "US gallon per second", name1_us = "U.S. gallon per second", name2 = "US gallons per second", name2_us = "U.S. gallons per second", symbol = "USgal/s", utype = "flow", scale = 0.003785411784, default = "m3/s", link = "US gallons per second", }, ["ft3/a"] = { target = "cuft/a", }, ["ft3/d"] = { target = "cuft/d", }, ["ft3/h"] = { target = "cuft/h", }, ["ft3/s"] = { target = "cuft/s", }, ["Gcuft/a"] = { target = "e9cuft/a", }, ["Gcuft/d"] = { target = "e9cuft/d", }, ["kcuft/a"] = { target = "e3cuft/a", }, ["kcuft/d"] = { target = "e3cuft/d", }, ["kcuft/s"] = { target = "e3cuft/s", }, ["Mcuft/a"] = { target = "e6cuft/a", }, ["Mcuft/d"] = { target = "e6cuft/d", }, ["Mcuft/s"] = { target = "e6cuft/s", }, ["m³/s"] = { target = "m3/s", }, ["Tcuft/a"] = { target = "e12cuft/a", }, ["Tcuft/d"] = { target = "e12cuft/d", }, ["u.s.gal/min"] = { target = "U.S.gal/min", }, ["usgal/min"] = { target = "USgal/min", }, ["-LTf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LTf", utype = "force", scale = 9964.01641818352, default = "kN", }, ["-STf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "STf", utype = "force", scale = 8896.443230521, default = "kN", }, ["dyn"] = { name1 = "dyne", symbol = "dyn", utype = "force", scale = 0.00001, default = "gr-f", }, ["g-f"] = { name1 = "gram-force", name2 = "grams-force", symbol = "g<sub>f</sub>", utype = "force", scale = 0.00980665, default = "mN oz-f", link = "Kilogram-force", }, ["gf"] = { name1 = "gram-force", name2 = "grams-force", symbol = "gf", utype = "force", scale = 0.00980665, default = "mN ozf", link = "Kilogram-force", }, ["gr-f"] = { name1 = "grain-force", name2 = "grains-force", symbol = "gr<sub>f</sub>", utype = "force", scale = 0.0006354602307515, default = "μN", link = "Pound (force)", }, ["grf"] = { name1 = "grain-force", name2 = "grains-force", symbol = "grf", utype = "force", scale = 0.0006354602307515, default = "μN", link = "Pound (force)", }, ["kdyn"] = { name1 = "kilodyne", symbol = "kdyn", utype = "force", scale = 0.01, default = "oz-f", link = "Dyne", }, ["kg-f"] = { name1 = "kilogram-force", name2 = "kilograms-force", symbol = "kg<sub>f</sub>", utype = "force", scale = 9.80665, default = "N lb-f", }, ["kgf"] = { name1 = "kilogram-force", name2 = "kilograms-force", symbol = "kgf", utype = "force", scale = 9.80665, default = "N lbf", }, ["kp"] = { name1 = "kilopond", symbol = "kp", utype = "force", scale = 9.80665, default = "N lb-f", link = "Kilogram-force", }, ["L/T-f"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "L/T<sub>f</sub>", utype = "force", scale = 9964.01641818352, default = "kN", }, ["L/Tf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "L/Tf", utype = "force", scale = 9964.01641818352, default = "kN", }, ["lb-f"] = { name1 = "pound-force", name2 = "pounds-force", symbol = "lb<sub>f</sub>", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["lbf"] = { name1 = "pound-force", name2 = "pounds-force", symbol = "lbf", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["lb(f)"] = { name1 = "pound", symbol = "lb", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["LT-f"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LT<sub>f</sub>", utype = "force", scale = 9964.01641818352, default = "kN", }, ["LTf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LTf", usename = 1, utype = "force", scale = 9964.01641818352, default = "kN", }, ["Mdyn"] = { name1 = "megadyne", symbol = "Mdyn", utype = "force", scale = 10, default = "lb-f", link = "Dyne", }, ["mdyn"] = { name1 = "millidyne", symbol = "mdyn", utype = "force", scale = 0.00000001, default = "gr-f", link = "Dyne", }, ["mg-f"] = { name1 = "milligram-force", name2 = "milligrams-force", symbol = "mg<sub>f</sub>", utype = "force", scale = 0.00000980665, default = "μN gr-f", link = "Kilogram-force", }, ["mgf"] = { name1 = "milligram-force", name2 = "milligrams-force", symbol = "mgf", utype = "force", scale = 0.00000980665, default = "μN grf", link = "Kilogram-force", }, ["Mp"] = { name1 = "megapond", symbol = "Mp", utype = "force", scale = 9806.65, default = "kN LT-f ST-f", link = "Kilogram-force", }, ["mp"] = { name1 = "millipond", symbol = "mp", utype = "force", scale = 0.00000980665, default = "μN gr-f", link = "Kilogram-force", }, ["N"] = { _name1 = "newton", _symbol = "N", utype = "force", scale = 1, prefixes = 1, default = "lb-f", link = "Newton (unit)", }, ["oz-f"] = { name1 = "ounce-force", name2 = "ounces-force", symbol = "oz<sub>f</sub>", utype = "force", scale = 0.2780138203095378125, default = "mN", link = "Pound (force)", }, ["ozf"] = { name1 = "ounce-force", name2 = "ounces-force", symbol = "ozf", utype = "force", scale = 0.2780138203095378125, default = "mN", link = "Pound (force)", }, ["p"] = { name1 = "pond", symbol = "p", utype = "force", scale = 0.00980665, default = "mN oz-f", link = "Kilogram-force", }, ["pdl"] = { name1 = "poundal", symbol = "pdl", utype = "force", scale = 0.138254954376, default = "N", }, ["S/T-f"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "S/T<sub>f</sub>", utype = "force", scale = 8896.443230521, default = "kN", }, ["S/Tf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "S/Tf", utype = "force", scale = 8896.443230521, default = "kN", }, ["ST-f"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "ST<sub>f</sub>", utype = "force", scale = 8896.443230521, default = "kN", }, ["STf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "STf", usename = 1, utype = "force", scale = 8896.443230521, default = "kN", }, ["t-f"] = { name1 = "tonne-force", name2 = "tonnes-force", symbol = "t<sub>f</sub>", utype = "force", scale = 9806.65, default = "kN LT-f ST-f", link = "Ton-force#Tonne-force", }, ["tf"] = { name1 = "tonne-force", name2 = "tonnes-force", symbol = "tf", utype = "force", scale = 9806.65, default = "kN LTf STf", link = "Ton-force#Tonne-force", }, ["dyne"] = { target = "dyn", }, ["newtons"] = { target = "N", }, ["poundal"] = { target = "pdl", }, ["tonne-force"] = { target = "tf", }, ["impgal/mi"] = { per = { "@impgal", "mi" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km USgal/mi", }, ["km/L"] = { per = { "km", "L" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "mpgimp mpgus", }, ["km/l"] = { per = { "km", "ll" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "mpgimp mpgus", }, ["L/100 km"] = { per = { "L", "100km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|L/100&nbsp;km]]", }, ["l/100 km"] = { per = { "ll", "100km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|l/100&nbsp;km]]", }, ["L/km"] = { per = { "L", "km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", }, ["l/km"] = { per = { "ll", "km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", }, ["mi/impqt"] = { per = { "mi", "impqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/U.S.qt"] = { per = { "mi", "U.S.qt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/USqt"] = { per = { "mi", "USqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/usqt"] = { per = { "mi", "usqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mpgimp"] = { per = { "mi", "@impgal" }, symbol = "mpg<sub>&#8209;imp</sub>", utype = "fuel efficiency", invert = -1, iscomplex= true, default = "L/100 km+mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[Imperial units|imp]]</sub>", }, ["mpgus"] = { per = { "mi", "+USgal" }, symbol = "mpg<sub>&#8209;US</sub>", utype = "fuel efficiency", invert = -1, iscomplex= true, default = "L/100 km+mpgimp", symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|US]]</sub>", }, ["U.S.gal/mi"] = { per = { "*U.S.gal", "mi" }, sp_us = true, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km impgal/mi", }, ["usgal/mi"] = { per = { "+USgal", "mi" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km impgal/mi", }, ["L/100km"] = { target = "L/100 km", }, ["l/100km"] = { target = "l/100 km", }, ["mpg"] = { shouldbe = "Use %{mpgus%} for miles per US gallon or %{mpgimp%} for miles per imperial gallon (not %{mpg%})", }, ["mpgU.S."] = { target = "mpgus", symbol = "mpg<sub>&#8209;U.S.</sub>", sp_us = true, symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|U.S.]]</sub>", }, ["mpgu.s."] = { target = "mpgus", symbol = "mpg<sub>&#8209;U.S.</sub>", sp_us = true, symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|U.S.]]</sub>", }, ["mpgUS"] = { target = "mpgus", }, ["USgal/mi"] = { target = "usgal/mi", }, ["kPa/m"] = { per = { "kPa", "-m-frac" }, utype = "fracture gradient", default = "psi/ft", }, ["psi/ft"] = { per = { "psi", "-ft-frac" }, utype = "fracture gradient", default = "kPa/m", }, ["cm/km"] = { name1 = "centimetre per kilometre", name1_us = "centimeter per kilometer", name2 = "centimetres per kilometre", name2_us = "centimeters per kilometer", symbol = "cm/km", utype = "gradient", scale = 0.00001, default = "ft/mi", link = "Grade (slope)", }, ["ft/mi"] = { name1 = "foot per mile", name2 = "feet per mile", symbol = "ft/mi", utype = "gradient", scale = 0.00018939393939393939, default = "v < 5.28 ! c ! ! m/km", link = "Grade (slope)", }, ["ft/nmi"] = { name1 = "foot per nautical mile", name2 = "feet per nautical mile", symbol = "ft/nmi", utype = "gradient", scale = 0.00016457883369330455, default = "v < 6.076 ! c ! ! m/km", link = "Grade (slope)", }, ["in/ft"] = { name1 = "inch per foot", name2 = "inches per foot", symbol = "in/ft", utype = "gradient", scale = 0.083333333333333329, default = "mm/m", link = "Grade (slope)", }, ["in/mi"] = { name1 = "inch per mile", name2 = "inches per mile", symbol = "in/mi", utype = "gradient", scale = 1.5782828282828283e-5, default = "v < 0.6336 ! m ! c ! m/km", link = "Grade (slope)", }, ["m/km"] = { name1 = "metre per kilometre", name1_us = "meter per kilometer", name2 = "metres per kilometre", name2_us = "meters per kilometer", symbol = "m/km", utype = "gradient", scale = 0.001, default = "ft/mi", link = "Grade (slope)", }, ["mm/km"] = { name1 = "millimetre per kilometre", name1_us = "millimeter per kilometer", name2 = "millimetres per kilometre", name2_us = "millimeters per kilometer", symbol = "mm/km", utype = "gradient", scale = 0.000001, default = "in/mi", link = "Grade (slope)", }, ["mm/m"] = { name1 = "millimetre per metre", name1_us = "millimeter per meter", name2 = "millimetres per metre", name2_us = "millimeters per meter", symbol = "mm/m", utype = "gradient", scale = 0.001, default = "in/ft", link = "Grade (slope)", }, ["admi"] = { name1 = "admiralty mile", symbol = "nmi&nbsp;(admiralty)", utype = "length", scale = 1853.184, default = "km mi", link = "Nautical mile", }, ["AU"] = { name1 = "astronomical unit", symbol = "AU", utype = "length", scale = 149597870700, default = "km mi", }, ["Brnmi"] = { name1 = "British nautical mile", symbol = "(Brit)&nbsp;nmi", utype = "length", scale = 1853.184, default = "km mi", link = "Nautical mile", }, ["bu"] = { name2 = "bu", symbol = "bu", usename = 1, utype = "length", scale = 0.0030303030303030303, default = "mm", link = "Japanese units of measurement#Length", }, ["ch"] = { name1 = "chain", symbol = "ch", utype = "length", scale = 20.1168, default = "ft m", subdivs = { ["ft"] = { 66, default = "m" }, ["yd"] = { 22, default = "m" } }, link = "Chain (unit)", }, ["chlk"] = { name1 = "[[Chain (unit)|chain]]", symbol = "[[Chain (unit)|ch]]", utype = "length", scale = 20.1168, default = "ft m", link = "", }, ["chain"] = { symbol = "chain", usename = 1, utype = "length", scale = 20.1168, default = "ft m", subdivs = { ["ft"] = { 66, default = "m" }, ["yd"] = { 22, default = "m" } }, link = "Chain (unit)", }, ["chainlk"] = { symbol = "[[Chain (unit)|chain]]", usename = 1, utype = "length", scale = 20.1168, default = "ft m", link = "", }, ["dpcm"] = { name2 = "dot/cm", symbol = "dot/cm", utype = "length", scale = 100, invert = -1, iscomplex= true, default = "dpi", link = "Dots per inch", }, ["dpi"] = { name2 = "DPI", symbol = "DPI", utype = "length", scale = 39.370078740157481, invert = -1, iscomplex= true, default = "pitch", link = "Dots per inch", }, ["fathom"] = { symbol = "fathom", usename = 1, utype = "length", scale = 1.8288, default = "ft m", }, ["foot"] = { name1 = "foot", name2 = "foot", symbol = "ft", utype = "length", scale = 0.3048, default = "m", subdivs = { ["in"] = { 12, default = "m" } }, link = "Foot (unit)", }, ["ft"] = { name1 = "foot", name2 = "feet", symbol = "ft", utype = "length", scale = 0.3048, exception= "integer_more_precision", default = "m", subdivs = { ["in"] = { 12, default = "m" } }, link = "Foot (unit)", }, ["furlong"] = { symbol = "furlong", usename = 1, utype = "length", scale = 201.168, default = "ft m", }, ["Gly"] = { name1 = "gigalight-year", symbol = "Gly", utype = "length", scale = 9.4607304725808e24, default = "Mpc", link = "Light-year#Definitions", }, ["Gpc"] = { name1 = "gigaparsec", symbol = "Gpc", utype = "length", scale = 3.0856775814671916e25, default = "Gly", link = "Parsec#Megaparsecs and gigaparsecs", }, ["hand"] = { name1 = "hand", symbol = "h", utype = "length", builtin = "hand", scale = 0.1016, iscomplex= true, default = "in cm", link = "Hand (unit)", }, ["in"] = { name1 = "inch", name2 = "inches", symbol = "in", utype = "length", scale = 0.0254, exception= "subunit_more_precision", default = "mm", }, ["inabbreviated"] = { name2 = "in", symbol = "in", utype = "length", scale = 0.0254, default = "mm", link = "Inch", }, ["kly"] = { name1 = "kilolight-year", symbol = "kly", utype = "length", scale = 9.4607304725808e18, default = "pc", link = "Light-year#Definitions", }, ["kpc"] = { name1 = "kiloparsec", symbol = "kpc", utype = "length", scale = 3.0856775814671916e19, default = "kly", link = "Parsec#Parsecs and kiloparsecs", }, ["LD"] = { name1 = "lunar distance", symbol = "LD", utype = "length", scale = 384403000, default = "km mi", link = "Lunar distance (astronomy)", }, ["league"] = { symbol = "league", usename = 1, utype = "length", scale = 4828.032, default = "km", link = "League (unit)", }, ["ly"] = { name1 = "light-year", symbol = "ly", utype = "length", scale = 9.4607304725808e15, default = "AU", }, ["m"] = { _name1 = "metre", _name1_us= "meter", _symbol = "m", utype = "length", scale = 1, prefixes = 1, default = "v > 0 and v < 3 ! ftin ! ft", link = "Metre", }, ["mi"] = { name1 = "mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", subdivs = { ["ch"] = { 80, default = "km" }, ["chlk"] = { 80, default = "km" }, ["chain"] = { 80, default = "km" }, ["chainlk"] = { 80, default = "km" }, ["ft"] = { 5280, default = "km" }, ["furlong"] = { 8, default = "km" }, ["yd"] = { 1760, default = "km" } }, }, ["mil"] = { symbol = "mil", usename = 1, utype = "length", scale = 0.0000254, default = "mm", link = "Thousandth of an inch", }, ["Mly"] = { name1 = "megalight-year", symbol = "Mly", utype = "length", scale = 9.4607304725808e21, default = "kpc", link = "Light-year#Definitions", }, ["Mpc"] = { name1 = "megaparsec", symbol = "Mpc", utype = "length", scale = 3.0856775814671916e22, default = "Mly", link = "Parsec#Megaparsecs and gigaparsecs", }, ["NM"] = { name1 = "nautical mile", symbol = "NM", utype = "length", scale = 1852, default = "km mi", }, ["nmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1852, default = "km mi", }, ["oldUKnmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1853.184, default = "km mi", }, ["oldUSnmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1853.24496, default = "km mi", }, ["pc"] = { name1 = "parsec", symbol = "pc", utype = "length", scale = 3.0856775814671916e16, default = "ly", }, ["perch"] = { name2 = "perches", symbol = "perch", usename = 1, utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["pitch"] = { name2 = "μm", symbol = "μm", utype = "length", scale = 1e-6, default = "dpi", defkey = "pitch", linkey = "pitch", link = "Dots per inch", }, ["pole"] = { symbol = "pole", usename = 1, utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["pre1954U.S.nmi"] = { name1 = "(pre-1954&nbsp;U.S.) nautical mile", symbol = "(pre&#8209;1954&nbsp;U.S.) nmi", utype = "length", scale = 1853.24496, default = "km mi", link = "Nautical mile", }, ["pre1954USnmi"] = { name1 = "(pre-1954&nbsp;US) nautical mile", name1_us = "(pre-1954&nbsp;U.S.) nautical mile", symbol = "(pre&#8209;1954&nbsp;US) nmi", sym_us = "(pre&#8209;1954&nbsp;U.S.) nmi", utype = "length", scale = 1853.24496, default = "km mi", link = "Nautical mile", }, ["rd"] = { name1 = "rod", symbol = "rd", utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["royal cubit"] = { name1 = "royal cubit", symbol = "cu", utype = "length", scale = 0.524, default = "mm", }, ["rtkm"] = { name1 = "route kilometre", name1_us = "route kilometer", symbol = "km", utype = "length", scale = 1000, default = "mi", link = "Kilometre", }, ["rtmi"] = { name1 = "route mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", link = "Mile", }, ["shaku"] = { name2 = "shaku", symbol = "shaku", usename = 1, utype = "length", scale = 0.30303030303030304, default = "m", link = "Shaku (unit)", }, ["sm"] = { name1 = "smoot", symbol = "sm", utype = "length", scale = 1.70180, default = "m", link = "Smoot (unit)", }, ["smi"] = { name1 = "statute mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", subdivs = { ["chain"] = { 80, default = "km" } }, }, ["solar radius"] = { name1 = "solar radius", name2 = "solar radii", symbol = "''R''<sub>☉</sub>", utype = "length", scale = 695700e3, default = "km", }, ["sun"] = { name2 = "sun", symbol = "sun", usename = 1, utype = "length", scale = 0.030303030303030304, default = "mm", link = "Japanese units of measurement#Length", }, ["thou"] = { name2 = "thou", symbol = "thou", usename = 1, utype = "length", scale = 0.0000254, default = "mm", link = "Thousandth of an inch", }, ["verst"] = { symbol = "verst", usename = 1, utype = "length", scale = 1066.8, default = "km mi", }, ["yd"] = { name1 = "yard", symbol = "yd", utype = "length", scale = 0.9144, default = "m", subdivs = { ["ft"] = { 3, default = "m" } }, }, ["μin"] = { name1 = "microinch", name2 = "microinches", symbol = "μin", utype = "length", scale = 0.0000000254, default = "nm", link = "SI prefix#Non-metric units", }, ["Å"] = { name1 = "ångström", symbol = "Å", utype = "length", scale = 0.0000000001, default = "in", }, ["Hz"] = { _name1 = "hertz", _name2 = "hertz", _symbol = "Hz", utype = "length", scale = 3.3356409519815204e-9, invert = -1, iscomplex= true, prefixes = 1, default = "m", link = "Hertz", }, ["rpm"] = { name1 = "revolution per minute", name2 = "revolutions per minute", symbol = "rpm", utype = "length", scale = 5.5594015866358675e-11, invert = -1, iscomplex= true, default = "Hz", link = "Revolutions per minute", }, ["-ft-frac"] = { target = "ft", link = "Fracture gradient", }, ["-in-stiff"] = { target = "in", link = "Stiffness", }, ["-m-frac"] = { target = "m", link = "Fracture gradient", }, ["-m-stiff"] = { target = "m", link = "Stiffness", }, ["100km"] = { target = "km", multiplier= 100, }, ["100mi"] = { target = "mi", multiplier= 100, }, ["100miles"] = { target = "mi", symbol = "miles", multiplier= 100, }, ["admiralty nmi"] = { target = "oldUKnmi", }, ["angstrom"] = { target = "Å", }, ["au"] = { target = "AU", symbol = "au", }, ["feet"] = { target = "ft", }, ["hands"] = { target = "hand", }, ["inch"] = { target = "in", }, ["inches"] = { target = "in", }, ["light-year"] = { target = "ly", }, ["meter"] = { target = "m", sp_us = true, }, ["meters"] = { target = "m", sp_us = true, }, ["metre"] = { target = "m", }, ["metres"] = { target = "m", }, ["micrometre"] = { target = "μm", }, ["micron"] = { target = "μm", default = "μin", }, ["mile"] = { target = "mi", }, ["miles"] = { target = "mi", }, ["parsec"] = { target = "pc", }, ["rod"] = { target = "rd", }, ["smoot"] = { target = "sm", }, ["uin"] = { target = "μin", }, ["yard"] = { target = "yd", }, ["yards"] = { target = "yd", }, ["yds"] = { target = "yd", }, ["dtex"] = { name1 = "decitex", name2 = "decitex", symbol = "dtex", utype = "linear density", scale = 1e-7, default = "lb/yd", link = "Units of textile measurement#Units", }, ["kg/cm"] = { name1 = "kilogram per centimetre", name1_us = "kilogram per centimeter", name2 = "kilograms per centimetre", name2_us = "kilograms per centimeter", symbol = "kg/cm", utype = "linear density", scale = 100, default = "lb/yd", link = "Linear density", }, ["kg/m"] = { name1 = "kilogram per metre", name1_us = "kilogram per meter", name2 = "kilograms per metre", name2_us = "kilograms per meter", symbol = "kg/m", utype = "linear density", scale = 1, default = "lb/yd", link = "Linear density", }, ["lb/ft"] = { name1 = "pound per foot", name2 = "pounds per foot", symbol = "lb/ft", utype = "linear density", scale = 1.4881639435695539, default = "kg/m", link = "Linear density", }, ["lb/yd"] = { name1 = "pound per yard", name2 = "pounds per yard", symbol = "lb/yd", utype = "linear density", scale = 0.49605464785651798, default = "kg/m", link = "Linear density", }, ["G"] = { _name1 = "gauss", _name2 = "gauss", _symbol = "G", utype = "magnetic field strength", scale = 0.0001, prefixes = 1, default = "T", link = "Gauss (unit)", }, ["T"] = { _name1 = "tesla", _symbol = "T", utype = "magnetic field strength", scale = 1, prefixes = 1, default = "G", link = "Tesla (unit)", }, ["A/m"] = { name1 = "ampere per metre", name1_us = "ampere per meter", name2 = "amperes per metre", name2_us = "amperes per meter", symbol = "A/m", utype = "magnetizing field", scale = 1, default = "Oe", }, ["kA/m"] = { name1 = "kiloampere per metre", name1_us = "kiloampere per meter", name2 = "kiloamperes per metre", name2_us = "kiloamperes per meter", symbol = "kA/m", utype = "magnetizing field", scale = 1000, default = "kOe", link = "Ampere per metre", }, ["MA/m"] = { name1 = "megaampere per metre", name1_us = "megaampere per meter", name2 = "megaamperes per metre", name2_us = "megaamperes per meter", symbol = "MA/m", utype = "magnetizing field", scale = 1e6, default = "kOe", link = "Ampere per metre", }, ["Oe"] = { _name1 = "oersted", _symbol = "Oe", utype = "magnetizing field", scale = 79.5774715, prefixes = 1, default = "kA/m", link = "Oersted", }, ["-Lcwt"] = { name1 = "hundredweight", name2 = "hundredweight", symbol = "cwt", utype = "mass", scale = 50.80234544, default = "lb", }, ["-Scwt"] = { name1 = "hundredweight", name2 = "hundredweight", symbol = "cwt", utype = "mass", scale = 45.359237, default = "lb", }, ["-ST"] = { name1 = "short ton", symbol = "ST", utype = "mass", scale = 907.18474, default = "t", }, ["carat"] = { symbol = "carat", usename = 1, utype = "mass", scale = 0.0002, default = "g", link = "Carat (mass)", }, ["drachm"] = { name1_us = "dram", symbol = "drachm", usename = 1, utype = "mass", scale = 0.001771845195, default = "g", link = "Dram (unit)", }, ["dram"] = { target = "drachm", }, ["dwt"] = { name1 = "pennyweight", symbol = "dwt", utype = "mass", scale = 0.00155517384, default = "oz g", }, ["DWton"] = { symbol = "deadweight ton", usename = 1, utype = "mass", scale = 1016.0469088, default = "DWtonne", link = "Deadweight tonnage", }, ["DWtonne"] = { name1_us = "deadweight metric ton", symbol = "deadweight tonne", sym_us = "~deadweight metric ton", usename = 1, utype = "mass", scale = 1000, default = "DWton", link = "Deadweight tonnage", }, ["g"] = { _name1 = "gram", _symbol = "g", utype = "mass", scale = 0.001, prefixes = 1, default = "oz", link = "Gram", }, ["gr"] = { name1 = "grain", symbol = "gr", utype = "mass", scale = 0.00006479891, default = "g", link = "Grain (unit)", }, ["Gt"] = { name1 = "gigatonne", symbol = "Gt", utype = "mass", scale = 1000000000000, default = "LT ST", link = "Tonne", }, ["impgalh2o"] = { name1 = "imperial gallon of water", name2 = "imperial gallons of water", symbol = "imp&nbsp;gal H<sub>2</sub>O", utype = "mass", scale = 4.5359236999999499, default = "lb kg", link = "Imperial gallon", }, ["kt"] = { name1 = "kilotonne", symbol = "kt", utype = "mass", scale = 1000000, default = "LT ST", link = "Tonne", }, ["lb"] = { name1 = "pound", symbol = "lb", utype = "mass", scale = 0.45359237, exception= "integer_more_precision", default = "kg", subdivs = { ["oz"] = { 16, default = "kg" } }, link = "Pound (mass)", }, ["Lcwt"] = { name1 = "long hundredweight", name2 = "long hundredweight", symbol = "Lcwt", usename = 1, utype = "mass", scale = 50.80234544, default = "lb", subdivs = { ["qtr"] = { 4, default = "kg" }, ["st"] = { 8, default = "kg" } }, link = "Hundredweight", }, ["long cwt"] = { name1 = "long hundredweight", name2 = "long hundredweight", symbol = "long&nbsp;cwt", utype = "mass", scale = 50.80234544, default = "lb kg", subdivs = { ["qtr"] = { 4, default = "kg" } }, link = "Hundredweight", }, ["long qtr"] = { name1 = "long quarter", symbol = "long&nbsp;qtr", utype = "mass", scale = 12.70058636, default = "lb kg", }, ["LT"] = { symbol = "long ton", usename = 1, utype = "mass", scale = 1016.0469088, default = "t", subdivs = { ["Lcwt"] = { 20, default = "t", unit = "-Lcwt" } }, }, ["lt"] = { name1 = "long ton", symbol = "LT", utype = "mass", scale = 1016.0469088, default = "t", subdivs = { ["Lcwt"] = { 20, default = "t", unit = "-Lcwt" } }, }, ["metric ton"] = { symbol = "metric ton", usename = 1, utype = "mass", scale = 1000, default = "long ton", link = "Tonne", }, ["MT"] = { name1 = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "LT ST", link = "Tonne", }, ["Mt"] = { name1 = "megatonne", symbol = "Mt", utype = "mass", scale = 1000000000, default = "LT ST", link = "Tonne", }, ["oz"] = { name1 = "ounce", symbol = "oz", utype = "mass", scale = 0.028349523125, default = "g", }, ["ozt"] = { name1 = "troy ounce", symbol = "ozt", utype = "mass", scale = 0.0311034768, default = "oz g", }, ["pdr"] = { name1 = "pounder", symbol = "pdr", utype = "mass", scale = 0.45359237, default = "kg", link = "Pound (mass)", }, ["qtr"] = { name1 = "quarter", symbol = "qtr", utype = "mass", scale = 12.70058636, default = "lb kg", subdivs = { ["lb"] = { 28, default = "kg" } }, link = "Long quarter", }, ["Scwt"] = { name1 = "short hundredweight", name2 = "short hundredweight", symbol = "Scwt", usename = 1, utype = "mass", scale = 45.359237, default = "lb", link = "Hundredweight", }, ["short cwt"] = { name1 = "short hundredweight", name2 = "short hundredweight", symbol = "short&nbsp;cwt", utype = "mass", scale = 45.359237, default = "lb kg", link = "Hundredweight", }, ["short qtr"] = { name1 = "short quarter", symbol = "short&nbsp;qtr", utype = "mass", scale = 11.33980925, default = "lb kg", }, ["ST"] = { symbol = "short ton", usename = 1, utype = "mass", scale = 907.18474, default = "t", subdivs = { ["Scwt"] = { 20, default = "t", unit = "-Scwt" } }, }, ["shtn"] = { name1 = "short ton", symbol = "sh&nbsp;tn", utype = "mass", scale = 907.18474, default = "t", }, ["shton"] = { symbol = "ton", usename = 1, utype = "mass", scale = 907.18474, default = "t", }, ["solar mass"] = { name1 = "solar mass", name2 = "solar masses", symbol = "''M''<sub>☉</sub>", utype = "mass", scale = 1.98855e30, default = "kg", }, ["st"] = { name1 = "stone", name2 = "stone", symbol = "st", utype = "mass", scale = 6.35029318, default = "lb kg", subdivs = { ["lb"] = { 14, default = "kg lb" } }, link = "Stone (unit)", }, ["t"] = { name1 = "tonne", name1_us = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "LT ST", }, ["tonne"] = { name1 = "tonne", name1_us = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "shton", }, ["troy pound"] = { symbol = "troy pound", usename = 1, utype = "mass", scale = 0.3732417216, default = "lb kg", link = "Troy weight", }, ["usgalh2o"] = { name1 = "US gallon of water", name1_us = "U.S. gallon of water", name2 = "US gallons of water", name2_us = "U.S. gallons of water", symbol = "US&nbsp;gal H<sub>2</sub>O", utype = "mass", scale = 3.7776215836051126, default = "lb kg", link = "United States customary units#Fluid volume", }, ["viss"] = { name2 = "viss", symbol = "viss", utype = "mass", scale = 1.632932532, default = "kg", link = "Myanmar units of measurement#Mass", }, ["billion tonne"] = { target = "e9t", }, ["kilogram"] = { target = "kg", }, ["kilotonne"] = { target = "kt", }, ["lbs"] = { target = "lb", }, ["lbt"] = { target = "troy pound", }, ["lcwt"] = { target = "Lcwt", }, ["long ton"] = { target = "LT", }, ["mcg"] = { target = "μg", }, ["million tonne"] = { target = "e6t", }, ["scwt"] = { target = "Scwt", }, ["short ton"] = { target = "ST", }, ["stone"] = { target = "st", }, ["thousand tonne"] = { target = "e3t", }, ["tonnes"] = { target = "t", }, ["kg/kW"] = { name1 = "kilogram per kilowatt", name2 = "kilograms per kilowatt", symbol = "kg/kW", utype = "mass per unit power", scale = 0.001, default = "lb/hp", link = "Kilowatt", }, ["lb/hp"] = { name1 = "pound per horsepower", name2 = "pounds per horsepower", symbol = "lb/hp", utype = "mass per unit power", scale = 0.00060827738784176115, default = "kg/kW", link = "Horsepower", }, ["kg/h"] = { per = { "kg", "h" }, utype = "mass per unit time", default = "lb/h", }, ["lb/h"] = { per = { "lb", "h" }, utype = "mass per unit time", default = "kg/h", }, ["g-mol/d"] = { name1 = "gram-mole per day", name2 = "gram-moles per day", symbol = "g&#8209;mol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["g-mol/h"] = { name1 = "gram-mole per hour", name2 = "gram-moles per hour", symbol = "g&#8209;mol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["g-mol/min"] = { name1 = "gram-mole per minute", name2 = "gram-moles per minute", symbol = "g&#8209;mol/min", utype = "molar rate", scale = 0.016666666666666666, default = "g-mol/s", link = "Mole (unit)", }, ["g-mol/s"] = { name1 = "gram-mole per second", name2 = "gram-moles per second", symbol = "g&#8209;mol/s", utype = "molar rate", scale = 1, default = "lb-mol/min", link = "Mole (unit)", }, ["gmol/d"] = { name1 = "gram-mole per day", name2 = "gram-moles per day", symbol = "gmol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["gmol/h"] = { name1 = "gram-mole per hour", name2 = "gram-moles per hour", symbol = "gmol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["gmol/min"] = { name1 = "gram-mole per minute", name2 = "gram-moles per minute", symbol = "gmol/min", utype = "molar rate", scale = 0.016666666666666666, default = "gmol/s", link = "Mole (unit)", }, ["gmol/s"] = { name1 = "gram-mole per second", name2 = "gram-moles per second", symbol = "gmol/s", utype = "molar rate", scale = 1, default = "lbmol/min", link = "Mole (unit)", }, ["kmol/d"] = { name1 = "kilomole per day", name2 = "kilomoles per day", symbol = "kmol/d", utype = "molar rate", scale = 0.011574074074074073, default = "mmol/s", link = "Mole (unit)", }, ["kmol/h"] = { name1 = "kilomole per hour", name2 = "kilomoles per hour", symbol = "kmol/h", utype = "molar rate", scale = 0.27777777777777779, default = "mol/s", link = "Mole (unit)", }, ["kmol/min"] = { name1 = "kilomole per minute", name2 = "kilomoles per minute", symbol = "kmol/min", utype = "molar rate", scale = 16.666666666666668, default = "mol/s", link = "Kilomole (unit)", }, ["kmol/s"] = { name1 = "kilomole per second", name2 = "kilomoles per second", symbol = "kmol/s", utype = "molar rate", scale = 1000, default = "lb-mol/s", link = "Mole (unit)", }, ["lb-mol/d"] = { name1 = "pound-mole per day", name2 = "pound-moles per day", symbol = "lb&#8209;mol/d", utype = "molar rate", scale = 0.0052499116898148141, default = "mmol/s", link = "Pound-mole", }, ["lb-mol/h"] = { name1 = "pound-mole per hour", name2 = "pound-moles per hour", symbol = "lb&#8209;mol/h", utype = "molar rate", scale = 0.12599788055555555, default = "mol/s", link = "Pound-mole", }, ["lb-mol/min"] = { name1 = "pound-mole per minute", name2 = "pound-moles per minute", symbol = "lb&#8209;mol/min", utype = "molar rate", scale = 7.5598728333333334, default = "mol/s", link = "Pound-mole", }, ["lb-mol/s"] = { name1 = "pound-mole per second", name2 = "pound-moles per second", symbol = "lb&#8209;mol/s", utype = "molar rate", scale = 453.59237, default = "kmol/s", link = "Pound-mole", }, ["lbmol/d"] = { name1 = "pound-mole per day", name2 = "pound-moles per day", symbol = "lbmol/d", utype = "molar rate", scale = 0.0052499116898148141, default = "mmol/s", link = "Pound-mole", }, ["lbmol/h"] = { name1 = "pound-mole per hour", name2 = "pound-moles per hour", symbol = "lbmol/h", utype = "molar rate", scale = 0.12599788055555555, default = "mol/s", link = "Pound-mole", }, ["lbmol/min"] = { name1 = "pound-mole per minute", name2 = "pound-moles per minute", symbol = "lbmol/min", utype = "molar rate", scale = 7.5598728333333334, default = "mol/s", link = "Pound-mole", }, ["lbmol/s"] = { name1 = "pound-mole per second", name2 = "pound-moles per second", symbol = "lbmol/s", utype = "molar rate", scale = 453.59237, default = "kmol/s", link = "Pound-mole", }, ["mmol/s"] = { name1 = "millimole per second", name2 = "millimoles per second", symbol = "mmol/s", utype = "molar rate", scale = 0.001, default = "lb-mol/d", link = "Mole (unit)", }, ["mol/d"] = { name1 = "mole per day", name2 = "moles per day", symbol = "mol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["mol/h"] = { name1 = "mole per hour", name2 = "moles per hour", symbol = "mol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["mol/min"] = { name1 = "mole per minute", name2 = "moles per minute", symbol = "mol/min", utype = "molar rate", scale = 0.016666666666666666, default = "mol/s", link = "Mole (unit)", }, ["mol/s"] = { name1 = "mole per second", name2 = "moles per second", symbol = "mol/s", utype = "molar rate", scale = 1, default = "lb-mol/min", link = "Mole (unit)", }, ["μmol/s"] = { name1 = "micromole per second", name2 = "micromoles per second", symbol = "μmol/s", utype = "molar rate", scale = 0.000001, default = "lb-mol/d", link = "Mole (unit)", }, ["umol/s"] = { target = "μmol/s", }, ["/acre"] = { name1 = "per acre", name2 = "per acre", symbol = "/acre", utype = "per unit area", scale = 0.00024710538146716532, default = "/ha", link = "Acre", }, ["/ha"] = { name1 = "per hectare", name2 = "per hectare", symbol = "/ha", utype = "per unit area", scale = 100e-6, default = "/acre", link = "Hectare", }, ["/sqcm"] = { name1 = "per square centimetre", name1_us = "per square centimeter", name2 = "per square centimetre", name2_us = "per square centimeter", symbol = "/cm<sup>2</sup>", utype = "per unit area", scale = 1e4, default = "/sqin", link = "Square centimetre", }, ["/sqin"] = { name1 = "per square inch", name2 = "per square inch", symbol = "/in<sup>2</sup>", utype = "per unit area", scale = 1550.0031000062002, default = "/sqcm", link = "Square inch", }, ["/sqkm"] = { name1 = "per square kilometre", name1_us = "per square kilometer", name2 = "per square kilometre", name2_us = "per square kilometer", symbol = "/km<sup>2</sup>", utype = "per unit area", scale = 1e-6, default = "/sqmi", link = "Square kilometre", }, ["/sqmi"] = { name1 = "per square mile", name2 = "per square mile", symbol = "/sq&nbsp;mi", utype = "per unit area", scale = 3.8610215854244582e-7, default = "/sqkm", link = "Square mile", }, ["PD/acre"] = { name1 = "inhabitant per acre", name2 = "inhabitants per acre", symbol = "/acre", utype = "per unit area", scale = 0.00024710538146716532, default = "PD/ha", link = "Acre", }, ["PD/ha"] = { name1 = "inhabitant per hectare", name2 = "inhabitants per hectare", symbol = "/ha", utype = "per unit area", scale = 100e-6, default = "PD/acre", link = "Hectare", }, ["PD/sqkm"] = { name1 = "inhabitant per square kilometre", name1_us = "inhabitant per square kilometer", name2 = "inhabitants per square kilometre", name2_us = "inhabitants per square kilometer", symbol = "/km<sup>2</sup>", utype = "per unit area", scale = 1e-6, default = "PD/sqmi", link = "Square kilometre", }, ["PD/sqmi"] = { name1 = "inhabitant per square mile", name2 = "inhabitants per square mile", symbol = "/sq&nbsp;mi", utype = "per unit area", scale = 3.8610215854244582e-7, default = "PD/sqkm", link = "Square mile", }, ["/cm2"] = { target = "/sqcm", }, ["/in2"] = { target = "/sqin", }, ["/km2"] = { target = "/sqkm", }, ["pd/acre"] = { target = "PD/acre", }, ["pd/ha"] = { target = "PD/ha", }, ["PD/km2"] = { target = "PD/sqkm", }, ["pd/km2"] = { target = "PD/sqkm", }, ["PD/km²"] = { target = "PD/sqkm", }, ["pd/sqkm"] = { target = "PD/sqkm", }, ["pd/sqmi"] = { target = "PD/sqmi", }, ["/l"] = { name1 = "per litre", name1_us = "per liter", name2 = "per litre", name2_us = "per liter", symbol = "/l", utype = "per unit volume", scale = 1000, default = "/usgal", link = "Litre", }, ["/L"] = { name1 = "per litre", name1_us = "per liter", name2 = "per litre", name2_us = "per liter", symbol = "/L", utype = "per unit volume", scale = 1000, default = "/usgal", link = "Litre", }, ["/USgal"] = { name1 = "per gallon", name2 = "per gallon", symbol = "/gal", utype = "per unit volume", scale = 264.172052, default = "/L", link = "US gallon", customary= 2, }, ["/usgal"] = { target = "/USgal", }, ["bhp"] = { name1 = "brake horsepower", name2 = "brake horsepower", symbol = "bhp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Brake horsepower", }, ["Cal/d"] = { name1 = "large calorie per day", name2 = "large calories per day", symbol = "Cal/d", utype = "power", scale = 0.048425925925925928, default = "kJ/d", link = "Calorie", }, ["Cal/h"] = { name1 = "large calorie per hour", name2 = "large calories per hour", symbol = "Cal/h", utype = "power", scale = 1.1622222222222223, default = "kJ/h", link = "Calorie", }, ["cal/h"] = { name1 = "calorie per hour", name2 = "calories per hour", symbol = "cal/h", utype = "power", scale = 0.0011622222222222223, default = "W", link = "Calorie", }, ["CV"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "CV", utype = "power", scale = 735.49875, default = "kW", }, ["hk"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "hk", utype = "power", scale = 735.49875, default = "kW", }, ["hp"] = { name1 = "horsepower", name2 = "horsepower", symbol = "hp", utype = "power", scale = 745.69987158227022, default = "kW", }, ["hp-electric"] = { name1 = "electric horsepower", name2 = "electric horsepower", symbol = "hp", utype = "power", scale = 746, default = "kW", link = "Horsepower#Electrical horsepower", }, ["hp-electrical"] = { name1 = "electrical horsepower", name2 = "electrical horsepower", symbol = "hp", utype = "power", scale = 746, default = "kW", link = "Horsepower#Electrical horsepower", }, ["hp-metric"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "hp", utype = "power", scale = 735.49875, default = "kW", }, ["ihp"] = { name1 = "indicated horsepower", name2 = "indicated horsepower", symbol = "ihp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Indicated horsepower", }, ["kcal/h"] = { name1 = "kilocalorie per hour", name2 = "kilocalories per hour", symbol = "kcal/h", utype = "power", scale = 1.1622222222222223, default = "kW", link = "Calorie", }, ["kJ/d"] = { name1 = "kilojoule per day", name2 = "kilojoules per day", symbol = "kJ/d", utype = "power", scale = 0.011574074074074073, default = "Cal/d", link = "Kilojoule", }, ["kJ/h"] = { name1 = "kilojoule per hour", name2 = "kilojoules per hour", symbol = "kJ/h", utype = "power", scale = 0.27777777777777779, default = "W", link = "Kilojoule", }, ["PS"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "PS", utype = "power", scale = 735.49875, default = "kW", }, ["shp"] = { name1 = "shaft horsepower", name2 = "shaft horsepower", symbol = "shp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Shaft horsepower", }, ["W"] = { _name1 = "watt", _symbol = "W", utype = "power", scale = 1, prefixes = 1, default = "hp", link = "Watt", }, ["BTU/h"] = { per = { "BTU", "h" }, utype = "power", default = "W", }, ["Btu/h"] = { per = { "Btu", "h" }, utype = "power", default = "W", }, ["BHP"] = { target = "bhp", }, ["btu/h"] = { target = "BTU/h", }, ["HP"] = { target = "hp", }, ["Hp"] = { target = "hp", }, ["hp-mechanical"] = { target = "hp", }, ["IHP"] = { target = "ihp", }, ["SHP"] = { target = "shp", }, ["whp"] = { target = "hp", }, ["hp/lb"] = { name1 = "horsepower per pound", name2 = "horsepower per pound", symbol = "hp/lb", utype = "power per unit mass", scale = 1643.986806, default = "kW/kg", link = "Power-to-weight ratio", }, ["hp/LT"] = { name1 = "horsepower per long ton", name2 = "horsepower per long ton", symbol = "hp/LT", utype = "power per unit mass", scale = 0.73392268125000004, default = "kW/t", link = "Power-to-weight ratio", }, ["hp/ST"] = { name1 = "horsepower per short ton", name2 = "horsepower per short ton", symbol = "hp/ST", utype = "power per unit mass", scale = 0.821993403, default = "kW/t", link = "Power-to-weight ratio", }, ["hp/t"] = { name1 = "horsepower per tonne", name2 = "horsepower per tonne", symbol = "hp/t", utype = "power per unit mass", scale = 0.74569987158227022, default = "kW/t", link = "Power-to-weight ratio", }, ["kW/kg"] = { name1 = "kilowatt per kilogram", name2 = "kilowatts per kilogram", symbol = "kW/kg", utype = "power per unit mass", scale = 1000, default = "hp/lb", link = "Power-to-weight ratio", }, ["kW/t"] = { name1 = "kilowatt per tonne", name2 = "kilowatts per tonne", symbol = "kW/t", utype = "power per unit mass", scale = 1, default = "PS/t", link = "Power-to-weight ratio", }, ["PS/t"] = { name1 = "metric horsepower per tonne", name2 = "metric horsepower per tonne", symbol = "PS/t", utype = "power per unit mass", scale = 0.73549875, default = "kW/t", link = "Power-to-weight ratio", }, ["shp/lb"] = { name1 = "shaft horsepower per pound", name2 = "shaft horsepower per pound", symbol = "shp/lb", utype = "power per unit mass", scale = 1643.986806, default = "kW/kg", link = "Power-to-weight ratio", }, ["hp/tonne"] = { target = "hp/t", symbol = "hp/tonne", default = "kW/tonne", }, ["kW/tonne"] = { target = "kW/t", symbol = "kW/tonne", }, ["-lb/in2"] = { name1 = "pound per square inch", name2 = "pounds per square inch", symbol = "lb/in<sup>2</sup>", utype = "pressure", scale = 6894.7572931683608, default = "kPa kgf/cm2", }, ["atm"] = { name1 = "standard atmosphere", symbol = "atm", utype = "pressure", scale = 101325, default = "kPa", link = "Atmosphere (unit)", }, ["Ba"] = { name1 = "barye", symbol = "Ba", utype = "pressure", scale = 0.1, default = "Pa", }, ["bar"] = { symbol = "bar", utype = "pressure", scale = 100000, default = "kPa", link = "Bar (unit)", }, ["dbar"] = { name1 = "decibar", symbol = "dbar", utype = "pressure", scale = 10000, default = "kPa", link = "Bar (unit)", }, ["inHg"] = { name1 = "inch of mercury", name2 = "inches of mercury", symbol = "inHg", utype = "pressure", scale = 3386.388640341, default = "kPa", }, ["kBa"] = { name1 = "kilobarye", symbol = "kBa", utype = "pressure", scale = 100, default = "hPa", link = "Barye", }, ["kg-f/cm2"] = { name1 = "kilogram-force per square centimetre", name1_us = "kilogram-force per square centimeter", name2 = "kilograms-force per square centimetre", name2_us = "kilograms-force per square centimeter", symbol = "kg<sub>f</sub>/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["kg/cm2"] = { name1 = "kilogram per square centimetre", name1_us = "kilogram per square centimeter", name2 = "kilograms per square centimetre", name2_us = "kilograms per square centimeter", symbol = "kg/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["kgf/cm2"] = { name1 = "kilogram-force per square centimetre", name1_us = "kilogram-force per square centimeter", name2 = "kilograms-force per square centimetre", name2_us = "kilograms-force per square centimeter", symbol = "kgf/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["ksi"] = { name1 = "kilopound per square inch", name2 = "kilopounds per square inch", symbol = "ksi", utype = "pressure", scale = 6894757.2931683613, default = "MPa", link = "Pound per square inch", }, ["lbf/in2"] = { name1 = "pound-force per square inch", name2 = "pounds-force per square inch", symbol = "lbf/in<sup>2</sup>", utype = "pressure", scale = 6894.7572931683608, default = "kPa kgf/cm2", }, ["mb"] = { name1 = "millibar", symbol = "mb", utype = "pressure", scale = 100, default = "hPa", link = "Bar (unit)", }, ["mbar"] = { name1 = "millibar", symbol = "mbar", utype = "pressure", scale = 100, default = "hPa", link = "Bar (unit)", }, ["mmHg"] = { name1 = "millimetre of mercury", name1_us = "millimeter of mercury", name2 = "millimetres of mercury", name2_us = "millimeters of mercury", symbol = "mmHg", utype = "pressure", scale = 133.322387415, default = "kPa", }, ["Pa"] = { _name1 = "pascal", _symbol = "Pa", utype = "pressure", scale = 1, prefixes = 1, default = "psi", link = "Pascal (unit)", }, ["psf"] = { name1 = "pound per square foot", name2 = "pounds per square foot", symbol = "psf", utype = "pressure", scale = 47.880258980335839, default = "kPa", link = "Pound per square inch", }, ["psi"] = { name1 = "pound per square inch", name2 = "pounds per square inch", symbol = "psi", utype = "pressure", scale = 6894.7572931683608, default = "kPa", }, ["Torr"] = { name1 = "torr", symbol = "Torr", utype = "pressure", scale = 133.32236842105263, default = "kPa", }, ["N/cm2"] = { per = { "N", "cm2" }, utype = "pressure", default = "psi", }, ["N/m2"] = { per = { "N", "m2" }, utype = "pressure", default = "psi", }, ["g/cm2"] = { per = { "g", "cm2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["g/m2"] = { per = { "g", "m2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["kg/ha"] = { per = { "kg", "ha" }, utype = "pressure", default = "lb/acre", multiplier= 9.80665, }, ["kg/m2"] = { per = { "kg", "m2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["lb/1000sqft"] = { per = { "lb", "1000sqft" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["lb/acre"] = { per = { "lb", "acre" }, utype = "pressure", default = "kg/ha", multiplier= 9.80665, }, ["lb/sqft"] = { per = { "lb", "sqft" }, utype = "pressure", default = "kg/m2", multiplier= 9.80665, }, ["lb/sqyd"] = { per = { "lb", "sqyd" }, utype = "pressure", default = "kg/m2", multiplier= 9.80665, }, ["LT/acre"] = { per = { "LT", "acre" }, utype = "pressure", default = "t/ha", multiplier= 9.80665, }, ["MT/ha"] = { per = { "MT", "ha" }, utype = "pressure", default = "LT/acre ST/acre", multiplier= 9.80665, }, ["oz/sqft"] = { per = { "oz", "sqft" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["oz/sqyd"] = { per = { "oz", "sqyd" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["ST/acre"] = { per = { "ST", "acre" }, utype = "pressure", default = "t/ha", multiplier= 9.80665, }, ["t/ha"] = { per = { "t", "ha" }, utype = "pressure", default = "LT/acre ST/acre", multiplier= 9.80665, }, ["tonne/acre"] = { per = { "tonne", "acre" }, utype = "pressure", default = "tonne/ha", multiplier= 9.80665, }, ["tonne/ha"] = { per = { "tonne", "ha" }, utype = "pressure", default = "tonne/acre", multiplier= 9.80665, }, ["kgfpsqcm"] = { target = "kgf/cm2", }, ["kgpsqcm"] = { target = "kg/cm2", }, ["kN/m2"] = { target = "kPa", }, ["lb/in2"] = { target = "lbf/in2", }, ["torr"] = { target = "Torr", }, ["Bq"] = { _name1 = "becquerel", _symbol = "Bq", utype = "radioactivity", scale = 1, prefixes = 1, default = "pCi", link = "Becquerel", }, ["Ci"] = { _name1 = "curie", _symbol = "Ci", utype = "radioactivity", scale = 3.7e10, prefixes = 1, default = "GBq", link = "Curie (unit)", }, ["Rd"] = { _name1 = "rutherford", _symbol = "Rd", utype = "radioactivity", scale = 1e6, prefixes = 1, default = "MBq", link = "Rutherford (unit)", }, ["cm/h"] = { name1 = "centimetre per hour", name1_us = "centimeter per hour", name2 = "centimetres per hour", name2_us = "centimeters per hour", symbol = "cm/h", utype = "speed", scale = 2.7777777777777775e-6, default = "in/h", link = "Metre per second", }, ["cm/s"] = { name1 = "centimetre per second", name1_us = "centimeter per second", name2 = "centimetres per second", name2_us = "centimeters per second", symbol = "cm/s", utype = "speed", scale = 0.01, default = "in/s", link = "Metre per second", }, ["cm/year"] = { name1 = "centimetre per year", name1_us = "centimeter per year", name2 = "centimetres per year", name2_us = "centimeters per year", symbol = "cm/year", utype = "speed", scale = 3.168873850681143e-10, default = "in/year", link = "Orders of magnitude (speed)", }, ["foot/s"] = { name1 = "foot per second", name2 = "foot per second", symbol = "ft/s", utype = "speed", scale = 0.3048, default = "m/s", }, ["ft/min"] = { name1 = "foot per minute", name2 = "feet per minute", symbol = "ft/min", utype = "speed", scale = 0.00508, default = "m/min", link = "Feet per second", }, ["ft/s"] = { name1 = "foot per second", name2 = "feet per second", symbol = "ft/s", utype = "speed", scale = 0.3048, default = "m/s", link = "Feet per second", }, ["furlong per fortnight"] = { name2 = "furlongs per fortnight", symbol = "furlong per fortnight", usename = 1, utype = "speed", scale = 0.00016630952380952381, default = "km/h mph", link = "FFF system", }, ["in/h"] = { name1 = "inch per hour", name2 = "inches per hour", symbol = "in/h", utype = "speed", scale = 7.0555555555555559e-6, default = "cm/h", link = "Inch", }, ["in/s"] = { name1 = "inch per second", name2 = "inches per second", symbol = "in/s", utype = "speed", scale = 0.0254, default = "cm/s", link = "Inch", }, ["in/year"] = { name1 = "inch per year", name2 = "inches per year", symbol = "in/year", utype = "speed", scale = 8.0489395807301024e-10, default = "cm/year", link = "Orders of magnitude (speed)", }, ["isp"] = { name1 = "second", symbol = "s", utype = "speed", scale = 9.80665, default = "km/s", link = "Specific impulse", }, ["km/d"] = { name1 = "kilometre per day", name1_us = "kilometer per day", name2 = "kilometres per day", name2_us = "kilometers per day", symbol = "km/d", utype = "speed", scale = 1.1574074074074074e-2, default = "mi/d", link = "Orders of magnitude (speed)", }, ["km/h"] = { name1 = "kilometre per hour", name1_us = "kilometer per hour", name2 = "kilometres per hour", name2_us = "kilometers per hour", symbol = "km/h", utype = "speed", scale = 0.27777777777777779, default = "mph", link = "Kilometres per hour", }, ["km/s"] = { name1 = "kilometre per second", name1_us = "kilometer per second", name2 = "kilometres per second", name2_us = "kilometers per second", symbol = "km/s", utype = "speed", scale = 1000, default = "mi/s", link = "Metre per second", }, ["kn"] = { name1 = "knot", symbol = "kn", utype = "speed", scale = 0.51444444444444448, default = "km/h mph", link = "Knot (unit)", }, ["kNs/kg"] = { name2 = "kN&#8209;s/kg", symbol = "kN&#8209;s/kg", utype = "speed", scale = 1000, default = "isp", link = "Specific impulse", }, ["m/min"] = { name1 = "metre per minute", name1_us = "meter per minute", name2 = "metres per minute", name2_us = "meters per minute", symbol = "m/min", utype = "speed", scale = 0.016666666666666666, default = "ft/min", link = "Metre per second", }, ["m/s"] = { name1 = "metre per second", name1_us = "meter per second", name2 = "metres per second", name2_us = "meters per second", symbol = "m/s", utype = "speed", scale = 1, default = "ft/s", }, ["Mach"] = { name2 = "Mach", symbol = "Mach", utype = "speed", builtin = "mach", scale = 0, iscomplex= true, default = "km/h mph", link = "Mach number", }, ["mi/d"] = { name1 = "mile per day", name2 = "miles per day", symbol = "mi/d", utype = "speed", scale = 1.8626666666666667e-2, default = "km/d", link = "Orders of magnitude (speed)", }, ["mi/s"] = { name1 = "mile per second", name2 = "miles per second", symbol = "mi/s", utype = "speed", scale = 1609.344, default = "km/s", link = "Mile", }, ["mm/h"] = { name1 = "millimetre per hour", name1_us = "millimeter per hour", name2 = "millimetres per hour", name2_us = "millimeters per hour", symbol = "mm/h", utype = "speed", scale = 2.7777777777777781e-7, default = "in/h", link = "Metre per second", }, ["mph"] = { name1 = "mile per hour", name2 = "miles per hour", symbol = "mph", utype = "speed", scale = 0.44704, default = "km/h", link = "Miles per hour", }, ["Ns/kg"] = { name2 = "N&#8209;s/kg", symbol = "N&#8209;s/kg", utype = "speed", scale = 1, default = "isp", link = "Specific impulse", }, ["si tsfc"] = { name2 = "g/(kN⋅s)", symbol = "g/(kN⋅s)", utype = "speed", scale = 9.9999628621379242e-7, invert = -1, iscomplex= true, default = "tsfc", link = "Thrust specific fuel consumption", }, ["tsfc"] = { name2 = "lb/(lbf⋅h)", symbol = "lb/(lbf⋅h)", utype = "speed", scale = 2.832545036049801e-5, invert = -1, iscomplex= true, default = "si tsfc", link = "Thrust specific fuel consumption", }, ["cm/y"] = { target = "cm/year", }, ["cm/yr"] = { target = "cm/year", }, ["in/y"] = { target = "in/year", }, ["in/yr"] = { target = "in/year", }, ["knot"] = { target = "kn", }, ["knots"] = { target = "kn", }, ["kph"] = { target = "km/h", }, ["mi/h"] = { target = "mph", }, ["mm/s"] = { per = { "mm", "s" }, utype = "speed", default = "in/s", link = "Metre per second", }, ["C"] = { name1 = "degree Celsius", name2 = "degrees Celsius", symbol = "°C", usesymbol= 1, utype = "temperature", scale = 1, offset = -273.15, iscomplex= true, istemperature= true, default = "F", link = "Celsius", }, ["F"] = { name1 = "degree Fahrenheit", name2 = "degrees Fahrenheit", symbol = "°F", usesymbol= 1, utype = "temperature", scale = 0.55555555555555558, offset = 32-273.15*(9/5), iscomplex= true, istemperature= true, default = "C", link = "Fahrenheit", }, ["K"] = { _name1 = "kelvin", _symbol = "K", usesymbol= 1, utype = "temperature", scale = 1, offset = 0, iscomplex= true, istemperature= true, prefixes = 1, default = "C F", link = "Kelvin", }, ["keVT"] = { name1 = "kiloelectronvolt", symbol = "keV", utype = "temperature", scale = 11.604505e6, offset = 0, iscomplex= true, default = "MK", link = "Electronvolt", }, ["R"] = { name1 = "degree Rankine", name2 = "degrees Rankine", symbol = "°R", usesymbol= 1, utype = "temperature", scale = 0.55555555555555558, offset = 0, iscomplex= true, istemperature= true, default = "K F C", link = "Rankine scale", }, ["Celsius"] = { target = "C", }, ["°C"] = { target = "C", }, ["°F"] = { target = "F", }, ["°R"] = { target = "R", }, ["C-change"] = { name1 = "degree Celsius change", name2 = "degrees Celsius change", symbol = "°C", usesymbol= 1, utype = "temperature change", scale = 1, default = "F-change", link = "Celsius", }, ["F-change"] = { name1 = "degree Fahrenheit change", name2 = "degrees Fahrenheit change", symbol = "°F", usesymbol= 1, utype = "temperature change", scale = 0.55555555555555558, default = "C-change", link = "Fahrenheit", }, ["K-change"] = { name1 = "kelvin change", name2 = "kelvins change", symbol = "K", usesymbol= 1, utype = "temperature change", scale = 1, default = "F-change", link = "Kelvin", }, ["°C-change"] = { target = "C-change", }, ["°F-change"] = { target = "F-change", }, ["century"] = { name1 = "century", name2 = "centuries", symbol = "ha", utype = "time", scale = 3155760000, default = "Gs", }, ["d"] = { name1 = "day", symbol = "d", utype = "time", scale = 86400, default = "ks", }, ["decade"] = { name1 = "decade", symbol = "daa", utype = "time", scale = 315576000, default = "Ms", }, ["dog year"] = { name1 = "dog year", symbol = "dog yr", utype = "time", scale = 220903200, default = "years", link = "List of unusual units of measurement#Dog year", }, ["fortnight"] = { symbol = "fortnight", usename = 1, utype = "time", scale = 1209600, default = "week", }, ["h"] = { name1 = "hour", symbol = "h", utype = "time", scale = 3600, default = "ks", }, ["long billion year"] = { name1 = "billion years", name2 = "billion years", symbol = "Ta", utype = "time", scale = 31557600000000000000, default = "Es", link = "Annum", }, ["millennium"] = { name1 = "millennium", name2 = "millennia", symbol = "ka", utype = "time", scale = 31557600000, default = "Gs", }, ["milliard year"] = { name1 = "milliard years", name2 = "milliard years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["million year"] = { name1 = "million years", name2 = "million years", symbol = "Ma", utype = "time", scale = 31557600000000, default = "Ts", link = "Annum", }, ["min"] = { name1 = "minute", symbol = "min", utype = "time", scale = 60, default = "s", }, ["month"] = { symbol = "month", usename = 1, utype = "time", scale = 2629800, default = "Ms", }, ["months"] = { name1 = "month", symbol = "mo", utype = "time", scale = 2629800, default = "year", }, ["s"] = { _name1 = "second", _symbol = "s", utype = "time", scale = 1, prefixes = 1, default = "v < 7200 ! min ! h", link = "Second", }, ["short billion year"] = { name1 = "billion years", name2 = "billion years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["short trillion year"] = { name1 = "trillion years", name2 = "trillion years", symbol = "Ta", utype = "time", scale = 31557600000000000000, default = "Es", link = "Annum", }, ["thousand million year"] = { name1 = "thousand million years", name2 = "thousand million years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["wk"] = { symbol = "week", usename = 1, utype = "time", scale = 604800, default = "Ms", }, ["year"] = { name1 = "year", symbol = "a", utype = "time", scale = 31557600, default = "Ms", link = "Annum", }, ["years"] = { name1 = "year", symbol = "yr", utype = "time", scale = 31557600, default = "Ms", link = "Annum", }, ["byr"] = { target = "short billion year", }, ["day"] = { target = "d", }, ["days"] = { target = "d", }, ["dog yr"] = { target = "dog year", }, ["Gyr"] = { target = "thousand million year", }, ["hour"] = { target = "h", }, ["hours"] = { target = "h", }, ["kMyr"] = { target = "thousand million year", }, ["kmyr"] = { target = "thousand million year", }, ["kyr"] = { target = "millennium", }, ["long byr"] = { target = "long billion year", }, ["minute"] = { target = "min", }, ["minutes"] = { target = "min", }, ["mth"] = { target = "month", }, ["Myr"] = { target = "million year", }, ["myr"] = { target = "million year", }, ["sec"] = { target = "s", }, ["second"] = { target = "s", }, ["seconds"] = { target = "s", }, ["tmyr"] = { target = "thousand million year", }, ["tryr"] = { target = "short trillion year", }, ["tyr"] = { target = "millennium", }, ["week"] = { target = "wk", }, ["weeks"] = { target = "wk", }, ["yr"] = { target = "year", }, ["kg.m"] = { name1 = "kilogram metre", name1_us = "kilogram meter", symbol = "kg⋅m", utype = "torque", scale = 9.80665, default = "Nm lbft", link = "Kilogram metre (torque)", }, ["kgf.m"] = { name1 = "kilogram force-metre", name1_us = "kilogram force-meter", symbol = "kgf⋅m", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["kgm"] = { name1 = "kilogram metre", name1_us = "kilogram meter", symbol = "kg⋅m", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["kpm"] = { name1 = "kilopond metre", name1_us = "kilopond meter", symbol = "kp⋅m", utype = "torque", scale = 9.80665, default = "Nm lbft", link = "Kilogram metre (torque)", }, ["lb-fft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "ft⋅lb<sub>f</sub>", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lb.ft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "lb⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lb.in"] = { name1 = "pound force-inch", symbol = "lb⋅in", utype = "torque", scale = 0.1129848290276167, default = "mN.m", link = "Pound-foot (torque)", }, ["lbfft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "lbf⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lbft"] = { name1 = "pound-foot", name2 = "pound-feet", symbol = "lb⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["m.kg-f"] = { name1 = "metre kilogram-force", name1_us = "meter kilogram-force", name2 = "metre kilograms-force", name2_us = "meter kilograms-force", symbol = "m⋅kg<sub>f</sub>", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["m.kgf"] = { name1 = "metre kilogram-force", name1_us = "meter kilogram-force", name2 = "metre kilograms-force", name2_us = "meter kilograms-force", symbol = "m⋅kgf", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["mN.m"] = { name1 = "millinewton-metre", name1_us = "millinewton-meter", symbol = "mN⋅m", utype = "torque", scale = 0.001, default = "lb.in", link = "Newton-metre", }, ["Nm"] = { _name1 = "newton-metre", _name1_us= "newton-meter", _symbol = "N⋅m", utype = "torque", alttype = "energy", scale = 1, prefixes = 1, default = "lbfft", link = "Newton-metre", }, ["kN/m"] = { per = { "kN", "-m-stiff" }, utype = "torque", default = "lbf/in", }, ["lbf/in"] = { per = { "lbf", "-in-stiff" }, utype = "torque", default = "kN/m", }, ["lb-f.ft"] = { target = "lb-fft", }, ["lbf.ft"] = { target = "lbfft", }, ["lbf·ft"] = { target = "lbfft", }, ["lb·ft"] = { target = "lb.ft", }, ["mkg-f"] = { target = "m.kg-f", }, ["mkgf"] = { target = "m.kgf", }, ["N.m"] = { target = "Nm", }, ["N·m"] = { target = "Nm", }, ["ton-mile"] = { symbol = "ton-mile", usename = 1, utype = "transportation", scale = 1.4599723182105602, default = "tkm", }, ["tkm"] = { name1 = "tonne-kilometre", name1_us = "tonne-kilometer", symbol = "tkm", utype = "transportation", scale = 1, default = "ton-mile", }, ["-12USoz(mL)serve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", utype = "volume", scale = 0.00035488235475000004, default = "mL", link = "Beverage can#Standard sizes", }, ["-12USoz(ml)serve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", utype = "volume", scale = 0.00035488235475000004, default = "ml", link = "Beverage can#Standard sizes", }, ["-12USozserve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz serving", utype = "volume", scale = 0.00035488235475000004, default = "mL", link = "Beverage can#Standard sizes", }, ["acre-foot"] = { name1 = "acre-foot", name2 = "acre-foot", symbol = "acre⋅ft", utype = "volume", scale = 1233.48183754752, default = "m3", }, ["acre-ft"] = { name1 = "acre-foot", name2 = "acre-feet", symbol = "acre⋅ft", utype = "volume", scale = 1233.48183754752, default = "m3", }, ["AUtbsp"] = { name1 = "Australian tablespoon", symbol = "AU&nbsp;tbsp", utype = "volume", scale = 0.000020, default = "ml", }, ["Bcuft"] = { name1 = "billion cubic foot", name2 = "billion cubic feet", symbol = "billion cu&nbsp;ft", utype = "volume", scale = 28316846.592, default = "Gl", link = "Cubic foot", }, ["bdft"] = { name1 = "board foot", name2 = "board feet", symbol = "bd&nbsp;ft", utype = "volume", scale = 0.0023597372167, default = "m3", }, ["board feet"] = { name2 = "board feet", symbol = "board foot", usename = 1, utype = "volume", scale = 0.0023597372167, default = "m3", }, ["board foot"] = { name2 = "board foot", symbol = "board foot", usename = 1, utype = "volume", scale = 0.0023597372167, default = "m3", }, ["cc"] = { name1 = "cubic centimetre", name1_us = "cubic centimeter", symbol = "cc", utype = "volume", scale = 0.000001, default = "cuin", }, ["CID"] = { name1 = "cubic inch", name2 = "cubic inches", symbol = "cu&nbsp;in", utype = "volume", scale = 0.000016387064, default = "cc", link = "Cubic inch#Engine displacement", }, ["cord"] = { symbol = "cord", utype = "volume", scale = 3.624556363776, default = "m3", link = "Cord (unit)", }, ["cufoot"] = { name1 = "cubic foot", name2 = "cubic foot", symbol = "cu&nbsp;ft", utype = "volume", scale = 0.028316846592, default = "m3", }, ["cuft"] = { name1 = "cubic foot", name2 = "cubic feet", symbol = "cu&nbsp;ft", utype = "volume", scale = 0.028316846592, default = "m3", }, ["cuin"] = { name1 = "cubic inch", name2 = "cubic inches", symbol = "cu&nbsp;in", utype = "volume", scale = 0.000016387064, default = "cm3", }, ["cumi"] = { name1 = "cubic mile", symbol = "cu&nbsp;mi", utype = "volume", scale = 4168181825.440579584, default = "km3", }, ["cuyd"] = { name1 = "cubic yard", symbol = "cu&nbsp;yd", utype = "volume", scale = 0.764554857984, default = "m3", }, ["firkin"] = { symbol = "firkin", usename = 1, utype = "volume", scale = 0.04091481, default = "L impgal USgal", link = "Firkin (unit)", }, ["foot3"] = { target = "cufoot", }, ["Goilbbl"] = { name1 = "billion barrels", name2 = "billion barrels", symbol = "Gbbl", utype = "volume", scale = 158987294.928, default = "v * 1.58987294928 < 10 ! e6 ! e9 ! m3", link = "Barrel (unit)#Oil barrel", }, ["gr water"] = { name1 = "grains water", name2 = "grains water", symbol = "gr H<sub>2</sub>O", utype = "volume", scale = 0.00000006479891, default = "cm3", link = "Grain (unit)", }, ["grt"] = { name1 = "gross register ton", symbol = "grt", utype = "volume", scale = 2.8316846592, default = "m3", link = "Gross register tonnage", }, ["impbbl"] = { name1 = "imperial barrel", symbol = "imp&nbsp;bbl", utype = "volume", scale = 0.16365924, default = "L impgal USgal", link = "Barrel (unit)", }, ["impbsh"] = { name1 = "imperial bushel", symbol = "imp&nbsp;bsh", utype = "volume", scale = 0.03636872, default = "L impgal USdrygal", }, ["impbu"] = { name1 = "imperial bushel", symbol = "imp&nbsp;bu", utype = "volume", scale = 0.03636872, default = "m3", }, ["impgal"] = { name1 = "imperial gallon", symbol = "imp&nbsp;gal", utype = "volume", scale = 0.00454609, default = "L USgal", }, ["impgi"] = { name1 = "gill", symbol = "gi", utype = "volume", scale = 0.0001420653125, default = "ml USoz", link = "Gill (unit)", }, ["impkenning"] = { name1 = "imperial kenning", symbol = "kenning", utype = "volume", scale = 0.01818436, default = "L USdrygal", link = "Kenning (unit)", }, ["impoz"] = { name1 = "imperial fluid ounce", symbol = "imp&nbsp;fl&nbsp;oz", utype = "volume", scale = 0.0000284130625, default = "ml USoz", }, ["imppk"] = { name1 = "imperial peck", symbol = "pk", utype = "volume", scale = 0.00909218, default = "L USdrygal", link = "Peck", }, ["imppt"] = { name1 = "imperial pint", symbol = "imp&nbsp;pt", utype = "volume", scale = 0.00056826125, default = "L", }, ["impqt"] = { name1 = "imperial quart", symbol = "imp&nbsp;qt", utype = "volume", scale = 0.0011365225, default = "ml USoz", customary= 3, }, ["kilderkin"] = { symbol = "kilderkin", usename = 1, utype = "volume", scale = 0.08182962, default = "L impgal USgal", }, ["koilbbl"] = { name1 = "thousand barrels", name2 = "thousand barrels", symbol = "kbbl", utype = "volume", scale = 158.987294928, default = "v * 1.58987294928 < 10 ! ! e3 ! m3", link = "Barrel (unit)#Oil barrel", }, ["L"] = { _name1 = "litre", _name1_us= "liter", _symbol = "L", utype = "volume", scale = 0.001, prefixes = 1, default = "impgal USgal", link = "Litre", }, ["l"] = { _name1 = "litre", _name1_us= "liter", _symbol = "l", utype = "volume", scale = 0.001, prefixes = 1, default = "impgal USgal", link = "Litre", }, ["ll"] = { name1 = "litre", name1_us = "liter", symbol = "l", utype = "volume", scale = 0.001, default = "impgal USgal", }, ["m3"] = { _name1 = "cubic metre", _name1_us= "cubic meter", _symbol = "m<sup>3</sup>", prefix_position= 7, utype = "volume", scale = 1, prefixes = 3, default = "cuft", link = "Cubic metre", }, ["Mbbl"] = { name1 = "thousand barrels", name2 = "thousand barrels", symbol = "Mbbl", utype = "volume", scale = 158.987294928, default = "v * 1.58987294928 < 10 ! e3 ! ! m3", link = "Barrel (unit)#Oil barrel", }, ["MMoilbbl"] = { name1 = "million barrels", name2 = "million barrels", symbol = "MMbbl", utype = "volume", scale = 158987.294928, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3", link = "Barrel (unit)#Oil barrel", }, ["Moilbbl"] = { name1 = "million barrels", name2 = "million barrels", symbol = "Mbbl", utype = "volume", scale = 158987.294928, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3", link = "Barrel (unit)#Oil barrel", }, ["MTON"] = { name1 = "measurement ton", symbol = "MTON", utype = "volume", scale = 1.13267386368, default = "m3", }, ["MUSgal"] = { name1 = "million US gallons", name1_us = "million U.S. gallons", name2 = "million US gallons", name2_us = "million U.S. gallons", symbol = "million US&nbsp;gal", sym_us = "million U.S.&nbsp;gal", utype = "volume", scale = 3785.411784, default = "Ml", link = "US gallon", }, ["oilbbl"] = { name1 = "barrel", symbol = "bbl", utype = "volume", scale = 0.158987294928, default = "m3", link = "Barrel (unit)#Oil barrel", }, ["stere"] = { symbol = "stere", usename = 1, utype = "volume", scale = 1, default = "cuft", }, ["Toilbbl"] = { name1 = "trillion barrels", name2 = "trillion barrels", symbol = "Tbbl", utype = "volume", scale = 158987294928, default = "v * 1.58987294928 < 10 ! e9 ! e12 ! m3", link = "Barrel (unit)#Oil barrel", }, ["USbbl"] = { name1 = "US barrel", name1_us = "U.S. barrel", symbol = "US&nbsp;bbl", sym_us = "U.S.&nbsp;bbl", utype = "volume", scale = 0.119240471196, default = "L USgal impgal", link = "Barrel (unit)", }, ["USbeerbbl"] = { name1 = "US beer barrel", name1_us = "U.S. beer barrel", symbol = "US&nbsp;bbl", sym_us = "U.S.&nbsp;bbl", utype = "volume", scale = 0.117347765304, default = "L USgal impgal", link = "Barrel (unit)", }, ["USbsh"] = { name1 = "US bushel", name1_us = "U.S. bushel", symbol = "US&nbsp;bsh", sym_us = "U.S.&nbsp;bsh", utype = "volume", scale = 0.03523907016688, default = "L USdrygal impgal", link = "Bushel", }, ["USbu"] = { name1 = "US bushel", name1_us = "U.S. bushel", symbol = "US&nbsp;bu", sym_us = "U.S.&nbsp;bu", utype = "volume", scale = 0.03523907016688, default = "L USdrygal impgal", link = "Bushel", }, ["USdrybbl"] = { name1 = "US dry barrel", name1_us = "U.S. dry barrel", symbol = "US&nbsp;dry&nbsp;bbl", sym_us = "U.S.&nbsp;dry&nbsp;bbl", utype = "volume", scale = 0.11562819898508, default = "m3", link = "Barrel (unit)", }, ["USdrygal"] = { name1 = "US dry gallon", name1_us = "U.S. dry gallon", symbol = "US&nbsp;dry&nbsp;gal", sym_us = "U.S.&nbsp;dry&nbsp;gal", utype = "volume", scale = 0.00440488377086, default = "L", link = "Gallon", }, ["USdrypt"] = { name1 = "US dry pint", name1_us = "U.S. dry pint", symbol = "US&nbsp;dry&nbsp;pt", sym_us = "U.S.&nbsp;dry&nbsp;pt", utype = "volume", scale = 0.0005506104713575, default = "ml", link = "Pint", }, ["USdryqt"] = { name1 = "US dry quart", name1_us = "U.S. dry quart", symbol = "US&nbsp;dry&nbsp;qt", sym_us = "U.S.&nbsp;dry&nbsp;qt", utype = "volume", scale = 0.001101220942715, default = "ml", link = "Quart", }, ["USflgal"] = { name1 = "US gallon", name1_us = "U.S. gallon", symbol = "US fl gal", sym_us = "U.S.&nbsp;fl&nbsp;gal", utype = "volume", scale = 0.003785411784, default = "L impgal", link = "Gallon", }, ["USgal"] = { name1 = "US gallon", name1_us = "U.S. gallon", symbol = "US&nbsp;gal", sym_us = "U.S.&nbsp;gal", utype = "volume", scale = 0.003785411784, default = "L impgal", }, ["USgi"] = { name1 = "gill", symbol = "gi", utype = "volume", scale = 0.0001182941183, default = "ml impoz", link = "Gill (unit)", }, ["USkenning"] = { name1 = "US kenning", name1_us = "U.S. kenning", symbol = "US&nbsp;kenning", sym_us = "U.S.&nbsp;kenning", utype = "volume", scale = 0.01761953508344, default = "L impgal", link = "Kenning (unit)", }, ["USmin"] = { name1 = "US minim", name1_us = "U.S. minim", symbol = "US&nbsp;min", sym_us = "U.S.&nbsp;min", utype = "volume", scale = 0.000000061611519921875, default = "ml", link = "Minim (unit)", }, ["USoz"] = { name1 = "US fluid ounce", name1_us = "U.S. fluid ounce", symbol = "US&nbsp;fl&nbsp;oz", sym_us = "U.S.&nbsp;fl&nbsp;oz", utype = "volume", scale = 0.0000295735295625, default = "ml", }, ["USpk"] = { name1 = "US peck", name1_us = "U.S. peck", symbol = "US&nbsp;pk", sym_us = "U.S.&nbsp;pk", utype = "volume", scale = 0.00880976754172, default = "L impgal", link = "Peck", }, ["USpt"] = { name1 = "US pint", name1_us = "U.S. pint", symbol = "US&nbsp;pt", sym_us = "U.S.&nbsp;pt", utype = "volume", scale = 0.000473176473, default = "L imppt", link = "Pint", }, ["USqt"] = { name1 = "US quart", name1_us = "U.S. quart", symbol = "US&nbsp;qt", sym_us = "U.S.&nbsp;qt", utype = "volume", scale = 0.000946352946, default = "ml", link = "Quart", customary= 1, }, ["USquart"] = { name1 = "US quart", name1_us = "U.S. quart", symbol = "US&nbsp;qt", sym_us = "U.S.&nbsp;qt", utype = "volume", scale = 0.000946352946, default = "ml impoz", link = "Quart", }, ["UStbsp"] = { name1 = "US tablespoon", name1_us = "U.S. tablespoon", symbol = "US&nbsp;tbsp", sym_us = "U.S.&nbsp;tbsp", utype = "volume", scale = 1.4786764781250001e-5, default = "ml", }, ["winecase"] = { symbol = "case", usename = 1, utype = "volume", scale = 0.009, default = "L", link = "Case (goods)", }, ["*U.S.drygal"] = { target = "USdrygal", sp_us = true, customary= 2, }, ["*U.S.gal"] = { target = "USgal", sp_us = true, customary= 2, }, ["+USdrygal"] = { target = "USdrygal", customary= 1, }, ["+usfloz"] = { target = "USoz", link = "Fluid ounce", customary= 1, }, ["+USgal"] = { target = "USgal", customary= 1, }, ["+USoz"] = { target = "USoz", customary= 1, }, ["@impgal"] = { target = "impgal", link = "Gallon", customary= 3, }, ["acre feet"] = { target = "acre-ft", }, ["acre foot"] = { target = "acre-foot", }, ["acre ft"] = { target = "acre-ft", }, ["acre-feet"] = { target = "acre-ft", }, ["acre.foot"] = { target = "acre-foot", }, ["acre.ft"] = { target = "acre-ft", }, ["acre·ft"] = { target = "acre-ft", }, ["bushels"] = { target = "USbsh", }, ["cid"] = { target = "CID", }, ["ft3"] = { target = "cuft", }, ["gal"] = { target = "USgal", }, ["gallon"] = { shouldbe = "Use %{USgal%} for US gallons or %{impgal%} for imperial gallons (not %{gallon%})", }, ["gallons"] = { shouldbe = "Use %{USgal%} for US gallons or %{impgal%} for imperial gallons (not %{gallons%})", }, ["Gcuft"] = { target = "e9cuft", }, ["impfloz"] = { target = "impoz", }, ["Impgal"] = { target = "impgal", }, ["in3"] = { target = "cuin", symbol = "in<sup>3</sup>", }, ["hm³"] = { target = "hm3", }, ["kcuft"] = { target = "e3cuft", }, ["kcum"] = { target = "e3m3", }, ["km³"] = { target = "km3", }, ["liter"] = { target = "L", sp_us = true, }, ["liters"] = { target = "L", sp_us = true, }, ["litre"] = { target = "L", }, ["litres"] = { target = "L", }, ["Mcuft"] = { target = "e6cuft", }, ["Mcum"] = { target = "e6m3", }, ["Mft3"] = { target = "e6cuft", }, ["mi3"] = { target = "cumi", }, ["m³"] = { target = "m3", }, ["Pcuft"] = { target = "e15cuft", }, ["pt"] = { shouldbe = "Use %{USpt%} for US pints or %{imppt%} for imperial pints (not %{pt%})", }, ["qt"] = { shouldbe = "Use %{USqt%} for US quarts or %{impqt%} for imperial quarts (not %{qt%})", }, ["Tcuft"] = { target = "e12cuft", }, ["Tft3"] = { target = "e12cuft", }, ["U.S.bbl"] = { target = "USbbl", sp_us = true, default = "L U.S.gal impgal", }, ["U.S.beerbbl"] = { target = "USbeerbbl", sp_us = true, default = "L U.S.gal impgal", }, ["U.S.bsh"] = { target = "USbsh", sp_us = true, default = "L U.S.drygal impgal", }, ["U.S.bu"] = { target = "USbu", sp_us = true, default = "L U.S.drygal impgal", }, ["U.S.drybbl"] = { target = "USdrybbl", sp_us = true, }, ["U.S.drygal"] = { target = "USdrygal", sp_us = true, }, ["U.S.drypt"] = { target = "USdrypt", sp_us = true, }, ["U.S.dryqt"] = { target = "USdryqt", sp_us = true, }, ["U.S.flgal"] = { target = "USflgal", sp_us = true, }, ["U.S.floz"] = { target = "USoz", sp_us = true, }, ["U.S.gal"] = { target = "USgal", sp_us = true, link = "U.S. gallon", }, ["u.s.gal"] = { target = "USgal", sp_us = true, link = "U.S. gallon", }, ["U.S.gi"] = { target = "USgi", sp_us = true, }, ["U.S.kenning"] = { target = "USkenning", sp_us = true, }, ["U.S.oz"] = { target = "USoz", sp_us = true, }, ["U.S.pk"] = { target = "USpk", sp_us = true, }, ["U.S.pt"] = { target = "USpt", sp_us = true, }, ["U.S.qt"] = { target = "USqt", sp_us = true, default = "L impqt", customary= 2, }, ["usbbl"] = { target = "USbbl", }, ["usbeerbbl"] = { target = "USbeerbbl", }, ["usbsh"] = { target = "USbsh", }, ["usbu"] = { target = "USbu", }, ["usdrybbl"] = { target = "USdrybbl", }, ["usdrygal"] = { target = "USdrygal", }, ["usdrypt"] = { target = "USdrypt", }, ["usdryqt"] = { target = "USdryqt", }, ["USfloz"] = { target = "USoz", }, ["usfloz"] = { target = "USoz", }, ["USGAL"] = { target = "USgal", }, ["usgal"] = { target = "USgal", }, ["usgi"] = { target = "USgi", }, ["uskenning"] = { target = "USkenning", }, ["usoz"] = { target = "USoz", }, ["uspk"] = { target = "USpk", }, ["uspt"] = { target = "USpt", }, ["usqt"] = { target = "USqt", }, ["yd3"] = { target = "cuyd", }, ["cuft/sqmi"] = { per = { "cuft", "sqmi" }, utype = "volume per unit area", default = "m3/km2", }, ["m3/ha"] = { name1 = "cubic metre per hectare", name1_us = "cubic meter per hectare", name2 = "cubic metres per hectare", name2_us = "cubic meters per hectare", symbol = "m<sup>3</sup>/ha", utype = "volume per unit area", scale = 0.0001, default = "USbu/acre", link = "Hectare", }, ["m3/km2"] = { per = { "m3", "km2" }, utype = "volume per unit area", default = "cuft/sqmi", }, ["U.S.gal/acre"] = { per = { "U.S.gal", "acre" }, utype = "volume per unit area", default = "m3/km2", }, ["USbu/acre"] = { name2 = "US bushels per acre", symbol = "US bushel per acre", usename = 1, utype = "volume per unit area", scale = 8.7077638761350888e-6, default = "m3/ha", link = "Bushel", }, ["USgal/acre"] = { per = { "USgal", "acre" }, utype = "volume per unit area", default = "m3/km2", }, ["cuyd/mi"] = { per = { "cuyd", "mi" }, utype = "volume per unit length", default = "m3/km", }, ["m3/km"] = { per = { "m3", "km" }, utype = "volume per unit length", default = "cuyd/mi", }, ["mich"] = { combination= { "ch", "mi" }, multiple = { 80 }, utype = "length", }, ["michlk"] = { combination= { "chlk", "mi" }, multiple = { 80 }, utype = "length", }, ["michainlk"] = { combination= { "chainlk", "mi" }, multiple = { 80 }, utype = "length", }, ["miyd"] = { combination= { "yd", "mi" }, multiple = { 1760 }, utype = "length", }, ["miydftin"] = { combination= { "in", "ft", "yd", "mi" }, multiple = { 12, 3, 1760 }, utype = "length", }, ["mift"] = { combination= { "ft", "mi" }, multiple = { 5280 }, utype = "length", }, ["ydftin"] = { combination= { "in", "ft", "yd" }, multiple = { 12, 3 }, utype = "length", }, ["ydft"] = { combination= { "ft", "yd" }, multiple = { 3 }, utype = "length", }, ["ftin"] = { combination= { "in", "ft" }, multiple = { 12 }, utype = "length", }, ["footin"] = { combination= { "in", "foot" }, multiple = { 12 }, utype = "length", }, ["handin"] = { combination= { "in", "hand" }, multiple = { 4 }, utype = "length", }, ["lboz"] = { combination= { "oz", "lb" }, multiple = { 16 }, utype = "mass", }, ["stlb"] = { combination= { "lb", "st" }, multiple = { 14 }, utype = "mass", }, ["stlboz"] = { combination= { "oz", "lb", "st" }, multiple = { 16, 14 }, utype = "mass", }, ["st and lb"] = { combination= { "lb", "st" }, multiple = { 14 }, utype = "mass", }, ["GN LTf"] = { combination= { "GN", "-LTf" }, utype = "force", }, ["GN LTf STf"] = { combination= { "GN", "-LTf", "-STf" }, utype = "force", }, ["GN STf"] = { combination= { "GN", "-STf" }, utype = "force", }, ["GN STf LTf"] = { combination= { "GN", "-STf", "-LTf" }, utype = "force", }, ["kN LTf"] = { combination= { "kN", "-LTf" }, utype = "force", }, ["kN LTf STf"] = { combination= { "kN", "-LTf", "-STf" }, utype = "force", }, ["kN STf"] = { combination= { "kN", "-STf" }, utype = "force", }, ["kN STf LTf"] = { combination= { "kN", "-STf", "-LTf" }, utype = "force", }, ["LTf STf"] = { combination= { "-LTf", "-STf" }, utype = "force", }, ["MN LTf"] = { combination= { "MN", "-LTf" }, utype = "force", }, ["MN LTf STf"] = { combination= { "MN", "-LTf", "-STf" }, utype = "force", }, ["MN STf"] = { combination= { "MN", "-STf" }, utype = "force", }, ["MN STf LTf"] = { combination= { "MN", "-STf", "-LTf" }, utype = "force", }, ["STf LTf"] = { combination= { "-STf", "-LTf" }, utype = "force", }, ["L/100 km mpgimp"] = { combination= { "L/100 km", "mpgimp" }, utype = "fuel efficiency", }, ["l/100 km mpgimp"] = { combination= { "l/100 km", "mpgimp" }, utype = "fuel efficiency", }, ["L/100 km mpgUS"] = { combination= { "L/100 km", "mpgus" }, utype = "fuel efficiency", }, ["L/100 km mpgus"] = { combination= { "L/100 km", "mpgus" }, utype = "fuel efficiency", }, ["l/100 km mpgus"] = { combination= { "l/100 km", "mpgus" }, utype = "fuel efficiency", }, ["mpgimp L/100 km"] = { combination= { "mpgimp", "L/100 km" }, utype = "fuel efficiency", }, ["LT ST t"] = { combination= { "lt", "-ST", "t" }, utype = "mass", }, ["LT t ST"] = { combination= { "lt", "t", "-ST" }, utype = "mass", }, ["ST LT t"] = { combination= { "-ST", "lt", "t" }, utype = "mass", }, ["ST t LT"] = { combination= { "-ST", "t", "lt" }, utype = "mass", }, ["t LT ST"] = { combination= { "t", "lt", "-ST" }, utype = "mass", }, ["ton"] = { combination= { "LT", "ST" }, utype = "mass", }, ["kPa kg/cm2"] = { combination= { "kPa", "kgf/cm2" }, utype = "pressure", }, ["kPa lb/in2"] = { combination= { "kPa", "-lb/in2" }, utype = "pressure", }, ["floz"] = { combination= { "impoz", "USoz" }, utype = "volume", }, } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local default_exceptions = { -- Prefixed units with a default different from that of the base unit. -- Each key item is a prefixed symbol (unitcode for engineering notation). ["cm<sup>2</sup>"] = "sqin", ["dm<sup>2</sup>"] = "sqin", ["e3acre"] = "km2", ["e3m2"] = "e6sqft", ["e6acre"] = "km2", ["e6ha"] = "e6acre", ["e6km2"] = "e6sqmi", ["e6m2"] = "e6sqft", ["e6sqft"] = "v * 9.290304 < 100 ! e3 ! e6 ! m2", ["e6sqmi"] = "e6km2", ["hm<sup>2</sup>"] = "acre", ["km<sup>2</sup>"] = "sqmi", ["mm<sup>2</sup>"] = "sqin", ["aJ"] = "eV", ["e3BTU"] = "MJ", ["e6BTU"] = "GJ", ["EJ"] = "kWh", ["fJ"] = "keV", ["GJ"] = "kWh", ["MJ"] = "kWh", ["PJ"] = "kWh", ["pJ"] = "MeV", ["TJ"] = "kWh", ["YJ"] = "kWh", ["yJ"] = "μeV", ["ZJ"] = "kWh", ["zJ"] = "meV", ["e12cuft/a"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3/a", ["e12cuft/d"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3/d", ["e12m3/a"] = "Tcuft/a", ["e12m3/d"] = "Tcuft/d", ["e3cuft/a"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/a", ["e3cuft/d"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/d", ["e3cuft/s"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/s", ["e3m3/a"] = "v < 28.316846592 ! k ! M ! cuft/a", ["e3m3/d"] = "v < 28.316846592 ! k ! M ! cuft/d", ["e3m3/s"] = "v < 28.316846592 ! k ! M ! cuft/s", ["e3USgal/a"] = "v * 3.785411784 < 1000 ! ! e3 ! m3/a", ["e6cuft/a"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/a", ["e6cuft/d"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/d", ["e6cuft/s"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/s", ["e6m3/a"] = "v < 28.316846592 ! M ! G ! cuft/a", ["e6m3/d"] = "v < 28.316846592 ! M ! G ! cuft/d", ["e6m3/s"] = "v < 28.316846592 ! e6 ! e9 ! cuft/s", ["e6USgal/a"] = "v * 3.785411784 < 1000 ! e3 ! e6 ! m3/a", ["e9cuft/a"] = "m3/a", ["e9cuft/d"] = "v * 2.8316846592 < 100 ! e6 ! e9 ! m3/d", ["e9m3/a"] = "v < 28.316846592 ! G ! T ! cuft/a", ["e9m3/d"] = "v < 28.316846592 ! G ! T ! cuft/d", ["e9m3/s"] = "v < 28.316846592 ! e9 ! e12 ! cuft/s", ["e9USgal/a"] = "v * 3.785411784 < 1000 ! e6 ! e9 ! m3/a", ["e9USgal/s"] = "v * 3.785411784 < 1000 ! e6 ! e9 ! m3/s", ["nN"] = "gr-f", ["μN"] = "gr-f", ["mN"] = "oz-f", ["am"] = "in", ["cm"] = "in", ["dam"] = "ft", ["dm"] = "in", ["e12km"] = "e12mi", ["e12mi"] = "e12km", ["e3AU"] = "ly", ["e3km"] = "e3mi", ["e3mi"] = "e3km", ["e6km"] = "e6mi", ["e6mi"] = "e6km", ["e9km"] = "AU", ["e9mi"] = "e9km", ["Em"] = "mi", ["fm"] = "in", ["Gm"] = "mi", ["hm"] = "ft", ["km"] = "mi", ["mm"] = "in", ["Mm"] = "mi", ["nm"] = "in", ["Pm"] = "mi", ["pm"] = "in", ["Tm"] = "mi", ["Ym"] = "mi", ["ym"] = "in", ["Zm"] = "mi", ["zm"] = "in", ["μm"] = "in", ["e12lb"] = "v * 4.5359237 < 10 ! Mt ! Gt", ["e3lb"] = "v * 4.5359237 < 10 ! kg ! t", ["e3ozt"] = "v * 0.311034768 < 10 ! kg ! t", ["e3t"] = "LT ST", ["e6carat"] = "t", ["e6lb"] = "v * 4.5359237 < 10 ! t ! kilotonne", ["e6ozt"] = "lb kg", ["e6ST"] = "Mt", ["e6t"] = "LT ST", ["e9lb"] = "v * 4.5359237 < 10 ! kilotonne ! Mt", ["e9t"] = "LT ST", ["Gg"] = "lb", ["kg"] = "lb", ["mg"] = "gr", ["Mg"] = "LT ST", ["ng"] = "gr", ["μg"] = "gr", ["mBq"] = "fCi", ["kBq"] = "nCi", ["MBq"] = "μCi", ["GBq"] = "mCi", ["TBq"] = "Ci", ["PBq"] = "kCi", ["EBq"] = "kCi", ["fCi"] = "mBq", ["pCi"] = "Bq", ["nCi"] = "Bq", ["μCi"] = "kBq", ["mCi"] = "MBq", ["kCi"] = "TBq", ["MCi"] = "PBq", ["ns"] = "μs", ["μs"] = "ms", ["ms"] = "s", ["ks"] = "h", ["Ms"] = "week", ["Gs"] = "decade", ["Ts"] = "millennium", ["Ps"] = "million year", ["Es"] = "thousand million year", ["MK"] = "keVT", ["cL"] = "impoz usoz", ["cl"] = "impoz usoz", ["cm<sup>3</sup>"] = "cuin", ["dL"] = "impoz usoz", ["dl"] = "impoz usoz", ["mm<sup>3</sup>"] = "cuin", ["dm<sup>3</sup>"] = "cuin", ["e12cuft"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3", ["e12impgal"] = "v * 4.54609 < 1000 ! T ! P ! l", ["e12m3"] = "v < 28.316846592 ! T ! P ! cuft", ["e12U.S.gal"] = "v * 3.785411784 < 1000 ! T ! P ! l", ["e12USgal"] = "v * 3.785411784 < 1000 ! T ! P ! l", ["e15cuft"] = "v * 2.8316846592 < 100 ! e12 ! e15 ! m3", ["e15m3"] = "Pcuft", ["e3bdft"] = "v * 0.23597372167 < 100 ! e3 ! e6 ! m3", ["e3cuft"] = "v * 2.8316846592 < 100 ! ! e3 ! m3", ["e3impgal"] = "v * 4.54609 < 1000 ! k ! M ! l", ["e3m3"] = "v < 28.316846592 ! k ! M ! cuft", ["e3U.S.gal"] = "v * 3.785411784 < 1000 ! k ! M ! l", ["e3USgal"] = "v * 3.785411784 < 1000 ! k ! M ! l", ["e6bdft"] = "v * 0.23597372167 < 100 ! e3 ! e6 ! m3", ["e6cuft"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3", ["e6cuyd"] = "v * 7.64554857984 < 10 ! e3 ! e6 ! m3", ["e6impgal"] = "v * 4.54609 < 1000 ! M ! G ! l", ["e6L"] = "USgal", ["e6m3"] = "v < 28.316846592 ! M ! G ! cuft", ["e6U.S.gal"] = "v * 3.785411784 < 1000 ! M ! G ! l", ["e6USgal"] = "v * 3.785411784 < 1000 ! M ! G ! l", ["e9bdft"] = "v * 0.23597372167 < 100 ! e6 ! e9 ! m3", ["e9cuft"] = "v * 2.8316846592 < 100 ! e6 ! e9 ! m3", ["e9impgal"] = "v * 4.54609 < 1000 ! G ! T ! l", ["e9m3"] = "v < 28.316846592 ! G ! T ! cuft", ["e9U.S.gal"] = "v * 3.785411784 < 1000 ! G ! T ! l", ["e9USgal"] = "v * 3.785411784 < 1000 ! G ! T ! l", ["GL"] = "cuft", ["Gl"] = "cuft", ["kL"] = "cuft", ["kl"] = "cuft", ["km<sup>3</sup>"] = "cumi", ["mL"] = "impoz usoz", ["ml"] = "impoz usoz", ["Ml"] = "v < 28.316846592 ! e3 ! e6 ! cuft", ["ML"] = "v < 28.316846592 ! e3 ! e6 ! cuft", ["TL"] = "cumi", ["Tl"] = "cumi", ["μL"] = "cuin", ["μl"] = "cuin", } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local link_exceptions = { -- Prefixed units with a linked article different from that of the base unit. -- Each key item is a prefixed symbol (not unitcode). ["mm<sup>2</sup>"] = "Square millimetre", ["cm<sup>2</sup>"] = "Square centimetre", ["dm<sup>2</sup>"] = "Square decimetre", ["km<sup>2</sup>"] = "Square kilometre", ["kJ"] = "Kilojoule", ["MJ"] = "Megajoule", ["GJ"] = "Gigajoule", ["TJ"] = "Terajoule", ["fm"] = "Femtometre", ["pm"] = "Picometre", ["nm"] = "Nanometre", ["μm"] = "Micrometre", ["mm"] = "Millimetre", ["cm"] = "Centimetre", ["dm"] = "Decimetre", ["dam"] = "Decametre", ["hm"] = "Hectometre", ["km"] = "Kilometre", ["Mm"] = "Megametre", ["Gm"] = "Gigametre", ["Tm"] = "Terametre", ["Pm"] = "Petametre", ["Em"] = "Exametre", ["Zm"] = "Zettametre", ["Ym"] = "Yottametre", ["μg"] = "Microgram", ["mg"] = "Milligram", ["kg"] = "Kilogram", ["Mg"] = "Tonne", ["yW"] = "Yoctowatt", ["zW"] = "Zeptowatt", ["aW"] = "Attowatt", ["fW"] = "Femtowatt", ["pW"] = "Picowatt", ["nW"] = "Nanowatt", ["μW"] = "Microwatt", ["mW"] = "Milliwatt", ["kW"] = "Kilowatt", ["MW"] = "Megawatt", ["GW"] = "Gigawatt", ["TW"] = "Terawatt", ["PW"] = "Petawatt", ["EW"] = "Exawatt", ["ZW"] = "Zettawatt", ["YW"] = "Yottawatt", ["as"] = "Attosecond", ["fs"] = "Femtosecond", ["ps"] = "Picosecond", ["ns"] = "Nanosecond", ["μs"] = "Microsecond", ["ms"] = "Millisecond", ["ks"] = "Kilosecond", ["Ms"] = "Megasecond", ["Gs"] = "Gigasecond", ["Ts"] = "Terasecond", ["Ps"] = "Petasecond", ["Es"] = "Exasecond", ["Zs"] = "Zettasecond", ["Ys"] = "Yottasecond", ["mm<sup>3</sup>"] = "Cubic millimetre", ["cm<sup>3</sup>"] = "Cubic centimetre", ["dm<sup>3</sup>"] = "Cubic decimetre", ["dam<sup>3</sup>"] = "Cubic decametre", ["km<sup>3</sup>"] = "Cubic kilometre", ["μL"] = "Microlitre", ["μl"] = "Microlitre", ["mL"] = "Millilitre", ["ml"] = "Millilitre", ["cL"] = "Centilitre", ["cl"] = "Centilitre", ["dL"] = "Decilitre", ["dl"] = "Decilitre", ["daL"] = "Decalitre", ["dal"] = "Decalitre", ["hL"] = "Hectolitre", ["hl"] = "Hectolitre", ["kL"] = "Kilolitre", ["kl"] = "Kilolitre", ["ML"] = "Megalitre", ["Ml"] = "Megalitre", ["GL"] = "Gigalitre", ["Gl"] = "Gigalitre", ["TL"] = "Teralitre", ["Tl"] = "Teralitre", ["PL"] = "Petalitre", ["Pl"] = "Petalitre", } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local per_unit_fixups = { -- Automatically created per units of form "x/y" may have their unit type -- changed, for example, "length/time" is changed to "speed". -- Other adjustments can also be specified. ["/area"] = "per unit area", ["/volume"] = "per unit volume", ["area/area"] = "area per unit area", ["energy/length"] = "energy per unit length", ["energy/mass"] = "energy per unit mass", ["energy/time"] = { utype = "power", link = "Power (physics)" }, ["energy/volume"] = "energy per unit volume", ["force/area"] = { utype = "pressure", link = "Pressure" }, ["length/length"] = { utype = "gradient", link = "Grade (slope)" }, ["length/time"] = { utype = "speed", link = "Speed" }, ["length/time/time"] = { utype = "acceleration", link = "Acceleration" }, ["mass/area"] = { utype = "pressure", multiplier = 9.80665 }, ["mass/length"] = "linear density", ["mass/mass"] = "concentration", ["mass/power"] = "mass per unit power", ["mass/time"] = "mass per unit time", ["mass/volume"] = { utype = "density", link = "Density" }, ["power/mass"] = "power per unit mass", ["power/volume"] = { link = "Power density" }, ["pressure/length"] = "fracture gradient", ["speed/time"] = { utype = "acceleration", link = "Acceleration" }, ["volume/area"] = "volume per unit area", ["volume/length"] = "volume per unit length", ["volume/time"] = "flow", } return { all_units = all_units, default_exceptions = default_exceptions, link_exceptions = link_exceptions, per_unit_fixups = per_unit_fixups, } 8d4f7e3d03f55a7683bae4e0b800b77ac91d44a2 Module:Convert 828 583 1154 2023-05-10T03:20:21Z wikipedia>Johnuniq 0 update from sandbox per [[Template talk:Convert#Module version 29]] Scribunto text/plain -- Convert a value from one unit of measurement to another. -- Example: {{convert|123|lb|kg}} --> 123 pounds (56 kg) -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. local MINUS = '−' -- Unicode U+2212 MINUS SIGN (UTF-8: e2 88 92) local abs = math.abs local floor = math.floor local format = string.format local log10 = math.log10 local ustring = mw.ustring local ulen = ustring.len local usub = ustring.sub -- Configuration options to keep magic values in one location. -- Conversion data and message text are defined in separate modules. local config, maxsigfig local numdot -- must be '.' or ',' or a character which works in a regex local numsep, numsep_remove, numsep_remove2 local data_code, all_units local text_code local varname -- can be a code to use variable names that depend on value local from_en_table -- to translate an output string of en digits to local language local to_en_table -- to translate an input string of digits in local language to en -- Use translation_table in convert/text to change the following. local en_default -- true uses lang=en unless convert has lang=local or local digits local group_method = 3 -- code for how many digits are in a group local per_word = 'per' -- for units like "liters per kilometer" local plural_suffix = 's' -- only other useful value is probably '' to disable plural unit names local omitsep -- true to omit separator before local symbol/name -- All units should be defined in the data module. However, to cater for quick changes -- and experiments, any unknown unit is looked up in an extra data module, if it exists. -- That module would be transcluded in only a small number of pages, so there should be -- little server overhead from making changes, and changes should propagate quickly. local extra_module -- name of module with extra units local extra_units -- nil or table of extra units from extra_module -- Some options in the invoking template can set variables used later in the module. local currency_text -- for a user-defined currency symbol: {{convert|12|$/ha|$=€}} (euro replaces dollar) local function from_en(text) -- Input is a string representing a number in en digits with '.' decimal mark, -- without digit grouping (which is done just after calling this). -- Return the translation of the string with numdot and digits in local language. if numdot ~= '.' then text = text:gsub('%.', numdot) end if from_en_table then text = text:gsub('%d', from_en_table) end return text end local function to_en(text) -- Input is a string representing a number in the local language with -- an optional numdot decimal mark and numsep digit grouping. -- Return the translation of the string with '.' mark and en digits, -- and no separators (they have to be removed here to handle cases like -- numsep = '.' and numdot = ',' with input "1.234.567,8"). if to_en_table then text = ustring.gsub(text, '%d', to_en_table) end if numsep_remove then text = text:gsub(numsep_remove, '') end if numsep_remove2 then text = text:gsub(numsep_remove2, '') end if numdot ~= '.' then text = text:gsub(numdot, '.') end return text end local function decimal_mark(text) -- Return ',' if text probably is using comma for decimal mark, or has no decimal mark. -- Return '.' if text probably is using dot for decimal mark. -- Otherwise return nothing (decimal mark not known). if not text:find('[.,]') then return ',' end text = text:gsub('^%-', ''):gsub('%+%d+/%d+$', ''):gsub('[Ee]%-?%d+$', '') local decimal = text:match('^0?([.,])%d+$') or text:match('%d([.,])%d?%d?$') or text:match('%d([.,])%d%d%d%d+$') if decimal then return decimal end if text:match('%.%d+%.') then return ',' end if text:match('%,%d+,') then return '.' end end local add_warning, with_separator -- forward declarations local function to_en_with_check(text, parms) -- Version of to_en() for a wiki using numdot = ',' and numsep = '.' to check -- text (an input number as a string) which might have been copied from enwiki. -- For example, in '1.234' the '.' could be a decimal mark or a group separator. -- From viwiki. if to_en_table then text = ustring.gsub(text, '%d', to_en_table) end if decimal_mark(text) == '.' then local original = text text = text:gsub(',', '') -- for example, interpret "1,234.5" as an enwiki value if parms then add_warning(parms, 0, 'cvt_enwiki_num', original, with_separator({}, text)) end else if numsep_remove then text = text:gsub(numsep_remove, '') end if numsep_remove2 then text = text:gsub(numsep_remove2, '') end if numdot ~= '.' then text = text:gsub(numdot, '.') end end return text end local function omit_separator(id) -- Return true if there should be no separator before id (a unit symbol or name). -- For zhwiki, there should be no separator if id uses local characters. -- The following kludge should be a sufficient test. if omitsep then if id:sub(1, 2) == '-{' then -- for "-{...}-" content language variant return true end if id:byte() > 127 then local first = usub(id, 1, 1) if first ~= 'Å' and first ~= '°' and first ~= 'µ' then return true end end end return id:sub(1, 1) == '/' -- no separator before units like "/ha" end local spell_module -- name of module that can spell numbers local speller -- function from that module to handle spelling (set if needed) local wikidata_module, wikidata_data_module -- names of Wikidata modules local wikidata_code, wikidata_data -- exported tables from those modules (set if needed) local function set_config(args) -- Set configuration options from template #invoke or defaults. config = args maxsigfig = config.maxsigfig or 14 -- maximum number of significant figures local data_module, text_module local sandbox = config.sandbox and ('/' .. config.sandbox) or '' data_module = "Module:Convert/data" .. sandbox text_module = "Module:Convert/text" .. sandbox extra_module = "Module:Convert/extra" .. sandbox wikidata_module = "Module:Convert/wikidata" .. sandbox wikidata_data_module = "Module:Convert/wikidata/data" .. sandbox spell_module = "Module:ConvertNumeric" data_code = mw.loadData(data_module) text_code = mw.loadData(text_module) all_units = data_code.all_units local translation = text_code.translation_table if translation then numdot = translation.numdot numsep = translation.numsep if numdot == ',' and numsep == '.' then if text_code.all_messages.cvt_enwiki_num then to_en = to_en_with_check end end if translation.group then group_method = translation.group end if translation.per_word then per_word = translation.per_word end if translation.plural_suffix then plural_suffix = translation.plural_suffix end varname = translation.varname from_en_table = translation.from_en local use_workaround = true if use_workaround then -- 2013-07-05 workaround bug by making a copy of the required table. -- mw.ustring.gsub fails with a table (to_en_table) as the replacement, -- if the table is accessed via mw.loadData. local source = translation.to_en if source then to_en_table = {} for k, v in pairs(source) do to_en_table[k] = v end end else to_en_table = translation.to_en end if translation.lang == 'en default' then en_default = true -- for hiwiki end omitsep = translation.omitsep -- for zhwiki end numdot = config.numdot or numdot or '.' -- decimal mark before fractional digits numsep = config.numsep or numsep or ',' -- group separator for numbers -- numsep should be ',' or '.' or '' or '&nbsp;' or a Unicode character. -- numsep_remove must work in a regex to identify separators to be removed. if numsep ~= '' then numsep_remove = (numsep == '.') and '%.' or numsep end if numsep ~= ',' and numdot ~= ',' then numsep_remove2 = ',' -- so numbers copied from enwiki will work end end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, } end local function divide(numerator, denominator) -- Return integers quotient, remainder resulting from dividing the two -- given numbers, which should be unsigned integers. local quotient, remainder = floor(numerator / denominator), numerator % denominator if not (0 <= remainder and remainder < denominator) then -- Floating point limits may need this, as in {{convert|160.02|Ym|ydftin}}. remainder = 0 end return quotient, remainder end local function split(text, delimiter) -- Return a numbered table with fields from splitting text. -- The delimiter is used in a regex without escaping (for example, '.' would fail). -- Each field has any leading/trailing whitespace removed. local t = {} text = text .. delimiter -- to get last item for item in text:gmatch('%s*(.-)%s*' .. delimiter) do table.insert(t, item) end return t end local function strip(text) -- If text is a string, return its content with no leading/trailing -- whitespace. Otherwise return nil (a nil argument gives a nil result). if type(text) == 'string' then return text:match("^%s*(.-)%s*$") end end local function table_len(t) -- Return length (<100) of a numbered table to replace #t which is -- documented to not work if t is accessed via mw.loadData(). for i = 1, 100 do if t[i] == nil then return i - 1 end end end local function wanted_category(catkey, catsort, want_warning) -- Return message category if it is wanted in current namespace, -- otherwise return ''. local cat local title = mw.title.getCurrentTitle() if title then local nsdefault = '0' -- default namespace: '0' = article; '0,10' = article and template local namespace = title.namespace for _, v in ipairs(split(config.nscat or nsdefault, ',')) do if namespace == tonumber(v) then cat = text_code.all_categories[want_warning and 'warning' or catkey] if catsort and catsort ~= '' and cat:sub(-2) == ']]' then cat = cat:sub(1, -3) .. '|' .. mw.text.nowiki(usub(catsort, 1, 20)) .. ']]' end break end end end return cat or '' end local function message(parms, mcode, is_warning) -- Return wikitext for an error message, including category if specified -- for the message type. -- mcode = numbered table specifying the message: -- mcode[1] = 'cvt_xxx' (string used as a key to get message info) -- mcode[2] = 'parm1' (string to replace '$1' if any in message) -- mcode[3] = 'parm2' (string to replace '$2' if any in message) -- mcode[4] = 'parm3' (string to replace '$3' if any in message) local msg if type(mcode) == 'table' then if mcode[1] == 'cvt_no_output' then -- Some errors should cause convert to output an empty string, -- for example, for an optional field in an infobox. return '' end msg = text_code.all_messages[mcode[1]] end parms.have_problem = true local function subparm(fmt, ...) local rep = {} for i, v in ipairs({...}) do rep['$' .. i] = v end return (fmt:gsub('$%d+', rep)) end if msg then local parts = {} local regex, replace = msg.regex, msg.replace for i = 1, 3 do local limit = 40 local s = mcode[i + 1] if s then if regex and replace then s = s:gsub(regex, replace) limit = nil -- allow long "should be" messages end -- Escape user input so it does not break the message. -- To avoid tags (like {{convert|1<math>23</math>|m}}) breaking -- the mouseover title, any strip marker starting with char(127) is -- replaced with '...' (text not needing i18n). local append local pos = s:find(string.char(127), 1, true) if pos then append = '...' s = s:sub(1, pos - 1) end if limit and ulen(s) > limit then s = usub(s, 1, limit) append = '...' end s = mw.text.nowiki(s) .. (append or '') else s = '?' end parts['$' .. i] = s end local function ispreview() -- Return true if a prominent message should be shown. if parms.test == 'preview' or parms.test == 'nopreview' then -- For testing, can preview a real message or simulate a preview -- when running automated tests. return parms.test == 'preview' end local success, revid = pcall(function () return (parms.frame):preprocess('{{REVISIONID}}') end) return success and (revid == '') end local want_warning = is_warning and not config.warnings and -- show unobtrusive warnings if config.warnings not configured not msg.nowarn -- but use msg settings, not standard warning, if specified local title = string.gsub(msg[1] or 'Missing message', '$%d+', parts) local text = want_warning and '*' or msg[2] or 'Missing message' local cat = wanted_category(msg[3], mcode[2], want_warning) local anchor = msg[4] or '' local fmtkey = ispreview() and 'cvt_format_preview' or (want_warning and 'cvt_format2' or msg.format or 'cvt_format') local fmt = text_code.all_messages[fmtkey] or 'convert: bug' return subparm(fmt, title:gsub('"', '&quot;'), text, cat, anchor) end return 'Convert internal error: unknown message' end function add_warning(parms, level, key, text1, text2) -- for forward declaration above -- If enabled, add a warning that will be displayed after the convert result. -- A higher level is more verbose: more kinds of warnings are displayed. -- To reduce output noise, only the first warning is displayed. if level <= (tonumber(config.warnings) or 1) then if parms.warnings == nil then parms.warnings = message(parms, { key, text1, text2 }, true) end end end local function spell_number(parms, inout, number, numerator, denominator) -- Return result of spelling (number, numerator, denominator), or -- return nil if spelling is not available or not supported for given text. -- Examples (each value must be a string or nil): -- number numerator denominator output -- ------ --------- ----------- ------------------- -- "1.23" nil nil one point two three -- "1" "2" "3" one and two thirds -- nil "2" "3" two thirds if not speller then local function get_speller(module) return require(module).spell_number end local success success, speller = pcall(get_speller, spell_module) if not success or type(speller) ~= 'function' then add_warning(parms, 1, 'cvt_no_spell', 'spell') return nil end end local case if parms.spell_upper == inout then case = true parms.spell_upper = nil -- only uppercase first word in a multiple unit end local sp = not parms.opt_sp_us local adj = parms.opt_adjectival return speller(number, numerator, denominator, case, sp, adj) end ------------------------------------------------------------------------ -- BEGIN: Code required only for built-in units. -- LATER: If need much more code, move to another module to simplify this module. local function speed_of_sound(altitude) -- This is for the Mach built-in unit of speed. -- Return speed of sound in metres per second at given altitude in feet. -- If no altitude given, use default (zero altitude = sea level). -- Table gives speed of sound in miles per hour at various altitudes: -- altitude = -17,499 to 402,499 feet -- mach_table[a + 4] = s where -- a = (altitude / 5000) rounded to nearest integer (-3 to 80) -- s = speed of sound (mph) at that altitude -- LATER: Should calculate result from an interpolation between the next -- lower and higher altitudes in table, rather than rounding to nearest. -- From: http://www.aerospaceweb.org/question/atmosphere/q0112.shtml local mach_table = { -- a = 799.5, 787.0, 774.2, 761.207051, -- -3 to 0 748.0, 734.6, 721.0, 707.0, 692.8, 678.3, 663.5, 660.1, 660.1, 660.1, -- 1 to 10 660.1, 660.1, 660.1, 662.0, 664.3, 666.5, 668.9, 671.1, 673.4, 675.6, -- 11 to 20 677.9, 683.7, 689.9, 696.0, 702.1, 708.1, 714.0, 719.9, 725.8, 731.6, -- 21 to 30 737.3, 737.7, 737.7, 736.2, 730.5, 724.6, 718.8, 712.9, 707.0, 701.0, -- 31 to 40 695.0, 688.9, 682.8, 676.6, 670.4, 664.1, 657.8, 652.9, 648.3, 643.7, -- 41 to 50 639.1, 634.4, 629.6, 624.8, 620.0, 615.2, 613.2, 613.2, 613.2, 613.5, -- 51 to 60 614.4, 615.3, 616.7, 619.8, 623.4, 629.7, 635.0, 641.1, 650.6, 660.0, -- 61 to 70 672.5, 674.3, 676.1, 677.9, 679.7, 681.5, 683.3, 685.1, 686.8, 688.6, -- 71 to 80 } altitude = altitude or 0 local a = (altitude < 0) and -altitude or altitude a = floor(a / 5000 + 0.5) if altitude < 0 then a = -a end if a < -3 then a = -3 elseif a > 80 then a = 80 end return mach_table[a + 4] * 0.44704 -- mph converted to m/s end -- END: Code required only for built-in units. ------------------------------------------------------------------------ local function add_style(parms, class) -- Add selected template style to parms if not already present. parms.templatestyles = parms.templatestyles or {} if not parms.templatestyles[class] then parms.templatestyles[class] = parms.frame:extensionTag({ name = 'templatestyles', args = { src = text_code.titles[class] } }) end end local function get_styles(parms) -- Return string of required template styles, empty if none. if parms.templatestyles then local t = {} for _, v in pairs(parms.templatestyles) do table.insert(t, v) end return table.concat(t) end return '' end local function get_range(word) -- Return a range (string or table) corresponding to word (like "to"), -- or return nil if not a range word. local ranges = text_code.ranges return ranges.types[word] or ranges.types[ranges.aliases[word]] end local function check_mismatch(unit1, unit2) -- If unit1 cannot be converted to unit2, return an error message table. -- This allows conversion between units of the same type, and between -- Nm (normally torque) and ftlb (energy), as in gun-related articles. -- This works because Nm is the base unit (scale = 1) for both the -- primary type (torque), and the alternate type (energy, where Nm = J). -- A match occurs if the primary types are the same, or if unit1 matches -- the alternate type of unit2, and vice versa. That provides a whitelist -- of which conversions are permitted between normally incompatible types. if unit1.utype == unit2.utype or (unit1.utype == unit2.alttype and unit1.alttype == unit2.utype) then return nil end return { 'cvt_mismatch', unit1.utype, unit2.utype } end local function override_from(out_table, in_table, fields) -- Copy the specified fields from in_table to out_table, but do not -- copy nil fields (keep any corresponding field in out_table). for _, field in ipairs(fields) do if in_table[field] then out_table[field] = in_table[field] end end end local function shallow_copy(t) -- Return a shallow copy of table t. -- Do not need the features and overhead of the Scribunto mw.clone(). local result = {} for k, v in pairs(t) do result[k] = v end return result end local unit_mt = { -- Metatable to get missing values for a unit that does not accept SI prefixes. -- Warning: The boolean value 'false' is returned for any missing field -- so __index is not called twice for the same field in a given unit. __index = function (self, key) local value if key == 'name1' or key == 'sym_us' then value = self.symbol elseif key == 'name2' then value = self.name1 .. plural_suffix elseif key == 'name1_us' then value = self.name1 if not rawget(self, 'name2_us') then -- If name1_us is 'foot', do not make name2_us by appending plural_suffix. self.name2_us = self.name2 end elseif key == 'name2_us' then local raw1_us = rawget(self, 'name1_us') if raw1_us then value = raw1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 else value = false end rawset(self, key, value) return value end } local function prefixed_name(unit, name, index) -- Return unit name with SI prefix inserted at correct position. -- index = 1 (name1), 2 (name2), 3 (name1_us), 4 (name2_us). -- The position is a byte (not character) index, so use Lua's sub(). local pos = rawget(unit, 'prefix_position') if type(pos) == 'string' then pos = tonumber(split(pos, ',')[index]) end if pos then return name:sub(1, pos - 1) .. unit.si_name .. name:sub(pos) end return unit.si_name .. name end local unit_prefixed_mt = { -- Metatable to get missing values for a unit that accepts SI prefixes. -- Before use, fields si_name, si_prefix must be defined. -- The unit must define _symbol, _name1 and -- may define _sym_us, _name1_us, _name2_us -- (_sym_us, _name2_us may be defined for a language using sp=us -- to refer to a variant unrelated to U.S. units). __index = function (self, key) local value if key == 'symbol' then value = self.si_prefix .. self._symbol if value == 'l' then value = 'L' end elseif key == 'sym_us' then value = rawget(self, '_sym_us') if value then value = self.si_prefix .. value else value = self.symbol end elseif key == 'name1' then value = prefixed_name(self, self._name1, 1) elseif key == 'name2' then value = rawget(self, '_name2') if value then value = prefixed_name(self, value, 2) else value = self.name1 .. plural_suffix end elseif key == 'name1_us' then value = rawget(self, '_name1_us') if value then value = prefixed_name(self, value, 3) else value = self.name1 end elseif key == 'name2_us' then value = rawget(self, '_name2_us') if value then value = prefixed_name(self, value, 4) elseif rawget(self, '_name1_us') then value = self.name1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 else value = false end rawset(self, key, value) return value end } local unit_per_mt = { -- Metatable to get values for a per unit of form "x/y". -- This is never called to determine a unit name or link because per units -- are handled as a special case. -- Similarly, the default output is handled elsewhere, and for a symbol -- this is only called from get_default() for default_exceptions. __index = function (self, key) local value if key == 'symbol' then local per = self.per local unit1, unit2 = per[1], per[2] if unit1 then value = unit1[key] .. '/' .. unit2[key] else value = '/' .. unit2[key] end elseif key == 'sym_us' then value = self.symbol elseif key == 'scale' then local per = self.per local unit1, unit2 = per[1], per[2] value = (unit1 and unit1.scale or 1) * self.scalemultiplier / unit2.scale else value = false end rawset(self, key, value) return value end } local function make_per(unitcode, unit_table, ulookup) -- Return true, t where t is a per unit with unit codes expanded to unit tables, -- or return false, t where t is an error message table. local result = { unitcode = unitcode, utype = unit_table.utype, per = {} } override_from(result, unit_table, { 'invert', 'iscomplex', 'default', 'link', 'symbol', 'symlink' }) result.symbol_raw = (result.symbol or false) -- to distinguish between a defined exception and a metatable calculation local prefix for i, v in ipairs(unit_table.per) do if i == 1 and v == '' then -- First unit symbol can be empty; that gives a nil first unit table. elseif i == 1 and text_code.currency[v] then prefix = currency_text or v else local success, t = ulookup(v) if not success then return false, t end result.per[i] = t end end local multiplier = unit_table.multiplier if not result.utype then -- Creating an automatic per unit. local unit1 = result.per[1] local utype = (unit1 and unit1.utype or prefix or '') .. '/' .. result.per[2].utype local t = data_code.per_unit_fixups[utype] if t then if type(t) == 'table' then utype = t.utype or utype result.link = result.link or t.link multiplier = multiplier or t.multiplier else utype = t end end result.utype = utype end result.scalemultiplier = multiplier or 1 result.vprefix = prefix or false -- set to non-nil to avoid calling __index return true, setmetatable(result, unit_per_mt) end local function lookup(parms, unitcode, what, utable, fails, depth) -- Return true, t where t is a copy of the unit's converter table, -- or return false, t where t is an error message table. -- Parameter 'what' determines whether combination units are accepted: -- 'no_combination' : single unit only -- 'any_combination' : single unit or combination or output multiple -- 'only_multiple' : single unit or output multiple only -- Parameter unitcode is a symbol (like 'g'), with an optional SI prefix (like 'kg'). -- If, for example, 'kg' is in this table, that entry is used; -- otherwise the prefix ('k') is applied to the base unit ('g'). -- If unitcode is a known combination code (and if allowed by what), -- a table of output multiple unit tables is included in the result. -- For compatibility with the old template, an underscore in a unitcode is -- replaced with a space so usage like {{convert|350|board_feet}} works. -- Wikignomes may also put two spaces or "&nbsp;" in combinations, so -- replace underscore, "&nbsp;", and multiple spaces with a single space. utable = utable or parms.unittable or all_units fails = fails or {} depth = depth and depth + 1 or 1 if depth > 9 then -- There are ways to mistakenly define units which result in infinite -- recursion when lookup() is called. That gives a long delay and very -- confusing error messages, so the depth parameter is used as a guard. return false, { 'cvt_lookup', unitcode } end if unitcode == nil or unitcode == '' then return false, { 'cvt_no_unit' } end unitcode = unitcode:gsub('_', ' '):gsub('&nbsp;', ' '):gsub(' +', ' ') local function call_make_per(t) return make_per(unitcode, t, function (ucode) return lookup(parms, ucode, 'no_combination', utable, fails, depth) end ) end local t = utable[unitcode] if t then if t.shouldbe then return false, { 'cvt_should_be', t.shouldbe } end if t.sp_us then parms.opt_sp_us = true end local target = t.target -- nil, or unitcode is an alias for this target if target then local success, result = lookup(parms, target, what, utable, fails, depth) if not success then return false, result end override_from(result, t, { 'customary', 'default', 'link', 'symbol', 'symlink' }) local multiplier = t.multiplier if multiplier then result.multiplier = tostring(multiplier) result.scale = result.scale * multiplier end return true, result end if t.per then return call_make_per(t) end local combo = t.combination -- nil or a table of unitcodes if combo then local multiple = t.multiple if what == 'no_combination' or (what == 'only_multiple' and not multiple) then return false, { 'cvt_bad_unit', unitcode } end -- Recursively create a combination table containing the -- converter table of each unitcode. local result = { utype = t.utype, multiple = multiple, combination = {} } local cvt = result.combination for i, v in ipairs(combo) do local success, t = lookup(parms, v, multiple and 'no_combination' or 'only_multiple', utable, fails, depth) if not success then return false, t end cvt[i] = t end return true, result end local result = shallow_copy(t) result.unitcode = unitcode if result.prefixes then result.si_name = '' result.si_prefix = '' return true, setmetatable(result, unit_prefixed_mt) end return true, setmetatable(result, unit_mt) end local SIprefixes = text_code.SIprefixes for plen = SIprefixes[1] or 2, 1, -1 do -- Look for an SI prefix; should never occur with an alias. -- Check for longer prefix first ('dam' is decametre). -- SIprefixes[1] = prefix maximum #characters (as seen by mw.ustring.sub). local prefix = usub(unitcode, 1, plen) local si = SIprefixes[prefix] if si then local t = utable[usub(unitcode, plen+1)] if t and t.prefixes then local result = shallow_copy(t) result.unitcode = unitcode result.si_name = parms.opt_sp_us and si.name_us or si.name result.si_prefix = si.prefix or prefix result.scale = t.scale * 10 ^ (si.exponent * t.prefixes) return true, setmetatable(result, unit_prefixed_mt) end end end -- Accept user-defined combinations like "acre+m2+ha" or "acre m2 ha" for output. -- If '+' is used, each unit code can include a space, and any error is fatal. -- If ' ' is used and if each space-separated word is a unit code, it is a combo, -- but errors are not fatal so the unit code can be looked up as an extra unit. local err_is_fatal local combo = collection() if unitcode:find('+', 1, true) then err_is_fatal = true for item in (unitcode .. '+'):gmatch('%s*(.-)%s*%+') do if item ~= '' then combo:add(item) end end elseif unitcode:find('%s') then for item in unitcode:gmatch('%S+') do combo:add(item) end end if combo.n > 1 then local function lookup_combo() if what == 'no_combination' or what == 'only_multiple' then return false, { 'cvt_bad_unit', unitcode } end local result = { combination = {} } local cvt = result.combination for i, v in ipairs(combo) do local success, t = lookup(parms, v, 'only_multiple', utable, fails, depth) if not success then return false, t end if i == 1 then result.utype = t.utype else local mismatch = check_mismatch(result, t) if mismatch then return false, mismatch end end cvt[i] = t end return true, result end local success, result = lookup_combo() if success or err_is_fatal then return success, result end end -- Accept any unit with an engineering notation prefix like "e6cuft" -- (million cubic feet), but not chained prefixes like "e3e6cuft", -- and not if the unit is a combination or multiple, -- and not if the unit has an offset or is a built-in. -- Only en digits are accepted. local exponent, baseunit = unitcode:match('^e(%d+)(.*)') if exponent then local engscale = text_code.eng_scales[exponent] if engscale then local success, result = lookup(parms, baseunit, 'no_combination', utable, fails, depth) if success and not (result.offset or result.builtin or result.engscale) then result.unitcode = unitcode -- 'e6cuft' not 'cuft' result.defkey = unitcode -- key to lookup default exception result.engscale = engscale result.scale = result.scale * 10 ^ tonumber(exponent) return true, result end end end -- Look for x/y; split on right-most slash to get scale correct (x/y/z is x/y per z). local top, bottom = unitcode:match('^(.-)/([^/]+)$') if top and not unitcode:find('e%d') then -- If valid, create an automatic per unit for an "x/y" unit code. -- The unitcode must not include extraneous spaces. -- Engineering notation (apart from at start and which has been stripped before here), -- is not supported so do not make a per unit if find text like 'e3' in unitcode. local success, result = call_make_per({ per = {top, bottom} }) if success then return true, result end end if not parms.opt_ignore_error and not get_range(unitcode) then -- Want the "what links here" list for the extra_module to show only cases -- where an extra unit is used, so do not require it if invoked from {{val}} -- or if looking up a range word which cannot be a unit. if not extra_units then local success, extra = pcall(function () return require(extra_module).extra_units end) if success and type(extra) == 'table' then extra_units = extra end end if extra_units then -- A unit in one data table might refer to a unit in the other table, so -- switch between them, relying on fails or depth to terminate loops. if not fails[unitcode] then fails[unitcode] = true local other = (utable == all_units) and extra_units or all_units local success, result = lookup(parms, unitcode, what, other, fails, depth) if success then return true, result end end end end if to_en_table then -- At fawiki it is common to translate all digits so a unit like "km2" becomes "km۲". local en_code = ustring.gsub(unitcode, '%d', to_en_table) if en_code ~= unitcode then return lookup(parms, en_code, what, utable, fails, depth) end end return false, { 'cvt_unknown', unitcode } end local function valid_number(num) -- Return true if num is a valid number. -- In Scribunto (different from some standard Lua), when expressed as a string, -- overflow or other problems are indicated with text like "inf" or "nan" -- which are regarded as invalid here (each contains "n"). if type(num) == 'number' and tostring(num):find('n', 1, true) == nil then return true end end local function hyphenated(name, parts) -- Return a hyphenated form of given name (for adjectival usage). -- The name may be linked and the target of the link must not be changed. -- Hypothetical examples: -- [[long ton|ton]] → [[long ton|ton]] (no change) -- [[tonne|long ton]] → [[tonne|long-ton]] -- [[metric ton|long ton]] → [[metric ton|long-ton]] -- [[long ton]] → [[long ton|long-ton]] -- Input can also have multiple links in a single name like: -- [[United States customary units|U.S.]] [[US gallon|gallon]] -- [[mile]]s per [[United States customary units|U.S.]] [[quart]] -- [[long ton]]s per [[short ton]] -- Assume that links cannot be nested (never like "[[abc[[def]]ghi]]"). -- This uses a simple and efficient procedure that works for most cases. -- Some units (if used) would require more, and can later think about -- adding a method to handle exceptions. -- The procedure is to replace each space with a hyphen, but -- not a space after ')' [for "(pre-1954&nbsp;US) nautical mile"], and -- not spaces immediately before '(' or in '(...)' [for cases like -- "British thermal unit (ISO)" and "Calorie (International Steam Table)"]. if name:find(' ', 1, true) then if parts then local pos if name:sub(1, 1) == '(' then pos = name:find(')', 1, true) if pos then return name:sub(1, pos+1) .. name:sub(pos+2):gsub(' ', '-') end elseif name:sub(-1) == ')' then pos = name:find('(', 1, true) if pos then return name:sub(1, pos-2):gsub(' ', '-') .. name:sub(pos-1) end end return name:gsub(' ', '-') end parts = collection() for before, item, after in name:gmatch('([^[]*)(%[%[[^[]*%]%])([^[]*)') do if item:find(' ', 1, true) then local prefix local plen = item:find('|', 1, true) if plen then prefix = item:sub(1, plen) item = item:sub(plen + 1, -3) else prefix = item:sub(1, -3) .. '|' item = item:sub(3, -3) end item = prefix .. hyphenated(item, parts) .. ']]' end parts:add(before:gsub(' ', '-') .. item .. after:gsub(' ', '-')) end if parts.n == 0 then -- No link like "[[...]]" was found in the original name. parts:add(hyphenated(name, parts)) end return table.concat(parts) end return name end local function hyphenated_maybe(parms, want_name, sep, id, inout) -- Return s, f where -- s = id, possibly modified -- f = true if hyphenated -- Possible modifications: hyphenate; prepend '-'; append mid text. if id == nil or id == '' then return '' end local mid = (inout == (parms.opt_flip and 'out' or 'in')) and parms.mid or '' if want_name then if parms.opt_adjectival then return '-' .. hyphenated(id) .. mid, true end if parms.opt_add_s and id:sub(-1) ~= 's' then id = id .. 's' -- for nowiki end end return sep .. id .. mid end local function use_minus(text) -- Return text with Unicode minus instead of '-', if present. if text:sub(1, 1) == '-' then return MINUS .. text:sub(2) end return text end local function digit_groups(parms, text, method) -- Return a numbered table of groups of digits (left-to-right, in local language). -- Parameter method is a number or nil: -- 3 for 3-digit grouping (default), or -- 2 for 3-then-2 grouping (only for digits before decimal mark). local len_right local len_left = text:find('.', 1, true) if len_left then len_right = #text - len_left len_left = len_left - 1 else len_left = #text end local twos = method == 2 and len_left > 5 local groups = collection() local run = len_left local n if run < 4 or (run == 4 and parms.opt_comma5) then if parms.opt_gaps then n = run else n = #text end elseif twos then n = run % 2 == 0 and 1 or 2 else n = run % 3 == 0 and 3 or run % 3 end while run > 0 do groups:add(n) run = run - n n = (twos and run > 3) and 2 or 3 end if len_right then if groups.n == 0 then groups:add(0) end if parms.opt_gaps and len_right > 3 then local want4 = not parms.opt_gaps3 -- true gives no gap before trailing single digit local isfirst = true run = len_right while run > 0 do n = (want4 and run == 4) and 4 or (run > 3 and 3 or run) if isfirst then isfirst = false groups[groups.n] = groups[groups.n] + 1 + n else groups:add(n) end run = run - n end else groups[groups.n] = groups[groups.n] + 1 + len_right end end local pos = 1 for i, length in ipairs(groups) do groups[i] = from_en(text:sub(pos, pos + length - 1)) pos = pos + length end return groups end function with_separator(parms, text) -- for forward declaration above -- Input text is a number in en digits with optional '.' decimal mark. -- Return an equivalent, formatted for display: -- with a custom decimal mark instead of '.', if wanted -- with thousand separators inserted, if wanted -- digits in local language -- The given text is like '123' or '123.' or '12345.6789'. -- The text has no sign (caller inserts that later, if necessary). -- When using gaps, they are inserted before and after the decimal mark. -- Separators are inserted only before the decimal mark. -- A trailing dot (as in '123.') is removed because their use appears to -- be accidental, and such a number should be shown as '123' or '123.0'. -- It is useful for convert to suppress the dot so, for example, '4000.' -- is a simple way of indicating that all the digits are significant. if text:sub(-1) == '.' then text = text:sub(1, -2) end if #text < 4 or parms.opt_nocomma or numsep == '' then return from_en(text) end local groups = digit_groups(parms, text, group_method) if parms.opt_gaps then if groups.n <= 1 then return groups[1] or '' end local nowrap = '<span style="white-space: nowrap">' local gap = '<span style="margin-left: 0.25em">' local close = '</span>' return nowrap .. groups[1] .. gap .. table.concat(groups, close .. gap, 2, groups.n) .. close .. close end return table.concat(groups, numsep) end -- An input value like 1.23e12 is displayed using scientific notation (1.23×10¹²). -- That also makes the output use scientific notation, except for small values. -- In addition, very small or very large output values use scientific notation. -- Use format(fmtpower, significand, '10', exponent) where each argument is a string. local fmtpower = '%s<span style="margin:0 .15em 0 .25em">×</span>%s<sup>%s</sup>' local function with_exponent(parms, show, exponent) -- Return wikitext to display the implied value in scientific notation. -- Input uses en digits; output uses digits in local language. return format(fmtpower, with_separator(parms, show), from_en('10'), use_minus(from_en(tostring(exponent)))) end local function make_sigfig(value, sigfig) -- Return show, exponent that are equivalent to the result of -- converting the number 'value' (where value >= 0) to a string, -- rounded to 'sigfig' significant figures. -- The returned items are: -- show: a string of digits; no sign and no dot; -- there is an implied dot before show. -- exponent: a number (an integer) to shift the implied dot. -- Resulting value = tonumber('.' .. show) * 10^exponent. -- Examples: -- make_sigfig(23.456, 3) returns '235', 2 (.235 * 10^2). -- make_sigfig(0.0023456, 3) returns '235', -2 (.235 * 10^-2). -- make_sigfig(0, 3) returns '000', 1 (.000 * 10^1). if sigfig <= 0 then sigfig = 1 elseif sigfig > maxsigfig then sigfig = maxsigfig end if value == 0 then return string.rep('0', sigfig), 1 end local exp, fracpart = math.modf(log10(value)) if fracpart >= 0 then fracpart = fracpart - 1 exp = exp + 1 end local digits = format('%.0f', 10^(fracpart + sigfig)) if #digits > sigfig then -- Overflow (for sigfig=3: like 0.9999 rounding to "1000"; need "100"). digits = digits:sub(1, sigfig) exp = exp + 1 end assert(#digits == sigfig, 'Bug: rounded number has wrong length') return digits, exp end -- Fraction output format. local fracfmt = { { -- Like {{frac}} (fraction slash). '<span class="frac" role="math">{SIGN}<span class="num">{NUM}</span>&frasl;<span class="den">{DEN}</span></span>', -- 1/2 '<span class="frac" role="math">{SIGN}{WHOLE}<span class="sr-only">+</span><span class="num">{NUM}</span>&frasl;<span class="den">{DEN}</span></span>', -- 1+2/3 style = 'frac', }, { -- Like {{sfrac}} (stacked fraction, that is, horizontal bar). '<span class="sfrac tion" role="math">{SIGN}<span class="num">{NUM}</span><span class="sr-only">/</span><span class="den">{DEN}</span></span>', -- 1//2 '<span class="sfrac" role="math">{SIGN}{WHOLE}<span class="sr-only">+</span><span class="tion"><span class="num">{NUM}</span><span class="sr-only">/</span><span class="den">{DEN}</span></span></span>', -- 1+2//3 style = 'sfrac', }, } local function format_fraction(parms, inout, negative, wholestr, numstr, denstr, do_spell, style) -- Return wikitext for a fraction, possibly spelled. -- Inputs use en digits and have no sign; output uses digits in local language. local wikitext if not style then style = parms.opt_fraction_horizontal and 2 or 1 end if wholestr == '' then wholestr = nil end local substitute = { SIGN = negative and MINUS or '', WHOLE = wholestr and with_separator(parms, wholestr), NUM = from_en(numstr), DEN = from_en(denstr), } wikitext = fracfmt[style][wholestr and 2 or 1]:gsub('{(%u+)}', substitute) if do_spell then if negative then if wholestr then wholestr = '-' .. wholestr else numstr = '-' .. numstr end end local s = spell_number(parms, inout, wholestr, numstr, denstr) if s then return s end end add_style(parms, fracfmt[style].style) return wikitext end local function format_number(parms, show, exponent, isnegative) -- Parameter show is a string or a table containing strings. -- Each string is a formatted number in en digits and optional '.' decimal mark. -- A table represents a fraction: integer, numerator, denominator; -- if a table is given, exponent must be nil. -- Return t where t is a table with fields: -- show = wikitext formatted to display implied value -- (digits in local language) -- is_scientific = true if show uses scientific notation -- clean = unformatted show (possibly adjusted and with inserted '.') -- (en digits) -- sign = '' or MINUS -- exponent = exponent (possibly adjusted) -- The clean and exponent fields can be used to calculate the -- rounded absolute value, if needed. -- -- The value implied by the arguments is found from: -- exponent is nil; and -- show is a string of digits (no sign), with an optional dot; -- show = '123.4' is value 123.4, '1234' is value 1234.0; -- or: -- exponent is an integer indicating where dot should be; -- show is a string of digits (no sign and no dot); -- there is an implied dot before show; -- show does not start with '0'; -- show = '1234', exponent = 3 is value 0.1234*10^3 = 123.4. -- -- The formatted result: -- * Is for an output value and is spelled if wanted and possible. -- * Includes a Unicode minus if isnegative and not spelled. -- * Uses a custom decimal mark, if wanted. -- * Has digits grouped where necessary, if wanted. -- * Uses scientific notation if requested, or for very small or large values -- (which forces result to not be spelled). -- * Has no more than maxsigfig significant digits -- (same as old template and {{#expr}}). local xhi, xlo -- these control when scientific notation (exponent) is used if parms.opt_scientific then xhi, xlo = 4, 2 -- default for output if input uses e-notation elseif parms.opt_scientific_always then xhi, xlo = 0, 0 -- always use scientific notation (experimental) else xhi, xlo = 10, 4 -- default end local sign = isnegative and MINUS or '' local maxlen = maxsigfig local tfrac if type(show) == 'table' then tfrac = show show = tfrac.wholestr assert(exponent == nil, 'Bug: exponent given with fraction') end if not tfrac and not exponent then local integer, dot, decimals = show:match('^(%d*)(%.?)(.*)') if integer == '0' or integer == '' then local zeros, figs = decimals:match('^(0*)([^0]?.*)') if #figs == 0 then if #zeros > maxlen then show = '0.' .. zeros:sub(1, maxlen) end elseif #zeros >= xlo then show = figs exponent = -#zeros elseif #figs > maxlen then show = '0.' .. zeros .. figs:sub(1, maxlen) end elseif #integer >= xhi then show = integer .. decimals exponent = #integer else maxlen = maxlen + #dot if #show > maxlen then show = show:sub(1, maxlen) end end end if exponent then local function zeros(n) return string.rep('0', n) end if #show > maxlen then show = show:sub(1, maxlen) end if exponent > xhi or exponent <= -xlo or (exponent == xhi and show ~= '1' .. zeros(xhi - 1)) then -- When xhi, xlo = 10, 4 (the default), scientific notation is used if the -- rounded value satisfies: value >= 1e9 or value < 1e-4 (1e9 = 0.1e10), -- except if show is '1000000000' (1e9), for example: -- {{convert|1000000000|m|m|sigfig=10}} → 1,000,000,000 metres (1,000,000,000 m) local significand if #show > 1 then significand = show:sub(1, 1) .. '.' .. show:sub(2) else significand = show end return { clean = '.' .. show, exponent = exponent, sign = sign, show = sign .. with_exponent(parms, significand, exponent-1), is_scientific = true, } end if exponent >= #show then show = show .. zeros(exponent - #show) -- result has no dot elseif exponent <= 0 then show = '0.' .. zeros(-exponent) .. show else show = show:sub(1, exponent) .. '.' .. show:sub(exponent+1) end end local formatted_show if tfrac then show = tostring(tfrac.value) -- to set clean in returned table formatted_show = format_fraction(parms, 'out', isnegative, tfrac.wholestr, tfrac.numstr, tfrac.denstr, parms.opt_spell_out) else if isnegative and show:match('^0.?0*$') then sign = '' -- don't show minus if result is negative but rounds to zero end formatted_show = sign .. with_separator(parms, show) if parms.opt_spell_out then formatted_show = spell_number(parms, 'out', sign .. show) or formatted_show end end return { clean = show, sign = sign, show = formatted_show, is_scientific = false, -- to avoid calling __index } end local function extract_fraction(parms, text, negative) -- If text represents a fraction, return -- value, altvalue, show, denominator -- where -- value is a number (value of the fraction in argument text) -- altvalue is an alternate interpretation of any fraction for the hands -- unit where "12.1+3/4" means 12 hands 1.75 inches -- show is a string (formatted text for display of an input value, -- and is spelled if wanted and possible) -- denominator is value of the denominator in the fraction -- Otherwise, return nil. -- Input uses en digits and '.' decimal mark (input has been translated). -- Output uses digits in local language and local decimal mark, if any. ------------------------------------------------------------------------ -- Originally this function accepted x+y/z where x, y, z were any valid -- numbers, possibly with a sign. For example '1.23e+2+1.2/2.4' = 123.5, -- and '2-3/8' = 1.625. However, such usages were found to be errors or -- misunderstandings, so since August 2014 the following restrictions apply: -- x (if present) is an integer or has a single digit after decimal mark -- y and z are unsigned integers -- e-notation is not accepted -- The overall number can start with '+' or '-' (so '12+3/4' and '+12+3/4' -- and '-12-3/4' are valid). -- Any leading negative sign is removed by the caller, so only inputs -- like the following are accepted here (may have whitespace): -- negative = false false true (there was a leading '-') -- text = '2/3' '+2/3' '2/3' -- text = '1+2/3' '+1+2/3' '1-2/3' -- text = '12.3+1/2' '+12.3+1/2' '12.3-1/2' -- Values like '12.3+1/2' are accepted, but are intended only for use -- with the hands unit (not worth adding code to enforce that). ------------------------------------------------------------------------ local leading_plus, prefix, numstr, slashes, denstr = text:match('^%s*(%+?)%s*(.-)%s*(%d+)%s*(/+)%s*(%d+)%s*$') if not leading_plus then -- Accept a single U+2044 fraction slash because that may be pasted. leading_plus, prefix, numstr, denstr = text:match('^%s*(%+?)%s*(.-)%s*(%d+)%s*⁄%s*(%d+)%s*$') slashes = '/' end local numerator = tonumber(numstr) local denominator = tonumber(denstr) if numerator == nil or denominator == nil or (negative and leading_plus ~= '') then return nil end local whole, wholestr if prefix == '' then wholestr = '' whole = 0 else -- Any prefix must be like '12+' or '12-' (whole number and fraction sign); -- '12.3+' and '12.3-' are also accepted (single digit after decimal point) -- because '12.3+1/2 hands' is valid (12 hands 3½ inches). local num1, num2, frac_sign = prefix:match('^(%d+)(%.?%d?)%s*([+%-])$') if num1 == nil then return nil end if num2 == '' then -- num2 must be '' or like '.1' but not '.' or '.12' wholestr = num1 else if #num2 ~= 2 then return nil end wholestr = num1 .. num2 end if frac_sign ~= (negative and '-' or '+') then return nil end whole = tonumber(wholestr) if whole == nil then return nil end end local value = whole + numerator / denominator if not valid_number(value) then return nil end local altvalue = whole + numerator / (denominator * 10) local style = #slashes -- kludge: 1 or 2 slashes can be used to select style if style > 2 then style = 2 end local wikitext = format_fraction(parms, 'in', negative, leading_plus .. wholestr, numstr, denstr, parms.opt_spell_in, style) return value, altvalue, wikitext, denominator end local function extract_number(parms, text, another, no_fraction) -- Return true, info if can extract a number from text, -- where info is a table with the result, -- or return false, t where t is an error message table. -- Input can use en digits or digits in local language and can -- have references at the end. Accepting references is intended -- for use in infoboxes with a field for a value passed to convert. -- Parameter another = true if the expected value is not the first. -- Before processing, the input text is cleaned: -- * Any thousand separators (valid or not) are removed. -- * Any sign is replaced with '-' (if negative) or '' (otherwise). -- That replaces Unicode minus with '-'. -- If successful, the returned info table contains named fields: -- value = a valid number -- altvalue = a valid number, usually same as value but different -- if fraction used (for hands unit) -- singular = true if value is 1 or -1 (to use singular form of units) -- clean = cleaned text with any separators and sign removed -- (en digits and '.' decimal mark) -- show = text formatted for output, possibly with ref strip markers -- (digits in local language and custom decimal mark) -- The resulting show: -- * Is for an input value and is spelled if wanted and possible. -- * Has a rounded value, if wanted. -- * Has digits grouped where necessary, if wanted. -- * If negative, a Unicode minus is used; otherwise the sign is -- '+' (if the input text used '+'), or is '' (if no sign in input). text = strip(text or '') local reference local pos = text:find('\127', 1, true) if pos then local before = text:sub(1, pos - 1) local remainder = text:sub(pos) local refs = {} while #remainder > 0 do local ref, spaces ref, spaces, remainder = remainder:match('^(\127[^\127]*UNIQ[^\127]*%-ref[^\127]*\127)(%s*)(.*)') if ref then table.insert(refs, ref) else refs = {} break end end if #refs > 0 then text = strip(before) reference = table.concat(refs) end end local clean = to_en(text, parms) if clean == '' then return false, { another and 'cvt_no_num2' or 'cvt_no_num' } end local isnegative, propersign = false, '' -- most common case local singular, show, denominator local value = tonumber(clean) local altvalue if value then local sign = clean:sub(1, 1) if sign == '+' or sign == '-' then propersign = (sign == '+') and '+' or MINUS clean = clean:sub(2) end if value < 0 then isnegative = true value = -value end else local valstr for _, prefix in ipairs({ '-', MINUS, '&minus;' }) do -- Including '-' sets isnegative in case input is a fraction like '-2-3/4'. local plen = #prefix if clean:sub(1, plen) == prefix then valstr = clean:sub(plen + 1) if valstr:match('^%s') then -- "- 1" is invalid but "-1 - 1/2" is ok return false, { 'cvt_bad_num', text } end break end end if valstr then isnegative = true propersign = MINUS clean = valstr value = tonumber(clean) end if value == nil then if not no_fraction then value, altvalue, show, denominator = extract_fraction(parms, clean, isnegative) end if value == nil then return false, { 'cvt_bad_num', text } end if value <= 1 then singular = true -- for example, "½ mile" or "one half mile" (singular unit) end end end if not valid_number(value) then -- for example, "1e310" may overflow return false, { 'cvt_invalid_num' } end if show == nil then -- clean is a non-empty string with no spaces, and does not represent a fraction, -- and value = tonumber(clean) is a number >= 0. -- If the input uses e-notation, show will be displayed using a power of ten, but -- we use the number as given so it might not be normalized scientific notation. -- The input value is spelled if specified so any e-notation is ignored; -- that allows input like 2e6 to be spelled as "two million" which works -- because the spell module converts '2e6' to '2000000' before spelling. local function rounded(value, default, exponent) local precision = parms.opt_ri if precision then local fmt = '%.' .. format('%d', precision) .. 'f' local result = fmt:format(tonumber(value) + 2e-14) -- fudge for some common cases of bad rounding if not exponent then singular = (tonumber(result) == 1) end return result end return default end singular = (value == 1) local scientific local significand, exponent = clean:match('^([%d.]+)[Ee]([+%-]?%d+)') if significand then show = with_exponent(parms, rounded(significand, significand, exponent), exponent) scientific = true else show = with_separator(parms, rounded(value, clean)) end show = propersign .. show if parms.opt_spell_in then show = spell_number(parms, 'in', propersign .. rounded(value, clean)) or show scientific = false end if scientific then parms.opt_scientific = true end end if isnegative and (value ~= 0) then value = -value altvalue = -(altvalue or value) end return true, { value = value, altvalue = altvalue or value, singular = singular, clean = clean, show = show .. (reference or ''), denominator = denominator, } end local function get_number(text) -- Return v, f where: -- v = nil (text is not a number) -- or -- v = value of text (text is a number) -- f = true if value is an integer -- Input can use en digits or digits in local language or separators, -- but no Unicode minus, and no fraction. if text then local number = tonumber(to_en(text)) if number then local _, fracpart = math.modf(number) return number, (fracpart == 0) end end end local function gcd(a, b) -- Return the greatest common denominator for the given values, -- which are known to be positive integers. if a > b then a, b = b, a end if a <= 0 then return b end local r = b % a if r <= 0 then return a end if r == 1 then return 1 end return gcd(r, a) end local function fraction_table(value, denominator) -- Return value as a string or a table: -- * If result is a string, there is no fraction, and the result -- is value formatted as a string of en digits. -- * If result is a table, it represents a fraction with named fields: -- wholestr, numstr, denstr (strings of en digits for integer, numerator, denominator). -- The result is rounded to the nearest multiple of (1/denominator). -- If the multiple is zero, no fraction is included. -- No fraction is included if value is very large as the fraction would -- be unhelpful, particularly if scientific notation is required. -- Input value is a non-negative number. -- Input denominator is a positive integer for the desired fraction. if value <= 0 then return '0' end if denominator <= 0 or value > 1e8 then return format('%.2f', value) end local integer, decimals = math.modf(value) local numerator = floor((decimals * denominator) + 0.5 + 2e-14) -- add fudge for some common cases of bad rounding if numerator >= denominator then integer = integer + 1 numerator = 0 end local wholestr = tostring(integer) if numerator > 0 then local div = gcd(numerator, denominator) if div > 1 then numerator = numerator / div denominator = denominator / div end return { wholestr = (integer > 0) and wholestr or '', numstr = tostring(numerator), denstr = tostring(denominator), value = value, } end return wholestr end local function preunits(count, preunit1, preunit2) -- If count is 1: -- ignore preunit2 -- return p1 -- else: -- preunit1 is used for preunit2 if the latter is empty -- return p1, p2 -- where: -- p1 is text to insert before the input unit -- p2 is text to insert before the output unit -- p1 or p2 may be nil to mean "no preunit" -- Using '+' gives output like "5+ feet" (no space before, but space after). local function withspace(text, wantboth) -- Return text with space before and, if wantboth, after. -- However, no space is added if there is a space or '&nbsp;' or '-' -- at that position ('-' is for adjectival text). -- There is also no space if text starts with '&' -- (e.g. '&deg;' would display a degree symbol with no preceding space). local char = text:sub(1, 1) if char == '&' then return text -- an html entity can be used to specify the exact display end if not (char == ' ' or char == '-' or char == '+') then text = ' ' .. text end if wantboth then char = text:sub(-1, -1) if not (char == ' ' or char == '-' or text:sub(-6, -1) == '&nbsp;') then text = text .. ' ' end end return text end local PLUS = '+ ' preunit1 = preunit1 or '' local trim1 = strip(preunit1) if count == 1 then if trim1 == '' then return nil end if trim1 == '+' then return PLUS end return withspace(preunit1, true) end preunit1 = withspace(preunit1) preunit2 = preunit2 or '' local trim2 = strip(preunit2) if trim1 == '+' then if trim2 == '' or trim2 == '+' then return PLUS, PLUS end preunit1 = PLUS end if trim2 == '' then if trim1 == '' then return nil, nil end preunit2 = preunit1 elseif trim2 == '+' then preunit2 = PLUS elseif trim2 == '&#32;' then -- trick to make preunit2 empty preunit2 = nil else preunit2 = withspace(preunit2) end return preunit1, preunit2 end local function range_text(range, want_name, parms, before, after, inout, options) -- Return before .. rtext .. after -- where rtext is the text that separates two values in a range. local rtext, adj_text, exception options = options or {} if type(range) == 'table' then -- Table must specify range text for ('off' and 'on') or ('input' and 'output'), -- and may specify range text for 'adj=on', -- and may specify exception = true. rtext = range[want_name and 'off' or 'on'] or range[((inout == 'in') == (parms.opt_flip == true)) and 'output' or 'input'] adj_text = range['adj'] exception = range['exception'] else rtext = range end if parms.opt_adjectival then if want_name or (exception and parms.abbr_org == 'on') then rtext = adj_text or rtext:gsub(' ', '-'):gsub('&nbsp;', '-') end end if rtext == '–' and (options.spaced or after:sub(1, #MINUS) == MINUS) then rtext = '&nbsp;– ' end return before .. rtext .. after end local function get_composite(parms, iparm, in_unit_table) -- Look for a composite input unit. For example, {{convert|1|yd|2|ft|3|in}} -- would result in a call to this function with -- iparm = 3 (parms[iparm] = "2", just after the first unit) -- in_unit_table = (unit table for "yd"; contains value 1 for number of yards) -- Return true, iparm, unit where -- iparm = index just after the composite units (7 in above example) -- unit = composite unit table holding all input units, -- or return true if no composite unit is present in parms, -- or return false, t where t is an error message table. local default, subinfo local composite_units, count = { in_unit_table }, 1 local fixups = {} local total = in_unit_table.valinfo[1].value local subunit = in_unit_table while subunit.subdivs do -- subdivs is nil or a table of allowed subdivisions local subcode = strip(parms[iparm+1]) local subdiv = subunit.subdivs[subcode] or subunit.subdivs[(all_units[subcode] or {}).target] if not subdiv then break end local success success, subunit = lookup(parms, subcode, 'no_combination') if not success then return false, subunit end -- should never occur success, subinfo = extract_number(parms, parms[iparm]) if not success then return false, subinfo end iparm = iparm + 2 subunit.inout = 'in' subunit.valinfo = { subinfo } -- Recalculate total as a number of subdivisions. -- subdiv[1] = number of subdivisions per previous unit (integer > 1). total = total * subdiv[1] + subinfo.value if not default then -- set by the first subdiv with a default defined default = subdiv.default end count = count + 1 composite_units[count] = subunit if subdiv.unit or subdiv.name then fixups[count] = { unit = subdiv.unit, name = subdiv.name, valinfo = subunit.valinfo } end end if count == 1 then return true -- no error and no composite unit end for i, fixup in pairs(fixups) do local unit = fixup.unit local name = fixup.name if not unit or (count > 2 and name) then composite_units[i].fixed_name = name else local success, alternate = lookup(parms, unit, 'no_combination') if not success then return false, alternate end -- should never occur alternate.inout = 'in' alternate.valinfo = fixup.valinfo composite_units[i] = alternate end end return true, iparm, { utype = in_unit_table.utype, scale = subunit.scale, -- scale of last (least significant) unit valinfo = { { value = total, clean = subinfo.clean, denominator = subinfo.denominator } }, composite = composite_units, default = default or in_unit_table.default } end local function translate_parms(parms, kv_pairs) -- Update fields in parms by translating each key:value in kv_pairs to terms -- used by this module (may involve translating from local language to English). -- Also, checks are performed which may display warnings, if enabled. -- Return true if successful or return false, t where t is an error message table. currency_text = nil -- local testing can hold module in memory; must clear globals if kv_pairs.adj and kv_pairs.sing then -- For enwiki (before translation), warn if attempt to use adj and sing -- as the latter is a deprecated alias for the former. if kv_pairs.adj ~= kv_pairs.sing and kv_pairs.sing ~= '' then add_warning(parms, 1, 'cvt_unknown_option', 'sing=' .. kv_pairs.sing) end kv_pairs.sing = nil end kv_pairs.comma = kv_pairs.comma or config.comma -- for plwiki who want default comma=5 for loc_name, loc_value in pairs(kv_pairs) do local en_name = text_code.en_option_name[loc_name] if en_name then local en_value = text_code.en_option_value[en_name] if en_value == 'INTEGER' then -- altitude_ft, altitude_m, frac, sigfig en_value = nil if loc_value == '' then add_warning(parms, 2, 'cvt_empty_option', loc_name) else local minimum local number, is_integer = get_number(loc_value) if en_name == 'sigfig' then minimum = 1 elseif en_name == 'frac' then minimum = 2 if number and number < 0 then parms.opt_fraction_horizontal = true number = -number end else minimum = -1e6 end if number and is_integer and number >= minimum then en_value = number else local m if en_name == 'frac' then m = 'cvt_bad_frac' elseif en_name == 'sigfig' then m = 'cvt_bad_sigfig' else m = 'cvt_bad_altitude' end add_warning(parms, 1, m, loc_name .. '=' .. loc_value) end end elseif en_value == 'TEXT' then -- $, input, qid, qual, stylein, styleout, tracking en_value = loc_value ~= '' and loc_value or nil -- accept non-empty user text with no validation if not en_value and (en_name == '$' or en_name == 'qid' or en_name == 'qual') then add_warning(parms, 2, 'cvt_empty_option', loc_name) elseif en_name == '$' then -- Value should be a single character like "€" for the euro currency symbol, but anything is accepted. currency_text = (loc_value == 'euro') and '€' or loc_value elseif en_name == 'input' then -- May have something like {{convert|input=}} (empty input) if source is an infobox -- with optional fields. In that case, want to output nothing rather than an error. parms.input_text = loc_value -- keep input because parms.input is nil if loc_value == '' end else en_value = en_value[loc_value] if en_value and en_value:sub(-1) == '?' then en_value = en_value:sub(1, -2) add_warning(parms, -1, 'cvt_deprecated', loc_name .. '=' .. loc_value) end if en_value == nil then if loc_value == '' then add_warning(parms, 2, 'cvt_empty_option', loc_name) else add_warning(parms, 1, 'cvt_unknown_option', loc_name .. '=' .. loc_value) end elseif en_value == '' then en_value = nil -- an ignored option like adj=off elseif type(en_value) == 'string' and en_value:sub(1, 4) == 'opt_' then for _, v in ipairs(split(en_value, ',')) do local lhs, rhs = v:match('^(.-)=(.+)$') if rhs then parms[lhs] = tonumber(rhs) or rhs else parms[v] = true end end en_value = nil end end parms[en_name] = en_value else add_warning(parms, 1, 'cvt_unknown_option', loc_name .. '=' .. loc_value) end end local abbr_entered = parms.abbr local cfg_abbr = config.abbr if cfg_abbr then -- Don't warn if invalid because every convert would show that warning. if cfg_abbr == 'on always' then parms.abbr = 'on' elseif cfg_abbr == 'off always' then parms.abbr = 'off' elseif parms.abbr == nil then if cfg_abbr == 'on default' then parms.abbr = 'on' elseif cfg_abbr == 'off default' then parms.abbr = 'off' end end end if parms.abbr then if parms.abbr == 'unit' then parms.abbr = 'on' parms.number_word = true end parms.abbr_org = parms.abbr -- original abbr, before any flip elseif parms.opt_hand_hh then parms.abbr_org = 'on' parms.abbr = 'on' else parms.abbr = 'out' -- default is to abbreviate output only (use symbol, not name) end if parms.opt_order_out then -- Disable options that do not work in a useful way with order=out. parms.opt_flip = nil -- override adj=flip parms.opt_spell_in = nil parms.opt_spell_out = nil parms.opt_spell_upper = nil end if parms.opt_spell_out and not abbr_entered then parms.abbr = 'off' -- should show unit name when spelling the output value end if parms.opt_flip then local function swap_in_out(option) local value = parms[option] if value == 'in' then parms[option] = 'out' elseif value == 'out' then parms[option] = 'in' end end swap_in_out('abbr') swap_in_out('lk') if parms.opt_spell_in and not parms.opt_spell_out then -- For simplicity, and because it does not appear to be needed, -- user cannot set an option to spell the output only. parms.opt_spell_in = nil parms.opt_spell_out = true end end if parms.opt_spell_upper then parms.spell_upper = parms.opt_flip and 'out' or 'in' end if parms.opt_table or parms.opt_tablecen then if abbr_entered == nil and parms.lk == nil then parms.opt_values = true end parms.table_align = parms.opt_table and 'right' or 'center' end if parms.table_align or parms.opt_sortable_on then parms.need_table_or_sort = true end local disp_joins = text_code.disp_joins local default_joins = disp_joins['b'] parms.join_between = default_joins[3] or '; ' local disp = parms.disp if disp == nil then -- special case for the most common setting parms.joins = default_joins elseif disp == 'x' then -- Later, parms.joins is set from the input parameters. else -- Old template does this. local abbr = parms.abbr if disp == 'slash' then if abbr_entered == nil then disp = 'slash-nbsp' elseif abbr == 'in' or abbr == 'out' then disp = 'slash-sp' else disp = 'slash-nosp' end elseif disp == 'sqbr' then if abbr == 'on' then disp = 'sqbr-nbsp' else disp = 'sqbr-sp' end end parms.joins = disp_joins[disp] or default_joins parms.join_between = parms.joins[3] or parms.join_between parms.wantname = parms.joins.wantname end if (en_default and not parms.opt_lang_local and (parms[1] or ''):find('%d')) or parms.opt_lang_en then from_en_table = nil end if en_default and from_en_table then -- For hiwiki: localized symbol/name is defined with the US symbol/name field, -- and is used if output uses localized numbers. parms.opt_sp_us = true end return true end local function get_values(parms) -- If successful, update parms and return true, v, i where -- v = table of input values -- i = index to next entry in parms after those processed here -- or return false, t where t is an error message table. local valinfo = collection() -- numbered table of input values local range = collection() -- numbered table of range items (having, for example, 2 range items requires 3 input values) local had_nocomma -- true if removed "nocomma" kludge from second parameter (like "tonocomma") local parm2 = strip(parms[2]) if parm2 and parm2:sub(-7, -1) == 'nocomma' then parms[2] = strip(parm2:sub(1, -8)) parms.opt_nocomma = true had_nocomma = true end local function extractor(i) -- If the parameter is not a value, try unpacking it as a range ("1-23" for "1 to 23"). -- However, "-1-2/3" is a negative fraction (-1⅔), so it must be extracted first. -- Do not unpack a parameter if it is like "3-1/2" which is sometimes incorrectly -- used instead of "3+1/2" (and which should not be interpreted as "3 to ½"). -- Unpacked items are inserted into the parms table. -- The tail recursion allows combinations like "1x2 to 3x4". local valstr = strip(parms[i]) -- trim so any '-' as a negative sign will be at start local success, result = extract_number(parms, valstr, i > 1) if not success and valstr and i < 20 then -- check i to limit abuse local lhs, sep, rhs = valstr:match('^(%S+)%s+(%S+)%s+(%S.*)') if lhs and not (sep == '-' and rhs:match('/')) then if sep:find('%d') then return success, result -- to reject {{convert|1 234 567|m}} with a decent message (en only) end parms[i] = rhs table.insert(parms, i, sep) table.insert(parms, i, lhs) return extractor(i) end if not valstr:match('%-.*/') then for _, sep in ipairs(text_code.ranges.words) do local start, stop = valstr:find(sep, 2, true) -- start at 2 to skip any negative sign for range '-' if start then parms[i] = valstr:sub(stop + 1) table.insert(parms, i, sep) table.insert(parms, i, valstr:sub(1, start - 1)) return extractor(i) end end end end return success, result end local i = 1 local is_change while true do local success, info = extractor(i) -- need to set parms.opt_nocomma before calling this if not success then return false, info end i = i + 1 if is_change then info.is_change = true -- value is after "±" and so is a change (significant for range like {{convert|5|±|5|°C}}) is_change = nil end valinfo:add(info) local range_item = get_range(strip(parms[i])) if not range_item then break end i = i + 1 range:add(range_item) if type(range_item) == 'table' then -- For range "x", if append unit to some values, append it to all. parms.in_range_x = parms.in_range_x or range_item.in_range_x parms.out_range_x = parms.out_range_x or range_item.out_range_x parms.abbr_range_x = parms.abbr_range_x or range_item.abbr_range_x is_change = range_item.is_range_change end end if range.n > 0 then if range.n > 30 then -- limit abuse, although 4 is a more likely upper limit return false, { 'cvt_invalid_num' } -- misleading message but it will do end parms.range = range elseif had_nocomma then return false, { 'cvt_unknown', parm2 } end return true, valinfo, i end local function simple_get_values(parms) -- If input is like "{{convert|valid_value|valid_unit|...}}", -- return true, i, in_unit, in_unit_table -- i = index in parms of what follows valid_unit, if anything. -- The valid_value is not negative and does not use a fraction, and -- no options requiring further processing of the input are used. -- Otherwise, return nothing or return false, parm1 for caller to interpret. -- Testing shows this function is successful for 96% of converts in articles, -- and that on average it speeds up converts by 8%. local clean = to_en(strip(parms[1] or ''), parms) if parms.opt_ri or parms.opt_spell_in or #clean > 10 or not clean:match('^[0-9.]+$') then return false, clean end local value = tonumber(clean) if not value then return end local info = { value = value, altvalue = value, singular = (value == 1), clean = clean, show = with_separator(parms, clean), } local in_unit = strip(parms[2]) local success, in_unit_table = lookup(parms, in_unit, 'no_combination') if not success then return end in_unit_table.valinfo = { info } return true, 3, in_unit, in_unit_table end local function wikidata_call(parms, operation, ...) -- Return true, s where s is the result of a Wikidata operation, -- or return false, t where t is an error message table. local function worker(...) wikidata_code = wikidata_code or require(wikidata_module) wikidata_data = wikidata_data or mw.loadData(wikidata_data_module) return wikidata_code[operation](wikidata_data, ...) end local success, status, result = pcall(worker, ...) if success then return status, result end if parms.opt_sortable_debug then -- Use debug=yes to crash if an error while accessing Wikidata. error('Error accessing Wikidata: ' .. status, 0) end return false, { 'cvt_wd_fail' } end local function get_parms(parms, args) -- If successful, update parms and return true, unit where -- parms is a table of all arguments passed to the template -- converted to named arguments, and -- unit is the input unit table; -- or return false, t where t is an error message table. -- For special processing (not a convert), can also return -- true, wikitext where wikitext is the final result. -- The returned input unit table may be for a fake unit using the specified -- unit code as the symbol and name, and with bad_mcode = message code table. -- MediaWiki removes leading and trailing whitespace from the values of -- named arguments. However, the values of numbered arguments include any -- whitespace entered in the template, and whitespace is used by some -- parameters (example: the numbered parameters associated with "disp=x"). local kv_pairs = {} -- table of input key:value pairs where key is a name; needed because cannot iterate parms and add new fields to it for k, v in pairs(args) do if type(k) == 'number' or k == 'test' then -- parameter "test" is reserved for testing and is not translated parms[k] = v else kv_pairs[k] = v end end if parms.test == 'wikidata' then local ulookup = function (ucode) -- Use empty table for parms so it does not accumulate results when used repeatedly. return lookup({}, ucode, 'no_combination') end return wikidata_call(parms, '_listunits', ulookup) end local success, msg = translate_parms(parms, kv_pairs) if not success then return false, msg end if parms.input then success, msg = wikidata_call(parms, '_adjustparameters', parms, 1) if not success then return false, msg end end local success, i, in_unit, in_unit_table = simple_get_values(parms) if not success then if type(i) == 'string' and i:match('^NNN+$') then -- Some infoboxes have examples like {{convert|NNN|m}} (3 or more "N"). -- Output an empty string for these. return false, { 'cvt_no_output' } end local valinfo success, valinfo, i = get_values(parms) if not success then return false, valinfo end in_unit = strip(parms[i]) i = i + 1 success, in_unit_table = lookup(parms, in_unit, 'no_combination') if not success then in_unit = in_unit or '' if parms.opt_ignore_error then -- display given unit code with no error (for use with {{val}}) in_unit_table = '' -- suppress error message and prevent processing of output unit end in_unit_table = setmetatable({ symbol = in_unit, name2 = in_unit, utype = in_unit, scale = 1, default = '', defkey = '', linkey = '', bad_mcode = in_unit_table }, unit_mt) end in_unit_table.valinfo = valinfo end if parms.test == 'msg' then -- Am testing the messages produced when no output unit is specified, and -- the input unit has a missing or invalid default. -- Set two units for testing that. -- LATER: Remove this code. if in_unit == 'chain' then in_unit_table.default = nil -- no default elseif in_unit == 'rd' then in_unit_table.default = "ft!X!m" -- an invalid expression end end in_unit_table.inout = 'in' -- this is an input unit if not parms.range then local success, inext, composite_unit = get_composite(parms, i, in_unit_table) if not success then return false, inext end if composite_unit then in_unit_table = composite_unit i = inext end end if in_unit_table.builtin == 'mach' then -- As with old template, a number following Mach as the input unit is the altitude. -- That is deprecated: should use altitude_ft=NUMBER or altitude_m=NUMBER. local success, info success = tonumber(parms[i]) -- this will often work and will give correct result for values like 2e4 without forcing output scientific notation if success then info = { value = success } else success, info = extract_number(parms, parms[i], false, true) end if success then i = i + 1 in_unit_table.altitude = info.value end end local word = strip(parms[i]) i = i + 1 local precision, is_bad_precision local function set_precision(text) local number, is_integer = get_number(text) if number then if is_integer then precision = number else precision = text is_bad_precision = true end return true -- text was used for precision, good or bad end end if word and not set_precision(word) then parms.out_unit = parms.out_unit or word if set_precision(strip(parms[i])) then i = i + 1 end end if parms.opt_adj_mid then word = parms[i] i = i + 1 if word then -- mid-text words if word:sub(1, 1) == '-' then parms.mid = word else parms.mid = ' ' .. word end end end if parms.opt_one_preunit then parms[parms.opt_flip and 'preunit2' or 'preunit1'] = preunits(1, parms[i]) i = i + 1 end if parms.disp == 'x' then -- Following is reasonably compatible with the old template. local first = parms[i] or '' local second = parms[i+1] or '' i = i + 2 if strip(first) == '' then -- user can enter '&#32;' rather than ' ' to avoid the default first = ' [&nbsp;' .. first second = '&nbsp;]' .. second end parms.joins = { first, second } elseif parms.opt_two_preunits then local p1, p2 = preunits(2, parms[i], parms[i+1]) i = i + 2 if parms.preunit1 then -- To simplify documentation, allow unlikely use of adj=pre with disp=preunit -- (however, an output unit must be specified with adj=pre and with disp=preunit). parms.preunit1 = parms.preunit1 .. p1 parms.preunit2 = p2 else parms.preunit1, parms.preunit2 = p1, p2 end end if precision == nil then if set_precision(strip(parms[i])) then i = i + 1 end end if is_bad_precision then add_warning(parms, 1, 'cvt_bad_prec', precision) else parms.precision = precision end for j = i, i + 3 do local parm = parms[j] -- warn if find a non-empty extraneous parameter if parm and parm:match('%S') then add_warning(parms, 1, 'cvt_unknown_option', parm) break end end return true, in_unit_table end local function record_default_precision(parms, out_current, precision) -- If necessary, adjust parameters and return a possibly adjusted precision. -- When converting a range of values where a default precision is required, -- that default is calculated for each value because the result sometimes -- depends on the precise input and output values. This function may cause -- the entire convert process to be repeated in order to ensure that the -- same default precision is used for each individual convert. -- If that were not done, a range like 1000 to 1000.4 may give poor results -- because the first output could be heavily rounded, while the second is not. -- For range 1000.4 to 1000, this function can give the second convert the -- same default precision that was used for the first. if not parms.opt_round_each then local maxdef = out_current.max_default_precision if maxdef then if maxdef < precision then parms.do_convert_again = true out_current.max_default_precision = precision else precision = out_current.max_default_precision end else out_current.max_default_precision = precision end end return precision end local function default_precision(parms, invalue, inclean, denominator, outvalue, in_current, out_current, extra) -- Return a default value for precision (an integer like 2, 0, -2). -- If denominator is not nil, it is the value of the denominator in inclean. -- Code follows procedures used in old template. local fudge = 1e-14 -- {{Order of magnitude}} adds this, so we do too local prec, minprec, adjust local subunit_ignore_trailing_zero local subunit_more_precision -- kludge for "in" used in input like "|2|ft|6|in" local composite = in_current.composite if composite then subunit_ignore_trailing_zero = true -- input "|2|st|10|lb" has precision 0, not -1 if composite[#composite].exception == 'subunit_more_precision' then subunit_more_precision = true -- do not use standard precision with input like "|2|ft|6|in" end end if denominator and denominator > 0 then prec = math.max(log10(denominator), 1) else -- Count digits after decimal mark, handling cases like '12.345e6'. local exponent local integer, dot, decimals, expstr = inclean:match('^(%d*)(%.?)(%d*)(.*)') local e = expstr:sub(1, 1) if e == 'e' or e == 'E' then exponent = tonumber(expstr:sub(2)) end if dot == '' then prec = subunit_ignore_trailing_zero and 0 or -integer:match('0*$'):len() else prec = #decimals end if exponent then -- So '1230' and '1.23e3' both give prec = -1, and '0.00123' and '1.23e-3' give 5. prec = prec - exponent end end if in_current.istemperature and out_current.istemperature then -- Converting between common temperatures (°C, °F, °R, K); not keVT. -- Kelvin value can be almost zero, or small but negative due to precision problems. -- Also, an input value like -300 C (below absolute zero) gives negative kelvins. -- Calculate minimum precision from absolute value. adjust = 0 local kelvin = abs((invalue - in_current.offset) * in_current.scale) if kelvin < 1e-8 then -- assume nonzero due to input or calculation precision problem minprec = 2 else minprec = 2 - floor(log10(kelvin) + fudge) -- 3 sigfigs in kelvin end else if invalue == 0 or outvalue <= 0 then -- We are never called with a negative outvalue, but it might be zero. -- This is special-cased to avoid calculation exceptions. return record_default_precision(parms, out_current, 0) end if out_current.exception == 'integer_more_precision' and floor(invalue) == invalue then -- With certain output units that sometimes give poor results -- with default rounding, use more precision when the input -- value is equal to an integer. An example of a poor result -- is when input 50 gives a smaller output than input 49.5. -- Experiment shows this helps, but it does not eliminate all -- surprises because it is not clear whether "50" should be -- interpreted as "from 45 to 55" or "from 49.5 to 50.5". adjust = -log10(in_current.scale) elseif subunit_more_precision then -- Conversion like "{{convert|6|ft|1|in|cm}}" (where subunit is "in") -- has a non-standard adjust value, to give more output precision. adjust = log10(out_current.scale) + 2 else adjust = log10(abs(invalue / outvalue)) end adjust = adjust + log10(2) -- Ensure that the output has at least two significant figures. minprec = 1 - floor(log10(outvalue) + fudge) end if extra then adjust = extra.adjust or adjust minprec = extra.minprec or minprec end return record_default_precision(parms, out_current, math.max(floor(prec + adjust), minprec)) end local function convert(parms, invalue, info, in_current, out_current) -- Convert given input value from one unit to another. -- Return output_value (a number) if a simple convert, or -- return f, t where -- f = true, t = table of information with results, or -- f = false, t = error message table. local inscale = in_current.scale local outscale = out_current.scale if not in_current.iscomplex and not out_current.iscomplex then return invalue * (inscale / outscale) -- minimize overhead for most common case end if in_current.invert or out_current.invert then -- Inverted units, such as inverse length, inverse time, or -- fuel efficiency. Built-in units do not have invert set. if (in_current.invert or 1) * (out_current.invert or 1) < 0 then return 1 / (invalue * inscale * outscale) end return invalue * (inscale / outscale) elseif in_current.offset then -- Temperature (there are no built-ins for this type of unit). if info.is_change then return invalue * (inscale / outscale) end return (invalue - in_current.offset) * (inscale / outscale) + out_current.offset else -- Built-in unit. local in_builtin = in_current.builtin local out_builtin = out_current.builtin if in_builtin and out_builtin then if in_builtin == out_builtin then return invalue end -- There are no cases (yet) where need to convert from one -- built-in unit to another, so this should never occur. return false, { 'cvt_bug_convert' } end if in_builtin == 'mach' or out_builtin == 'mach' then -- Should check that only one altitude is given but am planning to remove -- in_current.altitude (which can only occur when Mach is the input unit), -- and out_current.altitude cannot occur. local alt = parms.altitude_ft or in_current.altitude if not alt and parms.altitude_m then alt = parms.altitude_m / 0.3048 -- 1 ft = 0.3048 m end local spd = speed_of_sound(alt) if in_builtin == 'mach' then inscale = spd return invalue * (inscale / outscale) end outscale = spd local adjust = 0.1 / inscale return true, { outvalue = invalue * (inscale / outscale), adjust = log10(adjust) + log10(2), } elseif in_builtin == 'hand' then -- 1 hand = 4 inches; 1.2 hands = 6 inches. -- Decimals of a hand are only defined for the first digit, and -- the first fractional digit should be a number of inches (1, 2 or 3). -- However, this code interprets the entire fractional part as the number -- of inches / 10 (so 1.75 inches would be 0.175 hands). -- A value like 12.3 hands is exactly 12*4 + 3 inches; base default precision on that. local integer, fracpart = math.modf(invalue) local inch_value = 4 * integer + 10 * fracpart -- equivalent number of inches local factor = inscale / outscale if factor == 4 then -- Am converting to inches: show exact result, and use "inches" not "in" by default. if parms.abbr_org == nil then out_current.usename = true end local show = format('%g', abs(inch_value)) -- show and clean are unsigned if not show:find('e', 1, true) then return true, { invalue = inch_value, outvalue = inch_value, clean = show, show = show, } end end local outvalue = (integer + 2.5 * fracpart) * factor local fracstr = info.clean:match('%.(.*)') or '' local fmt if fracstr == '' then fmt = '%.0f' else fmt = '%.' .. format('%d', #fracstr - 1) .. 'f' end return true, { invalue = inch_value, clean = format(fmt, inch_value), outvalue = outvalue, minprec = 0, } end end return false, { 'cvt_bug_convert' } -- should never occur end local function user_style(parms, i) -- Return text for a user-specified style for a table cell, or '' if none, -- given i = 1 (input style) or 2 (output style). local style = parms[(i == 1) and 'stylein' or 'styleout'] if style then style = style:gsub('"', '') if style ~= '' then if style:sub(-1) ~= ';' then style = style .. ';' end return style end end return '' end local function make_table_or_sort(parms, invalue, info, in_current, scaled_top) -- Set options to handle output for a table or a sort key, or both. -- The text sort key is based on the value resulting from converting -- the input to a fake base unit with scale = 1, and other properties -- required for a conversion derived from the input unit. -- For other modules, return the sort key in a hidden span element, and -- the scaled value used to generate the sort key. -- If scaled_top is set, it is the scaled value of the numerator of a per unit -- to be combined with this unit (the denominator) to make the sort key. -- Scaling only works with units that convert with a factor (not temperature). local sortkey, scaled_value if parms.opt_sortable_on then local base = { -- a fake unit with enough fields for a valid convert scale = 1, invert = in_current.invert and 1, iscomplex = in_current.iscomplex, offset = in_current.offset and 0, } local outvalue, extra = convert(parms, invalue, info, in_current, base) if extra then outvalue = extra.outvalue end if in_current.istemperature then -- Have converted to kelvin; assume numbers close to zero have a -- rounding error and should be zero. if abs(outvalue) < 1e-12 then outvalue = 0 end end if scaled_top and outvalue ~= 0 then outvalue = scaled_top / outvalue end scaled_value = outvalue if not valid_number(outvalue) then if outvalue < 0 then sortkey = '1000000000000000000' else sortkey = '9000000000000000000' end elseif outvalue == 0 then sortkey = '5000000000000000000' else local mag = floor(log10(abs(outvalue)) + 1e-14) local prefix if outvalue > 0 then prefix = 7000 + mag else prefix = 2999 - mag outvalue = outvalue + 10^(mag+1) end sortkey = format('%d', prefix) .. format('%015.0f', floor(outvalue * 10^(14-mag))) end end local sortspan if sortkey and not parms.table_align then sortspan = parms.opt_sortable_debug and '<span data-sort-value="' .. sortkey .. '♠"><span style="border:1px solid">' .. sortkey .. '♠</span></span>' or '<span data-sort-value="' .. sortkey .. '♠"></span>' parms.join_before = sortspan end if parms.table_align then local sort if sortkey then sort = ' data-sort-value="' .. sortkey .. '"' if parms.opt_sortable_debug then parms.join_before = '<span style="border:1px solid">' .. sortkey .. '</span>' end else sort = '' end local style = 'style="text-align:' .. parms.table_align .. ';' local joins = {} for i = 1, 2 do joins[i] = (i == 1 and '' or '\n|') .. style .. user_style(parms, i) .. '"' .. sort .. '|' end parms.table_joins = joins end return sortspan, scaled_value end local cvt_to_hand local function cvtround(parms, info, in_current, out_current) -- Return true, t where t is a table with the conversion results; fields: -- show = rounded, formatted string with the result of converting value in info, -- using the rounding specified in parms. -- singular = true if result (after rounding and ignoring any negative sign) -- is "1", or like "1.00", or is a fraction with value < 1; -- (and more fields shown below, and a calculated 'absvalue' field). -- or return false, t where t is an error message table. -- Input info.clean uses en digits (it has been translated, if necessary). -- Output show uses en or non-en digits as appropriate, or can be spelled. if out_current.builtin == 'hand' then return cvt_to_hand(parms, info, in_current, out_current) end local invalue = in_current.builtin == 'hand' and info.altvalue or info.value local outvalue, extra = convert(parms, invalue, info, in_current, out_current) if parms.need_table_or_sort then parms.need_table_or_sort = nil -- process using first input value only make_table_or_sort(parms, invalue, info, in_current) end if extra then if not outvalue then return false, extra end invalue = extra.invalue or invalue outvalue = extra.outvalue end if not valid_number(outvalue) then return false, { 'cvt_invalid_num' } end local isnegative if outvalue < 0 then isnegative = true outvalue = -outvalue end local precision, show, exponent local denominator = out_current.frac if denominator then show = fraction_table(outvalue, denominator) else precision = parms.precision if not precision then if parms.sigfig then show, exponent = make_sigfig(outvalue, parms.sigfig) elseif parms.opt_round then local n = parms.opt_round if n == 0.5 then local integer, fracpart = math.modf(floor(2 * outvalue + 0.5) / 2) if fracpart == 0 then show = format('%.0f', integer) else show = format('%.1f', integer + fracpart) end else show = format('%.0f', floor((outvalue / n) + 0.5) * n) end elseif in_current.builtin == 'mach' then local sigfig = info.clean:gsub('^[0.]+', ''):gsub('%.', ''):len() + 1 show, exponent = make_sigfig(outvalue, sigfig) else local inclean = info.clean if extra then inclean = extra.clean or inclean show = extra.show end if not show then precision = default_precision(parms, invalue, inclean, info.denominator, outvalue, in_current, out_current, extra) end end end end if precision then if precision >= 0 then local fudge if precision <= 8 then -- Add a fudge to handle common cases of bad rounding due to inability -- to precisely represent some values. This makes the following work: -- {{convert|-100.1|C|K}} and {{convert|5555000|um|m|2}}. -- Old template uses #expr round, which invokes PHP round(). -- LATER: Investigate how PHP round() works. fudge = 2e-14 else fudge = 0 end local fmt = '%.' .. format('%d', precision) .. 'f' local success success, show = pcall(format, fmt, outvalue + fudge) if not success then return false, { 'cvt_big_prec', tostring(precision) } end else precision = -precision -- #digits to zero (in addition to any digits after dot) local shift = 10 ^ precision show = format('%.0f', outvalue/shift) if show ~= '0' then exponent = #show + precision end end end local t = format_number(parms, show, exponent, isnegative) if type(show) == 'string' then -- Set singular using match because on some systems 0.99999999999999999 is 1.0. if exponent then t.singular = (exponent == 1 and show:match('^10*$')) else t.singular = (show == '1' or show:match('^1%.0*$')) end else t.fraction_table = show t.singular = (outvalue <= 1) -- cannot have 'fraction == 1', but if it were possible it would be singular end t.raw_absvalue = outvalue -- absolute value before rounding return true, setmetatable(t, { __index = function (self, key) if key == 'absvalue' then -- Calculate absolute value after rounding, if needed. local clean, exponent = rawget(self, 'clean'), rawget(self, 'exponent') local value = tonumber(clean) -- absolute value (any negative sign has been ignored) if exponent then value = value * 10^exponent end rawset(self, key, value) return value end end }) end function cvt_to_hand(parms, info, in_current, out_current) -- Convert input to hands, inches. -- Return true, t where t is a table with the conversion results; -- or return false, t where t is an error message table. if parms.abbr_org == nil then out_current.usename = true -- default is to show name not symbol end local precision = parms.precision local frac = out_current.frac if not frac and precision and precision > 1 then frac = (precision == 2) and 2 or 4 end local out_next = out_current.out_next if out_next then -- Use magic knowledge to determine whether the next unit is inches without requiring i18n. -- The following ensures that when the output combination "hand in" is used, the inches -- value is rounded to match the hands value. Also, displaying say "61½" instead of 61.5 -- is better as 61.5 implies the value is not 61.4. if out_next.exception == 'subunit_more_precision' then out_next.frac = frac end end -- Convert to inches; calculate hands from that. local dummy_unit_table = { scale = out_current.scale / 4, frac = frac } local success, outinfo = cvtround(parms, info, in_current, dummy_unit_table) if not success then return false, outinfo end local tfrac = outinfo.fraction_table local inches = outinfo.raw_absvalue if tfrac then inches = floor(inches) -- integer part only; fraction added later else inches = floor(inches + 0.5) -- a hands measurement never shows decimals of an inch end local hands, inches = divide(inches, 4) outinfo.absvalue = hands + inches/4 -- supposed to be the absolute rounded value, but this is close enough local inchstr = tostring(inches) -- '0', '1', '2' or '3' if precision and precision <= 0 then -- using negative or 0 for precision rounds to nearest hand hands = floor(outinfo.raw_absvalue/4 + 0.5) inchstr = '' elseif tfrac then -- Always show an integer before fraction (like "15.0½") because "15½" means 15-and-a-half hands. inchstr = numdot .. format_fraction(parms, 'out', false, inchstr, tfrac.numstr, tfrac.denstr) else inchstr = numdot .. from_en(inchstr) end outinfo.show = outinfo.sign .. with_separator(parms, format('%.0f', hands)) .. inchstr return true, outinfo end local function evaluate_condition(value, condition) -- Return true or false from applying a conditional expression to value, -- or throw an error if invalid. -- A very limited set of expressions is supported: -- v < 9 -- v * 9 < 9 -- where -- 'v' is replaced with value -- 9 is any number (as defined by Lua tonumber) -- only en digits are accepted -- '<' can also be '<=' or '>' or '>=' -- In addition, the following form is supported: -- LHS and RHS -- where -- LHS, RHS = any of above expressions. local function compare(value, text) local arithop, factor, compop, limit = text:match('^%s*v%s*([*]?)(.-)([<>]=?)(.*)$') if arithop == nil then error('Invalid default expression', 0) elseif arithop == '*' then factor = tonumber(factor) if factor == nil then error('Invalid default expression', 0) end value = value * factor end limit = tonumber(limit) if limit == nil then error('Invalid default expression', 0) end if compop == '<' then return value < limit elseif compop == '<=' then return value <= limit elseif compop == '>' then return value > limit elseif compop == '>=' then return value >= limit end error('Invalid default expression', 0) -- should not occur end local lhs, rhs = condition:match('^(.-%W)and(%W.*)') if lhs == nil then return compare(value, condition) end return compare(value, lhs) and compare(value, rhs) end local function get_default(value, unit_table) -- Return true, s where s = name of unit's default output unit, -- or return false, t where t is an error message table. -- Some units have a default that depends on the input value -- (the first value if a range of values is used). -- If '!' is in the default, the first bang-delimited field is an -- expression that uses 'v' to represent the input value. -- Example: 'v < 120 ! small ! big ! suffix' (suffix is optional) -- evaluates 'v < 120' as a boolean with result -- 'smallsuffix' if (value < 120), or 'bigsuffix' otherwise. -- Input must use en digits and '.' decimal mark. local default = data_code.default_exceptions[unit_table.defkey or unit_table.symbol] or unit_table.default if not default then local per = unit_table.per if per then local function a_default(v, u) local success, ucode = get_default(v, u) if not success then return '?' -- an unlikely error has occurred; will cause lookup of default to fail end -- Attempt to use only the first unit if a combination or output multiple. -- This is not bulletproof but should work for most cases. -- Where it does not work, the convert will need to specify the wanted output unit. local t = all_units[ucode] if t then local combo = t.combination if combo then -- For a multiple like ftin, the "first" unit (ft) is last in the combination. local i = t.multiple and table_len(combo) or 1 ucode = combo[i] end else -- Try for an automatically generated combination. local item = ucode:match('^(.-)%+') or ucode:match('^(%S+)%s') if all_units[item] then return item end end return ucode end local unit1, unit2 = per[1], per[2] local def1 = (unit1 and a_default(value, unit1) or unit_table.vprefix or '') local def2 = a_default(1, unit2) -- 1 because per unit of denominator return true, def1 .. '/' .. def2 end return false, { 'cvt_no_default', unit_table.symbol } end if default:find('!', 1, true) == nil then return true, default end local t = split(default, '!') if #t == 3 or #t == 4 then local success, result = pcall(evaluate_condition, value, t[1]) if success then default = result and t[2] or t[3] if #t == 4 then default = default .. t[4] end return true, default end end return false, { 'cvt_bad_default', unit_table.symbol } end local linked_pages -- to record linked pages so will not link to the same page more than once local function unlink(unit_table) -- Forget that the given unit has previously been linked (if it has). -- That is needed when processing a range of inputs or outputs when an id -- for the first range value may have been evaluated, but only an id for -- the last value is displayed, and that id may need to be linked. linked_pages[unit_table.unitcode or unit_table] = nil end local function make_link(link, id, unit_table) -- Return wikilink "[[link|id]]", possibly abbreviated as in examples: -- [[Mile|mile]] --> [[mile]] -- [[Mile|miles]] --> [[mile]]s -- However, just id is returned if: -- * no link given (so caller does not need to check if a link was defined); or -- * link has previously been used during the current convert (to avoid overlinking). local link_key if unit_table then link_key = unit_table.unitcode or unit_table else link_key = link end if not link or link == '' or linked_pages[link_key] then return id end linked_pages[link_key] = true -- Following only works for language en, but it should be safe on other wikis, -- and overhead of doing it generally does not seem worthwhile. local l = link:sub(1, 1):lower() .. link:sub(2) if link == id or l == id then return '[[' .. id .. ']]' elseif link .. 's' == id or l .. 's' == id then return '[[' .. id:sub(1, -2) .. ']]s' else return '[[' .. link .. '|' .. id .. ']]' end end local function variable_name(clean, unit_table) -- For slwiki, a unit name depends on the value. -- Parameter clean is the unsigned rounded value in en digits, as a string. -- Value Source Example for "m" -- integer 1: name1 meter (also is the name of the unit) -- integer 2: var{1} metra -- integer 3 and 4: var{2} metri -- integer else: var{3} metrov (0 and 5 or more) -- real/fraction: var{4} metra -- var{i} means the i'th field in unit_table.varname if it exists and has -- an i'th field, otherwise name2. -- Fields are separated with "!" and are not empty. -- A field for a unit using an SI prefix has the prefix name inserted, -- replacing '#' if found, or before the field otherwise. local vname if clean == '1' then vname = unit_table.name1 elseif unit_table.varname then local i if clean == '2' then i = 1 elseif clean == '3' or clean == '4' then i = 2 elseif clean:find('.', 1, true) then i = 4 else i = 3 end if i > 1 and varname == 'pl' then i = i - 1 end vname = split(unit_table.varname, '!')[i] end if vname then local si_name = rawget(unit_table, 'si_name') or '' local pos = vname:find('#', 1, true) if pos then vname = vname:sub(1, pos - 1) .. si_name .. vname:sub(pos + 1) else vname = si_name .. vname end return vname end return unit_table.name2 end local function linked_id(parms, unit_table, key_id, want_link, clean) -- Return final unit id (symbol or name), optionally with a wikilink, -- and update unit_table.sep if required. -- key_id is one of: 'symbol', 'sym_us', 'name1', 'name1_us', 'name2', 'name2_us'. local abbr_on = (key_id == 'symbol' or key_id == 'sym_us') if abbr_on and want_link then local symlink = rawget(unit_table, 'symlink') if symlink then return symlink -- for exceptions that have the linked symbol built-in end end local multiplier = rawget(unit_table, 'multiplier') local per = unit_table.per if per then local paren1, paren2 = '', '' -- possible parentheses around bottom unit local unit1 = per[1] -- top unit_table, or nil local unit2 = per[2] -- bottom unit_table if abbr_on then if not unit1 then unit_table.sep = '' -- no separator in "$2/acre" end if not want_link then local symbol = unit_table.symbol_raw if symbol then return symbol -- for exceptions that have the symbol built-in end end if (unit2.symbol):find('⋅', 1, true) then paren1, paren2 = '(', ')' end end local key_id2 -- unit2 is always singular if key_id == 'name2' then key_id2 = 'name1' elseif key_id == 'name2_us' then key_id2 = 'name1_us' else key_id2 = key_id end local result if abbr_on then result = '/' elseif omitsep then result = per_word elseif unit1 then result = ' ' .. per_word .. ' ' else result = per_word .. ' ' end if want_link and unit_table.link then if abbr_on or not varname then result = (unit1 and linked_id(parms, unit1, key_id, false, clean) or '') .. result .. linked_id(parms, unit2, key_id2, false, '1') else result = (unit1 and variable_name(clean, unit1) or '') .. result .. variable_name('1', unit2) end if omit_separator(result) then unit_table.sep = '' end return make_link(unit_table.link, result, unit_table) end if unit1 then result = linked_id(parms, unit1, key_id, want_link, clean) .. result if unit1.sep then unit_table.sep = unit1.sep end elseif omitsep then unit_table.sep = '' end return result .. paren1 .. linked_id(parms, unit2, key_id2, want_link, '1') .. paren2 end if multiplier then -- A multiplier (like "100" in "100km") forces the unit to be plural. multiplier = from_en(multiplier) if not omitsep then multiplier = multiplier .. (abbr_on and '&nbsp;' or ' ') end if not abbr_on then if key_id == 'name1' then key_id = 'name2' elseif key_id == 'name1_us' then key_id = 'name2_us' end end else multiplier = '' end local id = unit_table.fixed_name or ((varname and not abbr_on) and variable_name(clean, unit_table) or unit_table[key_id]) if omit_separator(id) then unit_table.sep = '' end if want_link then local link = data_code.link_exceptions[unit_table.linkey or unit_table.symbol] or unit_table.link if link then local before = '' local i = unit_table.customary if i == 1 and parms.opt_sp_us then i = 2 -- show "U.S." not "US" end if i == 3 and abbr_on then i = 4 -- abbreviate "imperial" to "imp" end local customary = text_code.customary_units[i] if customary then -- LATER: This works for language en only, but it's esoteric so ignore for now. local pertext if id:sub(1, 1) == '/' then -- Want unit "/USgal" to display as "/U.S. gal", not "U.S. /gal". pertext = '/' id = id:sub(2) elseif id:sub(1, 4) == 'per ' then -- Similarly want "per U.S. gallon", not "U.S. per gallon" (but in practice this is unlikely to be used). pertext = 'per ' id = id:sub(5) else pertext = '' end -- Omit any "US"/"U.S."/"imp"/"imperial" from start of id since that will be inserted. local removes = (i < 3) and { 'US&nbsp;', 'US ', 'U.S.&nbsp;', 'U.S. ' } or { 'imp&nbsp;', 'imp ', 'imperial ' } for _, prefix in ipairs(removes) do local plen = #prefix if id:sub(1, plen) == prefix then id = id:sub(plen + 1) break end end before = pertext .. make_link(customary.link, customary[1]) .. ' ' end id = before .. make_link(link, id, unit_table) end end return multiplier .. id end local function make_id(parms, which, unit_table) -- Return id, f where -- id = unit name or symbol, possibly modified -- f = true if id is a name, or false if id is a symbol -- using the value for index 'which', and for 'in' or 'out' (unit_table.inout). -- Result is '' if no symbol/name is to be used. -- In addition, set unit_table.sep = ' ' or '&nbsp;' or '' -- (the separator that caller will normally insert before the id). if parms.opt_values then unit_table.sep = '' return '' end local inout = unit_table.inout local info = unit_table.valinfo[which] local abbr_org = parms.abbr_org local adjectival = parms.opt_adjectival local lk = parms.lk local want_link = (lk == 'on' or lk == inout) local usename = unit_table.usename local singular = info.singular local want_name if usename then want_name = true else if abbr_org == nil then if parms.wantname then want_name = true end if unit_table.usesymbol then want_name = false end end if want_name == nil then local abbr = parms.abbr if abbr == 'on' or abbr == inout or (abbr == 'mos' and inout == 'out') then want_name = false else want_name = true end end end local key if want_name then if lk == nil and unit_table.builtin == 'hand' then want_link = true end if parms.opt_use_nbsp then unit_table.sep = '&nbsp;' else unit_table.sep = ' ' end if parms.opt_singular then local value if inout == 'in' then value = info.value else value = info.absvalue end if value then -- some unusual units do not always set value field value = abs(value) singular = (0 < value and value < 1.0001) end end if unit_table.engscale then -- engscale: so "|1|e3kg" gives "1 thousand kilograms" (plural) singular = false end key = (adjectival or singular) and 'name1' or 'name2' if parms.opt_sp_us then key = key .. '_us' end else if unit_table.builtin == 'hand' then if parms.opt_hand_hh then unit_table.symbol = 'hh' -- LATER: might want i18n applied to this end end unit_table.sep = '&nbsp;' key = parms.opt_sp_us and 'sym_us' or 'symbol' end return linked_id(parms, unit_table, key, want_link, info.clean), want_name end local function decorate_value(parms, unit_table, which, number_word) -- If needed, update unit_table so values will be shown with extra information. -- For consistency with the old template (but different from fmtpower), -- the style to display powers of 10 includes "display:none" to allow some -- browsers to copy, for example, "10³" as "10^3", rather than as "103". local info local engscale = unit_table.engscale local prefix = unit_table.vprefix if engscale or prefix then info = unit_table.valinfo[which] if info.decorated then return -- do not redecorate if repeating convert end info.decorated = true if engscale then local inout = unit_table.inout local abbr = parms.abbr if (abbr == 'on' or abbr == inout) and not parms.number_word then info.show = info.show .. '<span style="margin-left:0.2em">×<span style="margin-left:0.1em">' .. from_en('10') .. '</span></span><s style="display:none">^</s><sup>' .. from_en(tostring(engscale.exponent)) .. '</sup>' elseif number_word then local number_id local lk = parms.lk if lk == 'on' or lk == inout then number_id = make_link(engscale.link, engscale[1]) else number_id = engscale[1] end -- WP:NUMERAL recommends "&nbsp;" in values like "12 million". info.show = info.show .. (parms.opt_adjectival and '-' or '&nbsp;') .. number_id end end if prefix then info.show = prefix .. info.show end end end local function process_input(parms, in_current) -- Processing required once per conversion. -- Return block of text to represent input (value/unit). if parms.opt_output_only or parms.opt_output_number_only or parms.opt_output_unit_only then parms.joins = { '', '' } return '' end local first_unit local composite = in_current.composite -- nil or table of units if composite then first_unit = composite[1] else first_unit = in_current end local id1, want_name = make_id(parms, 1, first_unit) local sep = first_unit.sep -- separator between value and unit, set by make_id local preunit = parms.preunit1 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_input_unit_only then parms.joins = { '', '' } if composite then local parts = { id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, (make_id(parms, 1, unit))) end end id1 = table.concat(parts, ' ') end if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end if parms.opt_also_symbol and not composite and not parms.opt_flip then local join1 = parms.joins[1] if join1 == ' (' or join1 == ' [' then parms.joins = { ' [' .. first_unit[parms.opt_sp_us and 'sym_us' or 'symbol'] .. ']' .. join1 , parms.joins[2] } end end if in_current.builtin == 'mach' and first_unit.sep ~= '' then -- '' means omitsep with non-enwiki name local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = first_unit.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. local prefix2 = make_id(parms, 2, first_unit) .. '&nbsp;' result = range_text(range[1], want_name, parms, result, prefix2 .. valinfo[2].show, 'in', {spaced=true}) end return preunit .. result end if composite then -- Simplify: assume there is no range, and no decoration. local mid = (not parms.opt_flip) and parms.mid or '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival and want_name then sep1 = '-' sep2 = '-' end if omitsep and sep == '' then -- Testing the id of the most significant unit should be sufficient. sep1 = '' sep2 = '' end local parts = { first_unit.valinfo[1].show .. sep1 .. id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, unit.valinfo[1].show .. sep1 .. (make_id(parms, 1, unit))) end end return table.concat(parts, sep2) .. mid end local add_unit = (parms.abbr == 'mos') or parms[parms.opt_flip and 'out_range_x' or 'in_range_x'] or (not want_name and parms.abbr_range_x) local range = parms.range if range and not add_unit then unlink(first_unit) end local id = range and make_id(parms, range.n + 1, first_unit) or id1 local extra, was_hyphenated = hyphenated_maybe(parms, want_name, sep, id, 'in') if was_hyphenated then add_unit = false end local result local valinfo = first_unit.valinfo if range then for i = 0, range.n do local number_word if i == range.n then add_unit = false number_word = true end decorate_value(parms, first_unit, i+1, number_word) local show = valinfo[i+1].show if add_unit then show = show .. first_unit.sep .. (i == 0 and id1 or make_id(parms, i+1, first_unit)) end if i == 0 then result = show else result = range_text(range[i], want_name, parms, result, show, 'in') end end else decorate_value(parms, first_unit, 1, true) result = valinfo[1].show end return result .. preunit .. extra end local function process_one_output(parms, out_current) -- Processing required for each output unit. -- Return block of text to represent output (value/unit). local inout = out_current.inout -- normally 'out' but can be 'in' for order=out local id1, want_name = make_id(parms, 1, out_current) local sep = out_current.sep -- set by make_id local preunit = parms.preunit2 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_output_unit_only then if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end if out_current.builtin == 'mach' and out_current.sep ~= '' then -- '' means omitsep with non-enwiki name local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = out_current.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. result = range_text(range[1], want_name, parms, result, prefix .. valinfo[2].show, inout, {spaced=true}) end return preunit .. result end local add_unit = (parms[parms.opt_flip and 'in_range_x' or 'out_range_x'] or (not want_name and parms.abbr_range_x)) and not parms.opt_output_number_only local range = parms.range if range and not add_unit then unlink(out_current) end local id = range and make_id(parms, range.n + 1, out_current) or id1 local extra, was_hyphenated = hyphenated_maybe(parms, want_name, sep, id, inout) if was_hyphenated then add_unit = false end local result local valinfo = out_current.valinfo if range then for i = 0, range.n do local number_word if i == range.n then add_unit = false number_word = true end decorate_value(parms, out_current, i+1, number_word) local show = valinfo[i+1].show if add_unit then show = show .. out_current.sep .. (i == 0 and id1 or make_id(parms, i+1, out_current)) end if i == 0 then result = show else result = range_text(range[i], want_name, parms, result, show, inout) end end else decorate_value(parms, out_current, 1, true) result = valinfo[1].show end if parms.opt_output_number_only then return result end return result .. preunit .. extra end local function make_output_single(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for a single output (which is not a combination or a multiple); -- or return false, t where t is an error message table. if parms.opt_order_out and in_unit_table.unitcode == out_unit_table.unitcode then out_unit_table.valinfo = in_unit_table.valinfo else out_unit_table.valinfo = collection() for _, v in ipairs(in_unit_table.valinfo) do local success, info = cvtround(parms, v, in_unit_table, out_unit_table) if not success then return false, info end out_unit_table.valinfo:add(info) end end return true, process_one_output(parms, out_unit_table) end local function make_output_multiple(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for an output which is a multiple (like 'ftin'); -- or return false, t where t is an error message table. local inout = out_unit_table.inout -- normally 'out' but can be 'in' for order=out local multiple = out_unit_table.multiple -- table of scaling factors (will not be nil) local combos = out_unit_table.combination -- table of unit tables (will not be nil) local abbr = parms.abbr local abbr_org = parms.abbr_org local disp = parms.disp local want_name = (abbr_org == nil and (disp == 'or' or disp == 'slash')) or not (abbr == 'on' or abbr == inout or abbr == 'mos') local want_link = (parms.lk == 'on' or parms.lk == inout) local mid = parms.opt_flip and parms.mid or '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival and want_name then sep1 = '-' sep2 = '-' end local do_spell = parms.opt_spell_out parms.opt_spell_out = nil -- so the call to cvtround does not spell the value local function make_result(info, isfirst) local fmt, outvalue, sign local results = {} for i = 1, #combos do local tfrac, thisvalue, strforce local out_current = combos[i] out_current.inout = inout local scale = multiple[i] if i == 1 then -- least significant unit ('in' from 'ftin') local decimals out_current.frac = out_unit_table.frac local success, outinfo = cvtround(parms, info, in_unit_table, out_current) if not success then return false, outinfo end if isfirst then out_unit_table.valinfo = { outinfo } -- in case output value of first least significant unit is needed end sign = outinfo.sign tfrac = outinfo.fraction_table if outinfo.is_scientific then strforce = outinfo.show decimals = '' elseif tfrac then decimals = '' else local show = outinfo.show -- number as a string in local language local p1, p2 = show:find(numdot, 1, true) decimals = p1 and show:sub(p2 + 1) or '' -- text after numdot, if any end fmt = '%.' .. ulen(decimals) .. 'f' -- to reproduce precision if decimals == '' then if tfrac then outvalue = floor(outinfo.raw_absvalue) -- integer part only; fraction added later else outvalue = floor(outinfo.raw_absvalue + 0.5) -- keep all integer digits of least significant unit end else outvalue = outinfo.absvalue end end if scale then outvalue, thisvalue = divide(outvalue, scale) else thisvalue = outvalue end local id if want_name then if varname then local clean if strforce or tfrac then clean = '.1' -- dummy value to force name for floating point else clean = format(fmt, thisvalue) end id = variable_name(clean, out_current) else local key = 'name2' if parms.opt_adjectival then key = 'name1' elseif tfrac then if thisvalue == 0 then key = 'name1' end elseif parms.opt_singular then if 0 < thisvalue and thisvalue < 1.0001 then key = 'name1' end else if thisvalue == 1 then key = 'name1' end end id = out_current[key] end else id = out_current['symbol'] end if i == 1 and omit_separator(id) then -- Testing the id of the least significant unit should be sufficient. sep1 = '' sep2 = '' end if want_link then local link = out_current.link if link then id = make_link(link, id, out_current) end end local strval local spell_inout = (i == #combos or outvalue == 0) and inout or '' -- trick so the last value processed (first displayed) has uppercase, if requested if strforce and outvalue == 0 then sign = '' -- any sign is in strforce strval = strforce -- show small values in scientific notation; will only use least significant unit elseif tfrac then local wholestr = (thisvalue > 0) and tostring(thisvalue) or nil strval = format_fraction(parms, spell_inout, false, wholestr, tfrac.numstr, tfrac.denstr, do_spell) else strval = (thisvalue == 0) and from_en('0') or with_separator(parms, format(fmt, thisvalue)) if do_spell then strval = spell_number(parms, spell_inout, strval) or strval end end table.insert(results, strval .. sep1 .. id) if outvalue == 0 then break end fmt = '%.0f' -- only least significant unit can have a non-integral value end local reversed, count = {}, #results for i = 1, count do reversed[i] = results[count + 1 - i] end return true, sign .. table.concat(reversed, sep2) end local valinfo = in_unit_table.valinfo local success, result = make_result(valinfo[1], true) if not success then return false, result end local range = parms.range if range then for i = 1, range.n do local success, result2 = make_result(valinfo[i+1]) if not success then return false, result2 end result = range_text(range[i], want_name, parms, result, result2, inout, {spaced=true}) end end return true, result .. mid end local function process(parms, in_unit_table, out_unit_table) -- Return true, s, outunit where s = final wikitext result, -- or return false, t where t is an error message table. linked_pages = {} local success, bad_output local bad_input_mcode = in_unit_table.bad_mcode -- nil if input unit is a valid convert unit local out_unit = parms.out_unit if out_unit == nil or out_unit == '' or type(out_unit) == 'function' then if bad_input_mcode or parms.opt_input_unit_only then bad_output = '' else local getdef = type(out_unit) == 'function' and out_unit or get_default success, out_unit = getdef(in_unit_table.valinfo[1].value, in_unit_table) parms.out_unit = out_unit if not success then bad_output = out_unit end end end if not bad_output and not out_unit_table then success, out_unit_table = lookup(parms, out_unit, 'any_combination') if success then local mismatch = check_mismatch(in_unit_table, out_unit_table) if mismatch then bad_output = mismatch end else bad_output = out_unit_table end end local lhs, rhs local flipped = parms.opt_flip and not bad_input_mcode if bad_output then rhs = (bad_output == '') and '' or message(parms, bad_output) elseif parms.opt_input_unit_only then rhs = '' else local combos -- nil (for 'ft' or 'ftin'), or table of unit tables (for 'm ft') if not out_unit_table.multiple then -- nil/false ('ft' or 'm ft'), or table of factors ('ftin') combos = out_unit_table.combination end local frac = parms.frac -- nil or denominator of fraction for output values if frac then -- Apply fraction to the unit (if only one), or to non-SI units (if a combination), -- except that if a precision is also specified, the fraction only applies to -- the hand unit; that allows the following result: -- {{convert|156|cm|in hand|1|frac=2}} → 156 centimetres (61.4 in; 15.1½ hands) -- However, the following is handled elsewhere as a special case: -- {{convert|156|cm|hand in|1|frac=2}} → 156 centimetres (15.1½ hands; 61½ in) if combos then local precision = parms.precision for _, unit in ipairs(combos) do if unit.builtin == 'hand' or (not precision and not unit.prefixes) then unit.frac = frac end end else out_unit_table.frac = frac end end local outputs = {} local imax = combos and #combos or 1 -- 1 (single unit) or number of unit tables if imax == 1 then parms.opt_order_out = nil -- only useful with an output combination end if not flipped and not parms.opt_order_out then -- Process left side first so any duplicate links (from lk=on) are suppressed -- on right. Example: {{convert|28|e9pc|e9ly|abbr=off|lk=on}} lhs = process_input(parms, in_unit_table) end for i = 1, imax do local success, item local out_current = combos and combos[i] or out_unit_table out_current.inout = 'out' if i == 1 then if imax > 1 and out_current.builtin == 'hand' then out_current.out_next = combos[2] -- built-in hand can influence next unit in a combination end if parms.opt_order_out then out_current.inout = 'in' end end if out_current.multiple then success, item = make_output_multiple(parms, in_unit_table, out_current) else success, item = make_output_single(parms, in_unit_table, out_current) end if not success then return false, item end outputs[i] = item end if parms.opt_order_out then lhs = outputs[1] table.remove(outputs, 1) end local sep = parms.table_joins and parms.table_joins[2] or parms.join_between rhs = table.concat(outputs, sep) end if flipped or not lhs then local input = process_input(parms, in_unit_table) if flipped then lhs = rhs rhs = input else lhs = input end end if parms.join_before then lhs = parms.join_before .. lhs end local wikitext if bad_input_mcode then if bad_input_mcode == '' then wikitext = lhs else wikitext = lhs .. message(parms, bad_input_mcode) end elseif parms.table_joins then wikitext = parms.table_joins[1] .. lhs .. parms.table_joins[2] .. rhs else wikitext = lhs .. parms.joins[1] .. rhs .. parms.joins[2] end if parms.warnings and not bad_input_mcode then wikitext = wikitext .. parms.warnings end return true, get_styles(parms) .. wikitext, out_unit_table end local function main_convert(frame) -- Do convert, and if needed, do it again with higher default precision. local parms = { frame = frame } -- will hold template arguments, after translation set_config(frame.args) local success, result = get_parms(parms, frame:getParent().args) if success then if type(result) ~= 'table' then return tostring(result) end local in_unit_table = result local out_unit_table for _ = 1, 2 do -- use counter so cannot get stuck repeating convert success, result, out_unit_table = process(parms, in_unit_table, out_unit_table) if success and parms.do_convert_again then parms.do_convert_again = false else break end end end -- If input=x gives a problem, the result should be just the user input -- (if x is a property like P123 it has been replaced with ''). -- An unknown input unit would display the input and an error message -- with success == true at this point. -- Also, can have success == false with a message that outputs an empty string. if parms.input_text then if success and not parms.have_problem then return result end local cat if parms.tracking then -- Add a tracking category using the given text as the category sort key. -- There is currently only one type of tracking, but in principle multiple -- items could be tracked, using different sort keys for convenience. cat = wanted_category('tracking', parms.tracking) end return parms.input_text .. (cat or '') end return success and result or message(parms, result) end local function _unit(unitcode, options) -- Helper function for Module:Val to look up a unit. -- Parameter unitcode must be a string to identify the wanted unit. -- Parameter options must be nil or a table with optional fields: -- value = number (for sort key; default value is 1) -- scaled_top = nil for a normal unit, or a number for a unit which is -- the denominator of a per unit (for sort key) -- si = { 'symbol', 'link' } -- (a table with two strings) to make an SI unit -- that will be used for the look up -- link = true if result should be [[linked]] -- sort = 'on' or 'debug' if result should include a sort key in a -- span element ('debug' makes the key visible) -- name = true for the name of the unit instead of the symbol -- us = true for the US spelling of the unit, if any -- Return nil if unitcode is not a non-empty string. -- Otherwise return a table with fields: -- text = requested symbol or name of unit, optionally linked -- scaled_value = input value adjusted by unit scale; used for sort key -- sortspan = span element with sort key like that provided by {{ntsh}}, -- calculated from the result of converting value -- to a base unit with scale 1. -- unknown = true if the unitcode was not known unitcode = strip(unitcode) if unitcode == nil or unitcode == '' then return nil end set_config({}) linked_pages = {} options = options or {} local parms = { abbr = options.name and 'off' or 'on', lk = options.link and 'on' or nil, opt_sp_us = options.us and true or nil, opt_ignore_error = true, -- do not add pages using this function to 'what links here' for Module:Convert/extra opt_sortable_on = options.sort == 'on' or options.sort == 'debug', opt_sortable_debug = options.sort == 'debug', } if options.si then -- Make a dummy table of units (just one unit) for lookup to use. -- This makes lookup recognize any SI prefix in the unitcode. local symbol = options.si[1] or '?' parms.unittable = { [symbol] = { _name1 = symbol, _name2 = symbol, _symbol = symbol, utype = symbol, scale = symbol == 'g' and 0.001 or 1, prefixes = 1, default = symbol, link = options.si[2], }} end local success, unit_table = lookup(parms, unitcode, 'no_combination') if not success then unit_table = setmetatable({ symbol = unitcode, name2 = unitcode, utype = unitcode, scale = 1, default = '', defkey = '', linkey = '' }, unit_mt) end local value = tonumber(options.value) or 1 local clean = tostring(abs(value)) local info = { value = value, altvalue = value, singular = (clean == '1'), clean = clean, show = clean, } unit_table.inout = 'in' unit_table.valinfo = { info } local sortspan, scaled_value if options.sort then sortspan, scaled_value = make_table_or_sort(parms, value, info, unit_table, options.scaled_top) end return { text = make_id(parms, 1, unit_table), sortspan = sortspan, scaled_value = scaled_value, unknown = not success and true or nil, } end return { convert = main_convert, _unit = _unit } cac541bea61c5fbbcb0a2768343935e97587b60a Module:Unicode data 828 361 712 2023-05-10T13:46:04Z wikipedia>Trappist the monk 0 +is_rtl_frame (frame) entry point to gain access to is_rtl (str) from an invoke; Scribunto text/plain local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1) else -- level is actually the format string. return error(string.format(level, ...), 2) end end local function binary_range_search(codepoint, ranges) local low, mid, high low, high = 1, ranges.length or require "Module:TableTools".length(ranges) while low <= high do mid = floor((low + high) / 2) local range = ranges[mid] if codepoint < range[1] then high = mid - 1 elseif codepoint <= range[2] then return range, mid else low = mid + 1 end end return nil, mid end p.binary_range_search = binary_range_search --[[ local function linear_range_search(codepoint, ranges) for i, range in ipairs(ranges) do if range[1] <= codepoint and codepoint <= range[2] then return range end end end --]] -- Load a module by indexing "loader" with the name of the module minus the -- "Module:Unicode data/" part. For instance, loader.blocks returns -- [[Module:Unicode data/blocks]]. If a module cannot be loaded, false will be -- returned. local loader = setmetatable({}, { __index = function (self, key) local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key) if not success then data = false end self[key] = data return data end }) -- For the algorithm used to generate Hangul Syllable names, -- see "Hangul Syllable Name Generation" in section 3.12 of the -- Unicode Specification: -- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf local name_hooks = { { 0x00, 0x1F, "<control-%04X>" }, -- C0 control characters { 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters { 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A { 0x4E00, 0x9FFF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph { 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables local Hangul_data = loader.Hangul local syllable_index = codepoint - 0xAC00 return ("HANGUL SYLLABLE %s%s%s"):format( Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)], Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count) / Hangul_data.trail_count)], Hangul_data.trails[syllable_index % Hangul_data.trail_count] ) end }, -- High Surrogates, High Private Use Surrogates, Low Surrogates { 0xD800, 0xDFFF, "<surrogate-%04X>" }, { 0xE000, 0xF8FF, "<private-use-%04X>" }, -- Private Use -- CJK Compatibility Ideographs { 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph { 0x18800, 0x18AFF, function (codepoint) return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF) end }, { 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement { 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu { 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B { 0x2A700, 0x2B739, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C { 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D { 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E { 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F -- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane) { 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17) end}, { 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G { 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H { 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use { 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use } name_hooks.length = #name_hooks local name_range_cache local function generate_name(data, codepoint) if type(data) == "string" then return data:format(codepoint) else return data(codepoint) end end --[[ -- Checks that the code point is a number and in range. -- Does not check whether code point is an integer. -- Not used local function check_codepoint(funcName, argIdx, val) require 'libraryUtil'.checkType(funcName, argIdx, val, 'number') if codepoint < 0 or 0x10FFFF < codepoint then errorf("Codepoint %04X out of range", codepoint) end end --]] -- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8 function p.lookup_name(codepoint) -- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned -- (Cn) and specifically noncharacters: -- https://www.unicode.org/faq/private_use.html#nonchar4 if 0xFDD0 <= codepoint and (codepoint <= 0xFDEF or floor(codepoint % 0x10000) >= 0xFFFE) then return ("<noncharacter-%04X>"):format(codepoint) end if name_range_cache -- Check if previously used "name hook" applies to this code point. and codepoint >= name_range_cache[1] and codepoint <= name_range_cache[2] then return generate_name(name_range_cache[3], codepoint) end local range = binary_range_search(codepoint, name_hooks) if range then name_range_cache = range return generate_name(range[3], codepoint) end local data = loader[('names/%03X'):format(codepoint / 0x1000)] if data and data[codepoint] then return data[codepoint] -- Unassigned (Cn) consists of noncharacters and reserved characters. -- The character has been established not to be a noncharacter, -- and if it were assigned, its name would already been retrieved, -- so it must be reserved. else return ("<reserved-%04X>"):format(codepoint) end end --[[ -- No image data modules on Wikipedia yet. function p.lookup_image(codepoint) local data = loader[('images/%03X'):format(codepoint / 0x1000)] if data then return data[codepoint] end end --]] local planes = { [ 0] = "Basic Multilingual Plane"; [ 1] = "Supplementary Multilingual Plane"; [ 2] = "Supplementary Ideographic Plane"; [ 3] = "Tertiary Ideographic Plane"; [14] = "Supplementary Special-purpose Plane"; [15] = "Supplementary Private Use Area-A"; [16] = "Supplementary Private Use Area-B"; } -- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable. local blocks local function block_iter(blocks, i) i = i + 1 local data = blocks[i] if data then -- Unpack doesn't work on tables loaded with mw.loadData. return i, data[1], data[2], data[3] end end -- An ipairs-type iterator generator for the list of blocks. function p.enum_blocks() local blocks = loader.blocks return block_iter, blocks, 0 end function p.lookup_plane(codepoint) local i = floor(codepoint / 0x10000) return planes[i] or ("Plane %u"):format(i) end function p.lookup_block(codepoint) local blocks = loader.blocks local range = binary_range_search(codepoint, blocks) if range then return range[3] else return "No Block" end end function p.get_block_info(name) for i, block in ipairs(loader.blocks) do if block[3] == name then return block end end end function p.is_valid_pagename(pagename) local has_nonws = false for cp in mw.ustring.gcodepoint(pagename) do if (cp == 0x0023) -- # or (cp == 0x005B) -- [ or (cp == 0x005D) -- ] or (cp == 0x007B) -- { or (cp == 0x007C) -- | or (cp == 0x007D) -- } or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR or ((cp >= 0x2000) and (cp <= 0x200A)) -- spaces in General Punctuation block or (cp == 0xFFFD) -- REPLACEMENT CHARACTER then return false end local printable, result = p.is_printable(cp) if not printable then return false end if result ~= "space-separator" then has_nonws = true end end return has_nonws end local function manual_unpack(what, from) if what[from + 1] == nil then return what[from] end local result = {} from = from or 1 for i, item in ipairs(what) do if i >= from then table.insert(result, item) end end return unpack(result) end local function compare_ranges(range1, range2) return range1[1] < range2[1] end -- Creates a function to look up data in a module that contains "singles" (a -- code point-to-data map) and "ranges" (an array containing arrays that contain -- the low and high code points of a range and the data associated with that -- range). -- "loader" loads and returns the "singles" and "ranges" tables. -- "match_func" is passed the code point and either the data or the "dots", and -- generates the final result of the function. -- The varargs ("dots") describes the default data to be returned if there wasn't -- a match. -- In case the function is used more than once, "cache" saves ranges that have -- already been found to match, or a range whose data is the default if there -- was no match. local function memo_lookup(data_module_subpage, match_func, ...) local dots = { ... } local cache = {} local singles, ranges return function (codepoint) if not singles then local data_module = loader[data_module_subpage] singles, ranges = data_module.singles, data_module.ranges end if singles[codepoint] then return match_func(codepoint, singles[codepoint]) end local range = binary_range_search(codepoint, cache) if range then return match_func(codepoint, manual_unpack(range, 3)) end local range, index = binary_range_search(codepoint, ranges) if range then table.insert(cache, range) table.sort(cache, compare_ranges) return match_func(codepoint, manual_unpack(range, 3)) end if ranges[index] then local dots_range if codepoint > ranges[index][2] then dots_range = { ranges[index][2] + 1, ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF, unpack(dots) } else -- codepoint < range[index][1] dots_range = { ranges[index - 1] and ranges[index - 1][2] + 1 or 0, ranges[index][1] - 1, unpack(dots) } end table.sort(cache, compare_ranges) end return match_func(codepoint) end end -- Get a code point's combining class value in [[Module:Unicode data/combining]], -- and return whether this value is not zero. Zero is assigned as the default -- if the combining class value is not found in this data module. -- That is, return true if character is combining, or false if it is not. -- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for -- more information. p.is_combining = memo_lookup( "combining", function (codepoint, combining_class) return combining_class and combining_class ~= 0 or false end, 0) function p.add_dotted_circle(str) return (mw.ustring.gsub(str, ".", function(char) if p.is_combining(mw.ustring.codepoint(char)) then return '◌' .. char end end)) end local lookup_control = memo_lookup( "control", function (codepoint, ccc) return ccc or "assigned" end, "assigned") p.lookup_control = lookup_control function p.is_assigned(codepoint) return lookup_control(codepoint) ~= "unassigned" end function p.is_printable(codepoint) local result = lookup_control(codepoint) return (result == "assigned") or (result == "space-separator"), result end function p.is_whitespace(codepoint) local result = lookup_control(codepoint) return (result == "space-separator"), result end p.lookup_category = memo_lookup( "category", function (codepoint, category) return category end, "Cn") local lookup_script = memo_lookup( "scripts", function (codepoint, script_code) return script_code or 'Zzzz' end, "Zzzz") p.lookup_script = lookup_script function p.get_best_script(str) -- Check type of argument, because mw.text.decode coerces numbers to strings! require "libraryUtil".checkType("get_best_script", 1, str, "string") -- Convert HTML character references (including named character references, -- or character entities) to characters. str = mw.text.decode(str, true) local scripts = {} for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) -- Ignore "Inherited", "Undetermined", or "Uncoded" scripts. if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then scripts[script] = true end end -- If scripts does not contain two or more keys, -- return first and only key (script code) in table. if not next(scripts, next(scripts)) then return next(scripts) end -- else return majority script, or else "Zzzz"? end function p.is_Latin(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0340-U+10FFFF. If they are not found and there is at least -- one Latin-script character, the string counts as Latin, because the rest -- of the characters can only be Zyyy, Zinh, and Zzzz. -- The only scripts found below U+0370 (the first code point of the Greek -- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz. -- See the codepage in the [[UTF-8]] article. if not str:find "[\205-\244]" then for codepoint in mw.ustring.gcodepoint(str) do if lookup_script(codepoint) == "Latn" then return true end end end local Latn = false for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if script == "Latn" then Latn = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return Latn end -- Checks that a string contains only characters belonging to right-to-left -- scripts, or characters of ignorable scripts. function p.is_rtl(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0580-U+10FFFF. If they are not found, the string can only -- have characters from a left-to-right script, because the first code point -- in a right-to-left script is U+0591, in the Hebrew block. if not str:find "[\214-\244]" then return false end local result = false local rtl = loader.scripts.rtl for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if rtl[script] then result = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return result end --[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------ external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text has <br /> tags. ]] function p.is_rtl_frame (frame) local str = frame.args[1]; -- get the string from the {{#invoke:}} frame str = str:gsub ('%b<>', ''); -- strip any html and html-like tags return p.is_rtl (str); -- return if whatever remains rtl; false else end local function get_codepoint(args, arg) local codepoint_string = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) local codepoint = tonumber(codepoint_string, 16) or errorf(2, "Parameter %s is not a code point in hexadecimal base", tostring(arg)) if not (0 <= codepoint and codepoint <= 0x10FFFF) then errorf(2, "code point in parameter %s out of range", tostring(arg)) end return codepoint end local function get_func(args, arg, prefix) local suffix = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) suffix = mw.text.trim(suffix) local func_name = prefix .. suffix local func = p[func_name] or errorf(2, "There is no function '%s'", func_name) return func end -- This function allows any of the "lookup" functions to be invoked. The first -- parameter is the word after "lookup_"; the second parameter is the code point -- in hexadecimal base. function p.lookup(frame) local func = get_func(frame.args, 1, "lookup_") local codepoint = get_codepoint(frame.args, 2) local result = func(codepoint) if func == p.lookup_name then -- Prevent code point labels such as <control-0000> from being -- interpreted as HTML tags. result = result:gsub("<", "&lt;") end return result end function p.is(frame) local func = get_func(frame.args, 1, "is_") -- is_Latin and is_valid_pagename take strings. if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then return (func(frame.args[2])) else -- The rest take code points. local codepoint = get_codepoint(frame.args, 2) return (func(codepoint)) -- Adjust to one result. end end return p 444a6cd03f4361fb8aa2439f5f5f5dc1f1a4dd59 Module:Infobox/doc 828 727 1443 2023-05-19T18:05:05Z wikipedia>Andrybak 0 add [[Module:Italic title]] to Lua wikitext text/x-wiki {{High-use|3308957|all-pages = yes}} {{module rating|protected}} {{Lua|Module:Navbar|Module:Italic title}} {{Uses TemplateStyles|Module:Infobox/styles.css|Template:Hlist/styles.css|Template:Plainlist/styles.css}} '''Module:Infobox''' is a [[WP:Module|module]] that implements the {{tl|Infobox}} template. Please see the template page for usage instructions. == Tracking categories == * {{clc|Pages using infobox templates with ignored data cells}} * {{clc|Articles using infobox templates with no data rows}} * {{clc|Pages using embedded infobox templates with the title parameter}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:Modules that add a tracking category]] [[Category:Wikipedia infoboxes]] [[Category:Infobox modules]] [[Category:Modules that check for strip markers]] }}</includeonly> 936ad219eb263a6f3293d62f667bd7b5db1059c1 Module:Unsubst/doc 828 701 1391 2023-05-21T21:20:14Z 47.227.95.73 0 Undid revision 1156231758 by [[Special:Contributions/27.114.169.168|27.114.169.168]] ([[User talk:27.114.169.168|talk]]) wikitext text/x-wiki <!-- Categories where indicated at the bottom of this page, please. --> {{High-risk| 3841439 |all-pages = yes}} {{Module rating|protected}} This is a helper module to facilitate a substituted template transform into a template transclusion. Maintenance templates, such as {{tl|Citation needed}} or {{tl|Refimprove}}, should never be substituted. A trick to avoid that is to make a template substitute to its transcluded form. Infoboxes should use [[Module:Unsubst-infobox]], as should any other templates with parameters listed in block format by default. === Usage === To turn a template into a self-substituting template, wrap the existing template code with: <pre> {{SAFESUBST:<noinclude />#invoke:Unsubst||$B= [ ... existing template code ... ] }} </pre> The wikitext to display when not substed must be given as "$B". All other parameters passed to the #invoke will be copied to the generated template invocation as default values. If the value of any of these default parameters is <code>__DATE__</code>, that value in the generated template invocation will be the current month and year. Some templates have a {{tag|noinclude|o}} but no matching {{tag|noinclude|c}} at the end of the template. In such cases the missing {{tag|noinclude|c}} must be added before the ending <code>{{))}}</code>. ==== Advanced ==== <pre> {{SAFESUBST:<noinclude />#invoke:Unsubst||$params=[ parameters ]|$aliases=[ aliases ]|$flags=[ flags ]|$B= [ ... existing template code ... ] }} </pre> Due to Lua limitations, parameters are normally ordered randomly when the template is substituted. {{para|$params}} can be used in #invoke:Unsubst to list template parameters in order, comma-separated (e.g. <code>egg,bacon,sausage,cheese,spam</code>). Numbered parameters should be before others in the list. Any remaining parameters are tacked onto the end of the generated invocation. Parameter aliases can be listed in {{para|$aliases}} (and shouldn't be listed in {{para|$params}}), and will be replaced automatically. Each alias and its replacement should be formatted as <code>alias>replacement</code>, and each of those pairs should be comma-separated (e.g. <code>œuf>egg,melt>cheese</code>). Note that this parameter can function with or without {{para|$params}}. Parameter {{para|$flags}} can be used to modify other facets of the module's behaviour; entries are comma-separated. Valid flags are <code>override</code> (allows parameters in the #invoke: to take precedence over parameters in the original template invocation); <code>keep-whitespace</code> (prevents whitespace from being trimmed from unnamed parameters); and <code>remove-empty</code> (removes empty parameters). These parameters can be manipulated using parser functions to provide more complicated options (note that in the parameters any parser function, or template or module invocation, should also have <code><nowiki>SAFESUBST:<noinclude /></nowiki></code>). Parameter {{para|$template-name}} will override the subst'd templates name with the template name assigned to this parameter. === Example === Consider a template Template:Example containing the following code: <pre> {{SAFESUBST:<noinclude />#invoke:Unsubst||foo=bar |date=__DATE__ |$B= [ ... Template code goes here ... ] }} </pre> {| class="wikitable" ! Original !! Result |- | {{tlsc|example}} || {{tlc|Example|foo=bar|date{{=}}{{#time:F Y}}}} |- | {{tlsc|example|foo{{=}}X}} || {{tlc|Example|foo{{=}}X|date{{=}}{{#time:F Y}}}} |- | {{tlsc|example|baz{{=}}X}} || {{tlc|Example|foo=bar|baz{{=}}X|date{{=}}{{#time:F Y}}}} |- | {{tlsc|example|date{{=}}January 2001}} || {{tlc|Example|foo{{=}}bar|date{{=}}January 2001}} |} <includeonly>{{sandbox other|| | <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Wikipedia metatemplates]] [[Category:Modules that add a tracking category]] }}</includeonly> 8dbb431bb81f29826d442141ca78276f64bfc923 Module:Coordinates/styles.css 828 607 1202 2023-05-24T21:17:17Z wikipedia>Izno 0 per tper text text/plain /* {{pp-template}} */ /* Geographical coordinates defaults. The classes "geo", "longitude", and "latitude" are used by the [[Geo microformat]]. */ .geo-default, .geo-dms, .geo-dec { display: inline; } .geo-nondefault, .geo-multi-punct, .geo-inline-hidden { display: none; } .longitude, .latitude { white-space: nowrap; } 1b5d036501a9f6bc9dcf3c9117e8d6bc97507290 Module:Authority control 828 722 1433 2023-05-25T08:36:15Z wikipedia>MSGJ 0 stop linking if target of redirect is same as current page Scribunto text/plain require('strict') local p = {} local configfile = 'Module:Authority control/config' -- default configuation module local arg = mw.getCurrentFrame().args.config if arg and arg~='' then configfile = 'Module:Authority control/config/' .. arg end local config if mw.title.new(configfile).exists then config = mw.loadData(configfile) else return error('Invalid configuration file',0) end local title = mw.title.getCurrentTitle() local namespace = title.namespace local testcases = title.subpageText == config.i18n.testcases local function needsAttention(sortkey) return '[[' .. config.i18n.category .. ':' .. config.i18n.attentioncat .. '|' .. sortkey .. title.text .. ']]' end local function addCat(cat,sortkey) if cat and cat ~= '' and (namespace == 0 or namespace == 14 or testcases) then local redlinkcat = '' if testcases == false and mw.title.new(cat, 14).exists == false then redlinkcat = needsAttention('N') end if sortkey then cat = '[[' .. config.i18n.category .. ':'..cat..'|' .. sortkey .. title.text .. ']]' else cat = '[[' .. config.i18n.category .. ':'..cat..']]' end cat = cat .. redlinkcat return cat else return '' end end local function getCatForId(id,faulty) local cat = config.i18n.Articles_with .. ' ' if faulty then cat = cat .. config.i18n.faulty .. ' ' end cat = cat .. id .. ' ' .. config.i18n.identifiers return addCat(cat) end local function getIdsFromWikidata(qid,property) local function getquals(statement,qualid) if statement.qualifiers and statement.qualifiers['P'..qualid] then return mw.wikibase.renderSnak(statement.qualifiers['P'..qualid][1]) else return false end end local ids = {} if qid then for _, statement in ipairs(mw.wikibase.getBestStatements(qid,property)) do if statement.mainsnak.datavalue then local val = statement.mainsnak.datavalue.value if val then local namedas = getquals(statement,1810) or getquals(statement,742) or '' table.insert(ids,{id=val,name=namedas}) end end end end return ids end local _makelink = function(conf,val,nextid,qid) --validate values and create a link local function tooltip(text,label) if label and label~='' then return mw.getCurrentFrame():expandTemplate{title = "Tooltip", args = {text,label}} else return text end end local link if nextid==1 then if conf.prefix then link = '*' .. conf.prefix .. '\n**' else link = '*' end else link = '\n**' end local valid_value = false if conf.customlink then -- use function to validate and generate link local label = nextid>1 and nextid local newlink= require(config.auxiliary)[conf.customlink](val.id,label) if newlink then link = link .. newlink valid_value = true end else if conf.pattern then -- use pattern to determine validity if defined valid_value = string.match(val.id,'^'..conf.pattern..'$') elseif conf.patterns then for _,pattern in ipairs(conf.patterns) do valid_value = val.id:match('^'..pattern..'$') if valid_value then break end end elseif conf.valid then -- otherwise use function to determine validity valid_value = require(config.auxiliary)[conf.valid](val.id) else -- no validation possible valid_value = val.id end if valid_value then local newlink local label = conf.label if not label or nextid>1 then label = tostring(nextid) end if conf.link then valid_value = valid_value:gsub('%%', '%%%%') newlink = '[' .. mw.ustring.gsub(conf.link,'%$1',valid_value) .. ' ' .. label .. ']' else newlink = valid_value end link = link .. '<span class="uid">'..tooltip(newlink,val.name)..'</span>' end end if valid_value then link = link .. getCatForId(conf.category or conf[1]) else --local preview = require("Module:If preview") local wdlink = qid and '[[:wikidata:' .. qid .. '#P' .. conf.property .. ']]' or '' link = link .. '[[File:' .. config.i18n.warningicon .. '|20px|frameless|link=' .. wdlink .. '|' .. config.i18n.The .. ' ' .. conf[1] .. ' ' .. config.i18n.identifier .. ' ' .. val.id .. ' ' .. config.i18n.isnotvalid .. '.]]' if conf.errorcat then link = link .. addCat(conf.errorcat) else link = link .. getCatForId(conf.category or conf[1],true) end link = link .. addCat(config.i18n.allfaultycat,conf[1])-- .. preview._warning({'The '..conf[1]..' id '..val..' is not valid.'}) end return link end --[[==========================================================================]] --[[ Main ]] --[[==========================================================================]] function p.authorityControl(frame) local function resolveQID(qid) if qid then qid = 'Q'..mw.ustring.gsub(qid, '^[Qq]', '') if mw.wikibase.isValidEntityId(qid) and mw.wikibase.entityExists(qid) then local sitelink = mw.wikibase.getSitelink(qid) if sitelink then return mw.wikibase.getEntityIdForTitle(sitelink) or mw.wikibase.getEntity(qid).id end return mw.wikibase.getEntity(qid).id end end end local conf = config.config local parentArgs = frame:getParent().args local auxCats = '' local rct = false -- boolean to track if there are any links to be returned local qid,topic local wikilink = function(qid,hideifequal) local label,sitelink = mw.wikibase.getLabel(qid),mw.wikibase.getSitelink(qid) if label then if sitelink then local target = mw.title.new(sitelink) if target==title or (target.isRedirect and target.redirectTarget==title) then -- do not link return label else -- make wikilink to article return '[[' .. sitelink .. '|' .. label .. ']]' end else return label end else auxCats = auxCats .. needsAttention('L') return qid end end if namespace == 0 then qid = mw.wikibase.getEntityIdForCurrentPage() end if qid then -- article is connected to Wikidata item if parentArgs.qid and (resolveQID(parentArgs.qid) ~= qid) then -- non-matching qid parameter auxCats = auxCats .. needsAttention('D') end else -- page is not connected to any Wikidata item qid = resolveQID(parentArgs.qid) -- check qid parameter if no wikidata item is connected if qid then -- qid parameter is valid, set topic to display topic = mw.wikibase.getLabel(qid) if topic then if mw.ustring.lower(title.subpageText) == mw.ustring.lower(topic) then -- suppress topic display if subpagename equals topic up to case change topic = nil end if topic and mw.wikibase.getSitelink(qid) then -- make wikilink to article topic = '[[' .. mw.wikibase.getSitelink(qid) .. '|' .. topic .. ']]' end else auxCats = auxCats .. needsAttention('L') end elseif parentArgs.qid and parentArgs.qid~='' then -- invalid qid has been supplied, add to tracking cat auxCats = auxCats .. needsAttention('Q') end end local qids = {} -- setup any additional QIDs if parentArgs.additional=='auto' and qid then -- check P527 for parts to add additional qids local checkparts = function(property) local parts = mw.wikibase.getBestStatements(qid,property) if parts then for _,part in ipairs(parts) do if part.mainsnak.datavalue and part.mainsnak.datavalue.value.id then local resolvedqid = resolveQID(part.mainsnak.datavalue.value.id) if resolvedqid then table.insert(qids,resolvedqid) end end end end end for _,part in ipairs(config.auto_additional) do checkparts('P'..tostring(part)) end elseif parentArgs.additional and parentArgs.additional ~= '' then for _,v in ipairs(mw.text.split(parentArgs.additional,"%s*,%s*")) do v = resolveQID(v) if v then if v == qid then -- duplicate of qid parameter auxCats = auxCats .. needsAttention('R') end table.insert(qids,v) else -- invalid QID specified auxCats = auxCats .. needsAttention('A') end end end local sections = {} local localparams = false local numsections = 0 for _,_ in ipairs(config.sections) do numsections = numsections + 1 end for _ = 1,#qids+numsections do table.insert(sections,{}) end local qslink = '' -- setup link to add using QuickStatements -- check which identifiers to show/suppress in template local show = {} -- setup list local showall = true local function stripP(pid) if pid:match("^[Pp]%d+$") then pid = mw.ustring.gsub(pid,'[Pp]','') --strip P from property number end if pid:match("^%d+$") then return tonumber(pid) end end local function addshowlist(list) if list and list ~= '' then for _,v in ipairs(mw.text.split(string.lower(list),"%s*,%s*")) do local vprop = stripP(v) if vprop then -- e.g. show=P214 to show one particular property show[vprop] = true else -- e.g. show=arts to use whitelist if config.whitelists[v] then for _,w in ipairs(config.whitelists[v].properties) do show[w] = true end end end end showall = false end end addshowlist(frame.args.show) -- check show= parameter on wrapper template addshowlist(parentArgs.show or parentArgs.country) -- check show parameter on article template if parentArgs.suppress then local suppresslist = mw.text.split(parentArgs.suppress,"%s*,%s*") -- split parameter by comma for _,v in ipairs(suppresslist) do v = stripP(string.upper(v)) if v then show[v] = false auxCats = auxCats .. '[[' .. config.i18n.category .. ':' .. config.i18n.suppressedcat .. ']]' else auxCats = auxCats .. needsAttention('P') end end end local function makeSections(qid,addit) local tval = {} local function parameter_is_used(property) local used = false if property then if tval[property] then if tval[property][1] then used = true end elseif tval[property] == false then -- property has been manually suppressed used = true end end return used end for _, params in ipairs(conf) do tval[params.property] = getIdsFromWikidata(qid, 'P' .. params.property) -- setup table for values with property number as key local showb = true if (show[params.property] == nil) and (show[string.upper(params[1])] == nil ) then showb = showall -- if not specified then depends on showall elseif (show[params.property] == false) or (show[string.upper(params[1])] == false) then -- if either are false then id will be suppressed showb = false end if not showb then tval[params.property] = false -- indicates the identifier is suppressed elseif not addit then local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]] if val and val~='' then -- add local parameter to list if not already in localparams = true local bnew = true for _, w in pairs(tval[params.property]) do if val == w.id then bnew = false end end if bnew then -- add new value to table if qid then qslink = qslink .. '%7C%7C' .. qid .. '%7CP' .. params.property .. '%7C%22' .. mw.uri.encode(val,"PATH") .. '%22%7CS143%7CQ328' end table.insert(tval[params.property],{id=val,name=''}) end end end local suppress = false if params.suppressedbyproperty then for _,sc in ipairs(params.suppressedbyproperty) do if parameter_is_used(sc) then suppress = true end end end if tval[params.property] ~= false and not suppress then local tlinks = {} -- setup table for links local nextIdVal = 1 local row = '' for _,val in ipairs(tval[params.property]) do local link = _makelink(params,val,nextIdVal,qid) row = row .. link table.insert(tlinks,link) nextIdVal = nextIdVal + 1 end if nextIdVal>=2 then row = row .. '\n' table.insert(sections[addit or params.section],row) rct = true end end end end local function pencil(qid) if not qid then return '' end local args = { pid = 'identifiers' } -- #target the list of identifiers args.qid = qid return require('Module:EditAtWikidata')._showMessage(args) end makeSections(qid,false) for c = 1,#qids do makeSections(qids[c],numsections+c) end --configure Navbox local outString = '' if rct or localparams then -- there is at least one link to display local Navbox = require('Module:Navbox') local sect,lastsect = 0,0 local navboxArgs = { name = 'Authority control', navboxclass = 'authority-control', bodyclass = 'hlist', state = parentArgs.state or config.i18n.autocollapse, navbar = 'off' } for c=1,numsections+#qids do if #sections[c] ~= 0 then -- section is non-empty sect = sect + 1 lastsect = c local sectname if c <= numsections then -- regular section sectname = config.sections[c].name else -- section from additional qid local qid = qids[c-numsections] sectname = wikilink(qid) .. pencil(qid) end navboxArgs['group' .. c] = sectname navboxArgs['list' .. c] = table.concat(sections[c]) end end if localparams then lastsect = lastsect + 1 sect = sect + 1 navboxArgs['group' .. lastsect] = config.i18n.warning local warning = frame:expandTemplate{title = config.i18n.errortemplate, args = {config.i18n.localparams}} if qslink ~= '' then warning = warning .. ' ' .. config.i18n.movetowd .. '<span class="qs autoconfirmed-show">&#32;[[File:Commons to Wikidata QuickStatements.svg|20px|link=https://quickstatements.toolforge.org/#/v1=' .. qslink .. '|' .. config.i18n.addtowd .. ']]</span>' elseif not qid then if namespace == 0 then warning = warning .. ' ' .. config.i18n.connecttowd elseif namespace==14 or namespace==2 or namespace==118 then warning = warning .. ' ' .. config.i18n.qidcode end end navboxArgs['list' .. lastsect] = warning end if topic then -- display in expanded form with topic navboxArgs.title = config.i18n.aclink .. ' &ndash; ' .. topic .. pencil(qid) elseif sect == 1 then -- special display when only one section if lastsect <= numsections then if config.sections[lastsect].hidelabelwhenalone then -- no special label when only general or other IDs are present navboxArgs['group' .. lastsect] = config.i18n.aclink .. pencil(qid) else -- other regular section navboxArgs['group' .. lastsect] = config.i18n.aclink .. ': ' .. navboxArgs['group' .. lastsect] .. pencil(qid) end else -- section from additional qid navboxArgs['group' .. lastsect] = config.i18n.aclink .. ': ' .. navboxArgs['group' .. lastsect] end else -- add title to navbox navboxArgs.title = config.i18n.aclink .. pencil(qid) end outString = Navbox._navbox(navboxArgs) end if parentArgs.state then if (parentArgs.state ~= config.i18n.collapsed) and (parentArgs.state ~= config.i18n.expanded) and (parentArgs.state ~= config.i18n.autocollapse) then --invalid state parameter auxCats = auxCats .. needsAttention('S') end end if testcases then auxCats = mw.ustring.gsub(auxCats, '(%[%[)(' .. config.i18n.category .. ')', '%1:%2') --for easier checking end --out outString = outString..auxCats if namespace ~= 0 then outString = mw.ustring.gsub(outString,'(%[%[)(' .. config.i18n.category .. ':' .. config.i18n.Articles .. ')([^%|%]]+)%|?[^%|%]]*(%]%])','%1:%2%3%4') outString = mw.ustring.gsub(outString,'(%[%[)(' .. config.i18n.category .. ':' .. config.i18n.All_articles .. ')([^%|%]]+)%|?[^%|%]]*(%]%])','%1:%2%3%4') end local check = require('Module:Check for unknown parameters')._check local sortkey if namespace == 0 then sortkey = '*' .. title.text else sortkey = title.fullText end outString = outString .. check({ ['unknown'] = '[[' .. config.i18n.category .. ':' .. config.i18n.pageswithparams .. '|' .. sortkey .. ']]', ['preview'] = config.i18n.previewwarning, 'show', 'country', 'suppress', 'additional', 'qid', 'state' }, parentArgs) return outString end p.makelink = function(conf,val,nextid,qid) return _makelink(conf,val,nextid,qid) end return p 6aaed059184eb51fa32b5adad4740da4796293a2 Module:Navbox 828 286 562 2023-05-28T13:26:56Z wikipedia>Uzume 0 strict Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Module:Language/data/iana languages 828 363 716 2023-05-28T16:32:43Z wikipedia>Trappist the monk 0 update to 2023-05-11 data; Scribunto text/plain -- File-Date: 2023-05-11 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bh"] = {"Bihari languages"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Nyanja", "Chewa", "Chichewa"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["dek"] = {"Dek"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slave (Athapascan)"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Han"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu (Menchum Division)"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Harijan Kinnauri"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["lui"] = {"Luiseno"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mócheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Newari", "Nepal Bhasa"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["nte"] = {"Nathembo"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yol"] = {"Yola"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mpuono"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } 90939c58de6a6d2fcd35fcf808d04acfa67bc8fd Module:Language/data/iana scripts 828 364 718 2023-05-28T16:32:45Z wikipedia>Trappist the monk 0 update to 2023-05-11 data; Scribunto text/plain -- File-Date: 2023-05-11 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Toto"] = {"Toto"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } 279ed2c472c8154d84ff2ea23c214e64c168d7e9 Module:Language/data/iana regions 828 365 720 2023-05-28T16:32:47Z wikipedia>Trappist the monk 0 update to 2023-05-11 data; Scribunto text/plain -- File-Date: 2023-05-11 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } 9b8ad87e9a14bff745205a082bcd25cbcd8713ee Module:Language/data/iana variants 828 366 722 2023-05-28T16:32:49Z wikipedia>Trappist the monk 0 update to 2023-05-11 data; Scribunto text/plain -- File-Date: 2023-05-11 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["laukika"] = { ["descriptions"] = {"Classical Sanskrit"}, ["prefixes"] = {"sa"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["vaidika"] = { ["descriptions"] = {"Vedic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } 6e18c8087ecffb70ab2722634deb5ede2d84fffa Module:Language/data/iana suppressed scripts 828 367 724 2023-05-28T16:32:52Z wikipedia>Trappist the monk 0 update to 2023-05-11 data; Scribunto text/plain -- File-Date: 2023-05-11 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } fd9ca3f5beaba5fdfc149a8d24e63fa3a9768f4f Module:High-use 828 353 696 2023-05-30T11:20:32Z wikipedia>Lectonar 0 Changed protection settings for "[[Module:High-use]]": [[WP:High-risk templates|High-risk template or module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p 134551888e066954a89c109d2faa8af71a4454a4 Module:Transclusion count 828 354 698 2023-05-30T20:51:38Z wikipedia>Isabelle Belato 0 Changed protection settings for "[[Module:Transclusion count]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Module:Arguments/doc 828 719 1427 2023-05-31T05:46:27Z wikipedia>Xover 0 /* Custom formatting of arguments */ c/e to make clear we're talking about the argument values, not the argument name/key, here wikitext text/x-wiki {{Used in system}} {{Module rating|p}} This module provides easy processing of arguments passed from <code>#invoke</code>. It is a meta-module, meant for use by other modules, and should not be called from <code>#invoke</code> directly. Its features include: * Easy trimming of arguments and removal of blank arguments. * Arguments can be passed by both the current frame and by the parent frame at the same time. (More details below.) * Arguments can be passed in directly from another Lua module or from the debug console. * Most features can be customized. == Basic use == First, you need to load the module. It contains one function, named <code>getArgs</code>. <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs </syntaxhighlight> In the most basic scenario, you can use getArgs inside your main function. The variable <code>args</code> is a table containing the arguments from #invoke. (See below for details.) <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) -- Main module code goes here. end return p </syntaxhighlight> === Recommended practice === However, the recommended practice is to use a function just for processing arguments from #invoke. This means that if someone calls your module from another Lua module you don't have to have a frame object available, which improves performance. <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) return p._main(args) end function p._main(args) -- Main module code goes here. end return p </syntaxhighlight> The way this is called from a template is <code><nowiki>{{#invoke:Example|main}}</nowiki></code> (optionally with some parameters like <code><nowiki>{{#invoke:Example|main|arg1=value1|arg2=value2}}</nowiki></code>), and the way this is called from a module is <syntaxhighlight lang=lua inline>require('Module:Example')._main({arg1 = 'value1', arg2 = value2, 'spaced arg3' = 'value3'})</syntaxhighlight>. What this second one does is construct a table with the arguments in it, then gives that table to the p._main(args) function, which uses it natively. === Multiple functions === If you want multiple functions to use the arguments, and you also want them to be accessible from #invoke, you can use a wrapper function. <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame) return p[funcName](args) end end p.func1 = makeInvokeFunc('_func1') function p._func1(args) -- Code for the first function goes here. end p.func2 = makeInvokeFunc('_func2') function p._func2(args) -- Code for the second function goes here. end return p </syntaxhighlight> === Options === The following options are available. They are explained in the sections below. <syntaxhighlight lang="lua"> local args = getArgs(frame, { trim = false, removeBlanks = false, valueFunc = function (key, value) -- Code for processing one argument end, frameOnly = true, parentOnly = true, parentFirst = true, wrappers = { 'Template:A wrapper template', 'Template:Another wrapper template' }, readOnly = true, noOverwrite = true }) </syntaxhighlight> === Trimming and removing blanks === Blank arguments often trip up coders new to converting MediaWiki templates to Lua. In template syntax, blank strings and strings consisting only of whitespace are considered false. However, in Lua, blank strings and strings consisting of whitespace are considered true. This means that if you don't pay attention to such arguments when you write your Lua modules, you might treat something as true that should actually be treated as false. To avoid this, by default this module removes all blank arguments. Similarly, whitespace can cause problems when dealing with positional arguments. Although whitespace is trimmed for named arguments coming from #invoke, it is preserved for positional arguments. Most of the time this additional whitespace is not desired, so this module trims it off by default. However, sometimes you want to use blank arguments as input, and sometimes you want to keep additional whitespace. This can be necessary to convert some templates exactly as they were written. If you want to do this, you can set the <code>trim</code> and <code>removeBlanks</code> arguments to <code>false</code>. <syntaxhighlight lang="lua"> local args = getArgs(frame, { trim = false, removeBlanks = false }) </syntaxhighlight> === Custom formatting of arguments === Sometimes you want to remove some blank arguments but not others, or perhaps you might want to put all of the positional arguments in lower case. To do things like this you can use the <code>valueFunc</code> option. The input to this option must be a function that takes two parameters, <code>key</code> and <code>value</code>, and returns a single value. This value is what you will get when you access the field <code>key</code> in the <code>args</code> table. Example 1: this function preserves whitespace for the first positional argument's value, but trims all other arguments' value and removes all other blank arguments. <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if key == 1 then return value elseif value then value = mw.text.trim(value) if value ~= '' then return value end end return nil end }) </syntaxhighlight> Example 2: this function removes blank arguments and converts all argument values to lower case, but doesn't trim whitespace from positional parameters. <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if not value then return nil end value = mw.ustring.lower(value) if mw.ustring.find(value, '%S') then return value end return nil end }) </syntaxhighlight> Note: the above functions will fail if passed input that is not of type <code>string</code> or <code>nil</code>. This might be the case if you use the <code>getArgs</code> function in the main function of your module, and that function is called by another Lua module. In this case, you will need to check the type of your input. This is not a problem if you are using a function specially for arguments from #invoke (i.e. you have <code>p.main</code> and <code>p._main</code> functions, or something similar). {{cot|Examples 1 and 2 with type checking}} Example 1: <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if key == 1 then return value elseif type(value) == 'string' then value = mw.text.trim(value) if value ~= '' then return value else return nil end else return value end end }) </syntaxhighlight> Example 2: <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = mw.ustring.lower(value) if mw.ustring.find(value, '%S') then return value else return nil end else return value end end }) </syntaxhighlight> {{cob}} Also, please note that the <code>valueFunc</code> function is called more or less every time an argument is requested from the <code>args</code> table, so if you care about performance you should make sure you aren't doing anything inefficient with your code. === Frames and parent frames === Arguments in the <code>args</code> table can be passed from the current frame or from its parent frame at the same time. To understand what this means, it is easiest to give an example. Let's say that we have a module called <code>Module:ExampleArgs</code>. This module prints the first two positional arguments that it is passed. {{cot|Module:ExampleArgs code}} <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) return p._main(args) end function p._main(args) local first = args[1] or '' local second = args[2] or '' return first .. ' ' .. second end return p </syntaxhighlight> {{cob}} <code>Module:ExampleArgs</code> is then called by <code>Template:ExampleArgs</code>, which contains the code <code><nowiki>{{#invoke:ExampleArgs|main|firstInvokeArg}}</nowiki></code>. This produces the result "firstInvokeArg". Now if we were to call <code>Template:ExampleArgs</code>, the following would happen: {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstInvokeArg secondTemplateArg |} There are three options you can set to change this behaviour: <code>frameOnly</code>, <code>parentOnly</code> and <code>parentFirst</code>. If you set <code>frameOnly</code> then only arguments passed from the current frame will be accepted; if you set <code>parentOnly</code> then only arguments passed from the parent frame will be accepted; and if you set <code>parentFirst</code> then arguments will be passed from both the current and parent frames, but the parent frame will have priority over the current frame. Here are the results in terms of <code>Template:ExampleArgs</code>: ; frameOnly {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstInvokeArg |} ; parentOnly {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstTemplateArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstTemplateArg secondTemplateArg |} ; parentFirst {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstTemplateArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstTemplateArg secondTemplateArg |} Notes: # If you set both the <code>frameOnly</code> and <code>parentOnly</code> options, the module won't fetch any arguments at all from #invoke. This is probably not what you want. # In some situations a parent frame may not be available, e.g. if getArgs is passed the parent frame rather than the current frame. In this case, only the frame arguments will be used (unless parentOnly is set, in which case no arguments will be used) and the <code>parentFirst</code> and <code>frameOnly</code> options will have no effect. === Wrappers === The ''wrappers'' option is used to specify a limited number of templates as ''wrapper templates'', that is, templates whose only purpose is to call a module. If the module detects that it is being called from a wrapper template, it will only check for arguments in the parent frame; otherwise it will only check for arguments in the frame passed to getArgs. This allows modules to be called by either #invoke or through a wrapper template without the loss of performance associated with having to check both the frame and the parent frame for each argument lookup. For example, the only content of [[Template:Side box]] (excluding content in {{tag|noinclude}} tags) is <code><nowiki>{{#invoke:Side box|main}}</nowiki></code>. There is no point in checking the arguments passed directly to the #invoke statement for this template, as no arguments will ever be specified there. We can avoid checking arguments passed to #invoke by using the ''parentOnly'' option, but if we do this then #invoke will not work from other pages either. If this were the case, the {{para|text|Some text}} in the code <code><nowiki>{{#invoke:Side box|main|text=Some text}}</nowiki></code> would be ignored completely, no matter what page it was used from. By using the <code>wrappers</code> option to specify 'Template:Side box' as a wrapper, we can make <code><nowiki>{{#invoke:Side box|main|text=Some text}}</nowiki></code> work from most pages, while still not requiring that the module check for arguments on the [[Template:Side box]] page itself. Wrappers can be specified either as a string, or as an array of strings. <syntaxhighlight lang="lua"> local args = getArgs(frame, { wrappers = 'Template:Wrapper template' }) </syntaxhighlight> <syntaxhighlight lang="lua"> local args = getArgs(frame, { wrappers = { 'Template:Wrapper 1', 'Template:Wrapper 2', -- Any number of wrapper templates can be added here. } }) </syntaxhighlight> Notes: # The module will automatically detect if it is being called from a wrapper template's /sandbox subpage, so there is no need to specify sandbox pages explicitly. # The ''wrappers'' option effectively changes the default of the ''frameOnly'' and ''parentOnly'' options. If, for example, ''parentOnly'' were explicitly set to 0 with ''wrappers'' set, calls via wrapper templates would result in both frame and parent arguments being loaded, though calls not via wrapper templates would result in only frame arguments being loaded. # If the ''wrappers'' option is set and no parent frame is available, the module will always get the arguments from the frame passed to <code>getArgs</code>. === Writing to the args table === Sometimes it can be useful to write new values to the args table. This is possible with the default settings of this module. (However, bear in mind that it is usually better coding style to create a new table with your new values and copy arguments from the args table as needed.) <syntaxhighlight lang="lua"> args.foo = 'some value' </syntaxhighlight> It is possible to alter this behaviour with the <code>readOnly</code> and <code>noOverwrite</code> options. If <code>readOnly</code> is set then it is not possible to write any values to the args table at all. If <code>noOverwrite</code> is set, then it is possible to add new values to the table, but it is not possible to add a value if it would overwrite any arguments that are passed from #invoke. === Ref tags === This module uses [[mw:Extension:Scribunto/Lua reference manual#Metatables|metatables]] to fetch arguments from #invoke. This allows access to both the frame arguments and the parent frame arguments without using the <code>pairs()</code> function. This can help if your module might be passed {{tag|ref}} tags as input. As soon as {{tag|ref}} tags are accessed from Lua, they are processed by the MediaWiki software and the reference will appear in the reference list at the bottom of the article. If your module proceeds to omit the reference tag from the output, you will end up with a phantom reference – a reference that appears in the reference list but without any number linking to it. This has been a problem with modules that use <code>pairs()</code> to detect whether to use the arguments from the frame or the parent frame, as those modules automatically process every available argument. This module solves this problem by allowing access to both frame and parent frame arguments, while still only fetching those arguments when it is necessary. The problem will still occur if you use <code>pairs(args)</code> elsewhere in your module, however. === Known limitations === The use of metatables also has its downsides. Most of the normal Lua table tools won't work properly on the args table, including the <code>#</code> operator, the <code>next()</code> function, and the functions in the table library. If using these is important for your module, you should use your own argument processing function instead of this module.<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:Lua metamodules]] }}</includeonly> 685b245c5975658a038e1dddc9ff5df51231cee9 Module:InfoboxImage/doc 828 739 1467 2023-06-02T00:35:18Z wikipedia>Voidxor 0 Use is discouraged per [[WP:THUMBSIZE]]; see {{Para|upright}} below instead. wikitext text/x-wiki {{used in system}} {{Module rating|protected}} ==Overview== This module is used within infoboxes to process the image parameters and tidy up the formatting of the result. ==Parameters== {| class="wikitable" ! Parameter ! Description |- | image | Required. The main parameter that should be passed over which contains the image info. |- | size | Size to display image, in pixels. Use is discouraged per [[WP:THUMBSIZE]]; see {{Para|upright}} below instead. |- | maxsize | Maximum size to display image. Note: If no size or sizedefault params specified then image will be shown at maxsize. |- | sizedefault | The size to use for the image if no size param is specified. Defaults to [[Wikipedia:Autosizing images|frameless]]. |- | alt | Alt text for the image. |- | title | Title text for image (mouseover text). |- | border | If yes, then a border is added. |- | page | The page number to be displayed when using a multi-page image. |- | upright | If upright=yes, adds "upright" which displays image at 75% of default image size (which is 220px if not changed at [[Special:Preferences]]). If a value, adds "upright=''value''" to image, where values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%). |- | center | If yes, then the image is centered. |- | thumbtime | thumbtime param, used for video clips. |- | suppressplaceholder | If no, then will not suppress certain placeholder images. See {{section link||Placeholder images which can be suppressed}}. |- | link | Page to go to when clicking on the image. |- | class | HTML classes to add to the image. |} Note: If you specify the maxsize or sizedefault params, then you should include the px after the number. {{Use dmy dates|date=July 2016}} ==Parameters displayed in image syntax== All parameters: :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}} }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}}}}</code> When "size" and "maxsize" are defined, the smaller of the two is used (if "px" is omitted it will be added by the module): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</code> When "size" is not defined, "sizedefault" is used, even if larger than "maxsize" (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</code> When "size" and "sizedefault" are not defined, "maxsize" is used (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</code> When "size", "sizedefault", and "maxsize" are not defined, "frameless" is added, which displays the image at the default thumbnail size (220px, but logged in users can change this at [[Special:Preferences]]) and is required if using "upright" to scale the default size: :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</code> Use of "upright" without a number value, which displays the image at approximately 75% of the user's default size (multiplied by 0.75 then rounded to nearest 10): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</code> When "alt" is used without "title", the alt text is also used as the title: :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</code> For more information, see [[Wikipedia:Extended image syntax]]. ==Sample usage== <syntaxhighlight lang="wikitext" style="overflow:auto;"> |image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{{image_upright|1}}}|alt={{{alt|}}}}} </syntaxhighlight> ==Examples== {| class="wikitable" |- | {{mlx|InfoboxImage|InfoboxImage}} | {{#invoke:InfoboxImage|InfoboxImage}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}}} | {{#invoke:InfoboxImage|InfoboxImage|image=}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg}}<br /> {{mlx|InfoboxImage|InfoboxImage|image{{=}}File:Abbey Rd Studios.jpg}}<br /> {{mlx|InfoboxImage|InfoboxImage|image{{=}}Image:Abbey Rd Studios.jpg}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|upright{{=}}yes}}<br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|upright{{=}}1.2}}<br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size{{=}}100px}}<br /> {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size{{=}}100}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|Image:Abbey Rd Studios.jpg|200px}}}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|Image:Abbey Rd Studios.jpg|200px}}|title=Abbey Road!}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|sizedefault{{=}}250px|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|sizedefault{{=}}250|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|sizedefault{{=}}250px|alt{{=}}The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size{{=}}100px|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Bandera de Bilbao.svg|size{{=}}100|border{{=}}yes}} | {{#invoke:InfoboxImage|InfoboxImage|image=Bandera de Bilbao.svg|size=200|border=yes}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Image is needed male.svg}} | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Image is needed male.svg|suppressplaceholder=no}} | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|File:Image is needed male.svg|200px}}}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|File:Image is needed male.svg|200px}}|suppressplaceholder{{=}}no}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size=50px|maxsize{{=}}100px}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size=200px|maxsize{{=}}100px}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|File:Abbey Rd Studios.jpg|200px}}|maxsize{{=}}100px}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|maxsize{{=}}100px|center{{=}}yes}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}no such image|maxsize{{=}}100px|center{{=}}yes}}<!-- this issue sh'd be fixed somewhow--> | {{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}} |} == Placeholder images which can be suppressed == {| | style="vertical-align:top;" | * [[:File:Blue - replace this image female.svg]] * [[:File:Blue - replace this image male.svg]] * [[:File:Female no free image yet.png]] * [[:File:Male no free image yet.png]] * [[:File:Flag of None (square).svg]] * [[:File:Flag of None.svg]] * [[:File:Flag of.svg]] * [[:File:Green - replace this image female.svg]] * [[:File:Green - replace this image male.svg]] * [[:File:Image is needed female.svg]] * [[:File:Image is needed male.svg]] * [[:File:Location map of None.svg]] * [[:File:Male no free image yet.png]] * [[:File:Missing flag.png]] * [[:File:No flag.svg]] * [[:File:No free portrait.svg]] * [[:File:No portrait (female).svg]] * [[:File:No portrait (male).svg]] * [[:File:Red - replace this image female.svg]] * [[:File:Red - replace this image male.svg]] * [[:File:Replace this image female (blue).svg]] * [[:File:Replace this image female.svg]] * [[:File:Replace this image male (blue).svg]] * [[:File:Replace this image male.svg]] * [[:File:Silver - replace this image female.svg]] * [[:File:Silver - replace this image male.svg]] * [[:File:Replace this image.svg]] * [[:File:Cricket no pic.png]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:Example.jpg]] * [[:File:Image placeholder.png]] * [[:File:No male portrait.svg]] * [[:File:Nocover-upload.png]] * [[:File:NoDVDcover copy.png]] * [[:File:Noribbon.svg]] | style="vertical-align:top;" | * [[:File:No portrait-BFD-test.svg]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] * [[:File:Sin bandera.svg]] * [[:File:Sin escudo.svg]] * [[:File:Replace this image - temple.png]] * [[:File:Replace this image butterfly.png]] * [[:File:Replace this image.svg]] * [[:File:Replace this image1.svg]] * [[:File:Resolution angle.png]] * [[:File:Image-No portrait-text-BFD-test.svg]] * [[:File:Insert image here.svg]] * [[:File:No image available.png]] * [[:File:NO IMAGE YET square.png]] * [[:File:NO IMAGE YET.png]] * [[:File:No Photo Available.svg]] * [[:File:No Screenshot.svg]] * [[:File:No-image-available.jpg]] * [[:File:Null.png]] * [[:File:PictureNeeded.gif]] * [[:File:Place holder.jpg]] * [[:File:Unbenannt.JPG]] * [[:File:UploadACopyrightFreeImage.svg]] * [[:File:UploadAnImage.gif]] * [[:File:UploadAnImage.svg]] * [[:File:UploadAnImageShort.svg]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:No male portrait.svg]] * [[:File:NoDVDcover copy.png]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] |} == Tracking categories == * {{clc|Pages using infoboxes with thumbnail images}} <includeonly>{{Sandbox other|| {{DEFAULTSORT:Image, {{PAGENAME}}}} [[Category:Modules for image handling]] [[Category:Modules that add a tracking category]] [[Category:Infobox modules]] }}</includeonly> c94fcbc786f35c8e23c8f499b3090efc604852c7 Module:Lang 828 360 710 2023-06-03T14:57:26Z wikipedia>Trappist the monk 0 sync from sandbox per [[Template_talk:Lang#Edit_request_3_June_2023|edit request]]; Scribunto text/plain --[=[ Lua support for the {{lang}}, {{lang-xx}}, and {{transl}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl() local yesno = require ('Module:Yesno'); local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ validates |italic= or |italics= assigned values. When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on the individual template's requirements, 'italic' for {{transl}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-xx}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, 'only one of |italic=, |italics=, or |i= can be specified'; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array ( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ prettify ietf tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=) returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1 ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- ietf tag parts if not is_set (source) then return nil, nil, nil, nil, nil, 'missing language tag'; end local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args, template) local out = {}; local category; if 'Transl' == template then category = 'Transl'; else category = 'Lang and lang-xx' end table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: {{', template, '}}: '})); table.insert (out, msg); table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages) table.insert (out, table.concat ({'[[Category:', category, ' template errors]]'})); end return table.concat (out); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- adds <i> and </i> tags to list-item text or to implied <p>..</p> text. mixed not supported ]] local function div_markup_add (text, style) local implied_p = {}; if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in html markup. This because the lang= attibute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default html tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = table.concat ({language, ' collective text'}); -- for collective languages else title_text = table.concat ({language, '-language text'}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] for English: [[Category:Articles containing explicitly cited English-language text]] for ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) local cat = {}; local retval; if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return table.concat ({'[[Category:Articles with text in ', language_name, ']]'}); end table.insert (cat, '[[Category:Articles containing '); if this_wiki_lang_tag == code then table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language else table.insert (cat, language_name); end table.insert (cat, '-language text]]'); return table.concat (cat); end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string The value |script= is not used in {{transl}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transl}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript) This function is used by both lang_xx() and transl() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style transl() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transl}}, style only applies when a language code is provided ]] local function make_translit (code, language_name, translit, std, tscript, style) local title; local out_t = {}; local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' romanization'; -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (transl may not provide a language code) title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' transliteration'; -- finish the tool tip else title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?) end end end local close_tag; if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transl}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style table.insert (out_t, "<i lang=\""); -- so use <i> tag close_tag = '</i>'; -- tag to be used when closing else table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it close_tag = '</span>'; -- tag to be used when closing end table.insert (out_t, code); table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script else table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transl}} only) close_tag = '</span>'; end table.insert (out_t, translit); -- add the translit text table.insert (out_t, close_tag); -- and add the appropriate </i> or </span> if '' == title_text then -- when there is no need for a tool-tip return table.concat (out_t); -- make a string and done else return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg ('no text', args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg ('text has malformed markup', args, template); end local style = args.italic; if ('unset' ~= style) and ('invert' ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg ('text has italic markup', args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ render mainenance messages and categories ]] local function render_maint(nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ looks for a poem strip marker in text; returns true when found; false else auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of true indicating that some other value has been assigned to |proto= ]] local function validate_proto (proto_param) if 'yes' == proto_param then return true; elseif 'no' == proto_param then return false; elseif is_set (proto_param) then return nil, true; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- common function to return language name from the data set according to IETF tag returns language name if found in data tables; nil else ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to iana active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the iana deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'})); end return name; -- name from data tables or nil end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg ('conflicting: {{{1}}} and |code=', args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg ('conflicting: {{{2}}} and |text=', args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg ( msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function lang (frame) local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return _lang (args); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- stand-alone function to create literal translation of main text Also used by {{lang-x2}} ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> html tag if 'no' == args_t.link then table.insert (translation_t, '<abbr title="literal translation">lit.</abbr>'); -- unlinked form else table.insert (translation_t, make_wikilink ('Literal translation', 'lit.')); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> html tag end table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use html entities to avoid wiki markup confusion return table.concat (translation_t); -- make a big string and done end --[[--------------------------< L A N G _ X X >---------------------------------------------------------------- For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-xx}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args) local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local translit_title; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang-xx'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if args[1] and args.text then return make_error_msg ('conflicting: {{{1}}} and |text=', args, template); else args.text = args[1] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly if args[2] and args.translit then return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template); else args.translit = args[2] or args.translit -- prefer args.translit end if args[3] and (args.translation or args.lit) then return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template); elseif args.translation and args.lit then return make_error_msg ('conflicting: |lit= and |translation=', args, template); else args.translation = args[3] or args.translation or args.lit; -- prefer args.translation end if args.links and args.link then return make_error_msg ('conflicting: |links= and |link=', args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if 'no' == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if 'invert' == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object if translit_title.exists and ('no' ~= args.link) then table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to else table.insert (out, 'romanized:'); -- else plain text end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script']) if is_set (translit) then table.insert (out, translit); else return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template); end end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- common function to get args table from {{lang-??}} templates returns table of args ]] local function lang_xx_args_get (frame) local args = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if 1 == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame); initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point ffrom another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame); initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the ietf language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = 'yes' == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the ietf language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message end else msg = 'missing language name' -- language name not provided, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ T R A N S L >---------------------------------------------------------------- Module entry point from another module ]] local function _transl (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transl|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transl'); end else if is_set (args[2]) then -- [2] set when {{transl|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg ('no text', args, 'Transl'); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg ('missing language / script code', args, 'Transl'); end end end if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transl'); -- invalid language / script code end else return make_error_msg ('missing language / script code', args, 'Transl'); -- missing language / script code so quit end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, 'Transl'); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transl'); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic); end --[[--------------------------< T R A N S L >------------------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function transl (frame) return _transl (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = 'yes' == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}} ]] local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, lang = lang, -- entry point for {{lang}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns ietf tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates transl = transl, -- entry point for {{transl}} _category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules _lang = _lang, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _transl = _transl, _translation_make = translation_make, }; 9d4ce44c7c49db6155692a2f959ea14ce5f8df40 Template:Infobox Organization 10 887 5713 2023-06-03T19:43:47Z wikipedia>Pttn 0 Protected "[[Template:Infobox Organization]]": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = {{{type|}}} |image = {{{image|}}} |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{universe|}}}|Universe}} |value4 = {{{universe|}}} |key5 = {{#if:{{{inspiration|}}}|Inspired by}} |value5 = {{{inspiration|}}} |key6 = {{#if:{{{founded|}}}|Founded}} |value6 = {{{founded|}}} |key7 = {{#if:{{{founder|}}}|Founder(s)}} |value7 = {{{founder|}}} |key8 = {{#if:{{{keypeople|}}}|Key People}} |value8 = {{{keypeople|}}} |key9 = {{#if:{{{defunct|}}}|Defunct}} |value9 = {{{defunct|}}} |key10 = {{#if:{{{fate|}}}|Fate}} |value10 = {{{fate|}}} |footnote = [[Template:Infobox Organization|How to make your own Organization Infobox]] }}</onlyinclude></includeonly> Infobox for organizations or groups, which may be real. == General Template == If not applicable, then simply completely remove a line (don't keep it with something like N/A). The image can be a logo, or a picture of something like the headquarters or key people. If both are available, the convention, which is optional to follow for Original Content, is to put the latter here, and the logo somewhere else in the article. <nowiki>{{Infobox Organization |type = Type of Organization (company, faction...) |image = Image for your Organization.png |fullname = Full Organization name |alias = Aliases (nicknames,...) |universe = For fictional Organizations, which Universe it belongs to |inspiration = From which real or fictional organization this one is inspired by, if not purely original and not real |founded = When the Organization's was founded. If it is a date, its format should be one of "YYYY", "YYYY-MM", or "YYYY-MM-DD". Or it could be something like "xx years before the story's events". |founder = Who founded the Organization |keypeople = Important people of the Organization (like a Ceo, etc.) |defunct = If applicable, when the Organization's was disbanded, bought by another, etc. If it is a date, the format should be one of "YYYY", "YYYY-MM", or "YYYY-MM-DD". Or it could be something like "xx years before the story's event". |fate = You can add details about what happened if the organization is defunct. }}</nowiki> == Examples == {|style="width: 100%; background: none;" |{{Infobox Organization |type = Company |fullname = Microsoft Corporation |alias = Microsoft, MS, M$ |founded = 1975-04-04 |founder = Bill Gates, Paul Allen |keypeople = Satya Nadella (current CEO) }} <nowiki>{{Infobox Organization |type = Company |fullname = Microsoft Corporation |alias = Microsoft, MS, M$ |founded = 1975-04-04 |founder = Bill Gates, Paul Allen |keypeople = Satya Nadella (current CEO) }}</nowiki> |- |{{Infobox Organization |type = Faction |fullname = The Infinite Loop |universe = [[The Mainframe]] |founded = 1993 |founder = Apple I-tan |keypeople = macOS Ventura-kun (leader), Apple Inc. (owner) }} <nowiki>{{Infobox Organization |type = Faction |fullname = The Infinite Loop |universe = [[The Mainframe]] |founded = 1993 |founder = Apple I-tan |keypeople = macOS Ventura-kun (leader), Apple Inc. (owner) }}</nowiki> |- |{{Infobox Organization |type = Ensemble |fullname = Logiciel Technologies |universe = [[UNIVER.SYS]] |inspiration = Microsoft Corporation }} <nowiki>{{Infobox Organization |type = Ensemble |fullname = Logiciel Technologies |universe = [[UNIVER.SYS]] |inspiration = Microsoft Corporation }}</nowiki> |} 5c8f92b06bf3e48e7d24fad90cca3d324cbcf156 Template:Infobox Universe 10 886 5711 2023-06-03T20:54:48Z wikipedia>Pttn 0 InfoBox for Universes wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = [[:Category:Universes|Universe]] |image = {{{logo|}}} |key2 = Name |value2 = {{{name}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{author|}}}|Author(s)}} |value4 = {{{author|}}} |key5 = {{#if:{{{activity|}}}|Activity}} |value5 = {{{activity|}}} |key6 = {{#if:{{{published|}}}|Published}} |value6 = {{{published|}}} |key7 = {{#if:{{{status|}}}|Status}} |value7 = {{{status|}}} |footnote = [[Template:Infobox Universe|How to make your own Universe Infobox]] }}</onlyinclude></includeonly> Infobox for OS-tan Universes. == General Template == Everything is optional except the name. <nowiki>{{Infobox Universe |logo = Universe Logo.png |name = Universe name |alias = Aliases (shortened form,...) |author = Who worked on the Universe |activity = Period during which the Universe was worked on (the time before publication can be counted) |published = When the work was first published or available to the public |status = The status of the work }}</nowiki> == Examples == {|style="width: 100%; background: none;" |{{Infobox Universe |logo = Mona's Museum Logo.png |name = Mona's Museum |author = [[User:Pttn|Pttn]] |activity = 2023-present |published = 2023 |status = Very early work in progress }} <nowiki>{{Infobox Universe |logo = Mona's Museum Logo.png |name = Mona's Museum |author = [[User:Pttn|Pttn]] |activity = 2023-present |published = 2023 |status = Very early work in progress }}</nowiki> |- |{{Infobox Universe |logo = UNIVER.SYS Logo.png |name = UNIVER.SYS |author = [[User:SpacePuffer|SpacePuffer]] |activity = 2019-present |published = 2023-04-04 (on the Wiki) }} <nowiki>{{Infobox Universe |logo = UNIVER.SYS Logo.png |name = UNIVER.SYS |author = [[User:SpacePuffer|SpacePuffer]] |activity = 2019-present |published = 2023-04-04 (on the Wiki) }}</nowiki> |- |{{Infobox Universe |logo = WNRUniverse Logo .png |name = Windows Never Released Universe |alias = WNR Universe, Windows Never Released |author = [[User:VistaIroha|VistaIroha]] |published = 2023-02-19 }} <nowiki>{{Infobox Universe |logo = WNRUniverse Logo .png |name = Windows Never Released Universe |alias = WNR Universe, Windows Never Released |author = [[User:VistaIroha|VistaIroha]] |published = 2023-02-19 }}</nowiki> |} a2b6a8bc9f46f293755c603ba21436ffcfc57f54 Module:Authority control/config 828 725 1439 2023-06-05T12:55:43Z wikipedia>MSGJ 0 remove europeana, many links do not work Scribunto text/plain require('strict') local p = {} p.auxiliary = 'Module:Authority control/auxiliary' p.i18n = { aclink = '[[Help:Authority control|Authority control]]', ACmodule = 'Module:Authority control', addtowd = 'Add values to Wikidata', attentioncat = 'Pages with authority control identifiers needing attention', All_articles = 'All articles', allfaultycat = 'All articles with faulty authority control information', Appears_as = 'Appears as', -- used on documentation table to show example Articles = 'Articles', Articles_with = 'Articles with', autocollapse = 'autocollapse', -- Navbox state parameter category = 'Category', Code = 'Code', collapsed = 'collapsed', -- Navbox state parameter connecttowd = 'Please connect this article to a Wikidata item.', Description = 'Description', errortemplate = 'Error', -- e.g. [[Template:Error]], expanded = 'expanded', -- Navbox state parameter faultcat = 'Articles with faulty authority control information', Faults = 'Faults', faulty = 'faulty', Faulty = 'Faulty', identifier = 'identifier', Identifier = 'Identifier', identifiers = 'identifiers', Identifiers = 'Identifiers', isnotvalid = 'is not valid', linktemplate = 'Wikidata property link', -- refers to [[Template:Wikidata property link]] localparams = 'Local parameters are deprecated.', maincat = 'Articles with authority control information', movetowd = 'Please move values to Wikidata.', pages = 'pages', pageswithparams = 'Pages using authority control with parameters', -- name of category for tracking uses with parameters previewwarning = 'Warning: Local parameters are deprecated. Please move any identifiers to Wikidata.', -- preview message when local parameters are used qidcode = 'Please use the <code>|qid=</code> parameter to specify the Wikidata item.', sandbox = 'sandbox', Section = 'Section', suppressedcat = 'Articles with suppressed authority control identifiers', testcases = 'testcases', The = 'The', Topic = 'Topic', Totals = 'Totals', Tracking_category = 'Tracking category', warning = 'Warning', warningicon = '345-409 Ambox warning centered.svg', -- icon used for faulty ids WDproperty = 'Wikidata property', } p.config = { { 'AAG', property = 3372, section = 5, link = 'https://www.aucklandartgallery.com/explore-art-and-ideas/artist/$1/', label = 'Auckland', pattern = '%d+', }, { 'ACM-DL', property = 864, section = 4, pattern = '%d%d%d%d%d%d%d%d%d%d%d', link = 'https://dl.acm.org/profile/$1', label = 'Association for Computing Machinery', }, { 'ADB', property = 1907, section = 6, patterns = {'[a-z][-a-z]+-[1-3]%d%d?%d?%d?', '[a-z][-a-z]+-[1-9]%d?%d?%d?'}, link = 'http://adb.anu.edu.au/biography/$1', label = 'Australia', }, { 'admiralty', property = 3562, patterns = {'[A-Q]%d%d%d%d', '[A-Q]%d%d%d%d%.%d+'}, section = 3, prefix = '[[Admiralty (identifier)|Admiralty]]' }, { 'AGSA', property = 6804, section = 5, pattern = '[1-9]%d*', link = 'https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/$1/', label = 'South Australia', }, { 'ARLHS', property = 2980, section = 3, pattern = '[A-Z][A-Z][A-Z]%d%d%d%d?[A-Z]?', link = 'http://wlol.arlhs.com/lighthouse/$1.html', label = 'ARLHS', }, { 'autores.uy', property = 2558, section = 6, pattern = '[1-9]%d?%d?%d?%d?', link = 'https://autores.uy/autor/$1', label = 'Uruguay', remark = "autores.uy is an author's database, that focus on [[Uruguay]]an authors. It was created and maintained by the Uruguayan chapter of Creative Commons. It also provides access to digitized works of the authors in public domain." }, { 'AWR', property = 4186, section = 6, patterns = {'[A-Z][A-Z][A-Z]%d%d%d%d[a-z]', '[A-Z][A-Z]%d%d%d%d%d[a-z]'}, link = 'http://www.womenaustralia.info/biogs/$1.htm', label = 'Australian Women\'s Register', }, { 'BGCI', property = 5818, section = 3, link = 'https://www.bgci.org/garden.php?id=$1', label = 'BGCI garden', pattern = '%d+' }, { 'BIBSYS', property = 1015, section = 2, patterns = {'[1-9]%d?%d?%d?%d?%d?%d?%d?%d?', '[1-9]%d%d%d%d%d%d%d%d%d%d%d%d'}, link = 'https://authority.bibsys.no/authority/rest/authorities/html/$1', label = 'Norway', remark = 'BIBSYS is a supplier of library and information systems for all Norwegian university Libraries, the National Library of Norway, college libraries, and a number of research libraries and institutions.' }, { 'Bildindex', property = 2092, section = 7, pattern = '%d+', link = 'https://www.bildindex.de/document/obj$1', label = 'Bildindex', }, { 'BMLO', property = 865, section = 6, link = 'https://bmlo.de/$1', label = 'BMLO', pattern = '[a-z][0-9][0-9][0-9][0-9]' }, { 'BNC', property = 1890, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number=$1', label = 'Chile', }, { 'BNE', property = 950, section = 2, patterns = {'[XF][XF]%d%d%d%d%d?%d?%d?', 'a%d%d%d%d%d?%d?%d?', 'bi[mcsv][aoei]%d%d%d%d%d%d%d%d%d%d', 'Mi[sm][eoa]%d%d%d%d%d%d%d%d%d%d'}, link = 'http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id=$1', label = 'Spain', remark = "National Library of Spain (BNE: ''Biblioteca Nacional de España'') is a major public library, the largest in Spain." }, { 'BNF', property = 268, section = 2, pattern = '%d%d%d%d%d%d%d%d[0-9bcdfghjkmnpqrstvwxz]', link = 'https://catalogue.bnf.fr/ark:/12148/cb$1', label = 'France', remark = 'Authority data of people listed in the general catalogue of the National Library of France' }, { 'BNFdata', property = 268, section = 2, pattern = '%d%d%d%d%d%d%d%d[0-9bcdfghjkmnpqrstvwxz]', link = 'https://data.bnf.fr/ark:/12148/cb$1', label = 'BnF data' }, { 'BNMM', property = 3788, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'https://catalogo.bn.gov.ar/F/?func=direct&local_base=BNA10&doc_number=$1', label = 'Argentina', }, { 'Botanist', property = 428, section = 4, valid = 'botanistV', link = 'https://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation=$1', label = 'International Plant Names Index', remark = 'Author citation (botany): standard form (official abbreviation) of a personal name for use in an author citation (only for names of algae, fungi and plants). Links to page at [[International Plant Names Index]] (IPNI).' }, { 'BPN', property = 651, section = 6, patterns = {'%d%d%d%d%d%d%d%d', '0?%d%d%d%d%d%d%d', '0?0?%d%d%d%d%d%d'}, link = 'http://www.biografischportaal.nl/en/persoon/$1', label = 'Netherlands', remark = 'Dutch project with material for 40,000 digitized biographies, including former colonies of the Netherlands.' }, { 'BRAHMS artist', property = 5226, section = 5, link = 'http://brahms.ircam.fr/$1', label = 'BRAHMS', pattern = '[a-z%-\\]+', remark = 'Identifier of an artist in the B.R.A.H.M.S. (Base Relationnelle d\'Articles Hypertextes sur la Musique du 20e Siècle database), by the IRCAM' }, { 'BRAHMS work', property = 5302, section = 7, link = 'https://brahms.ircam.fr/works/work/$1/', label = 'BRAHMS', pattern = '[1-9]%d*', remark = "Identifier for a musical work in the B.R.A.H.M.S. (Base Relationnelle d\'Articles Hypertextes sur la Musique du 20e Siècle database) database, by the IRCAM" }, { 'CANTICN', property = 9984, section = 2, pattern = '981[0-1]%d%d%d%d%d%d%d%d%d06706', link = 'https://cantic.bnc.cat/registre/$1', label = 'Catalonia', }, { 'CCG', property = 3920, section = 3, customlink = 'ccg', remark = 'Identifier from one of 4 volumes of List of Lights, Buoys and Fog Signals issued by the Canadian Coast Guard.' }, { 'CINII', property = 271, section = 4, pattern = 'D[AB]%d%d%d%d%d%d%d[%dX]', link = 'https://ci.nii.ac.jp/author/$1?l=en', label = 'CiNii', remark = 'CiNii is a bibliographic database service for material in Japanese academic libraries. It is maintained by the [[National Institute of Informatics]].' }, { 'CWGC', property = 1908, section = 6, pattern = '[1-9]%d*', link = 'https://www.cwgc.org/find-war-dead/casualty/$1/', label = 'Commonwealth War Graves Commission', }, { 'DAAO', property = 1707, section = 5, pattern = '[a-z%-]+%d*', link = 'https://www.daao.org.au/bio/$1', label = 'Australian Artists', }, { 'Danish List of Lights and Fog signals', property = 4038, section = 3, pattern = '[1-9]%d*[A-Za-z]?', prefix = 'Denmark', }, { 'DBI', property = 1986, section = 6, link = 'https://www.treccani.it/enciclopedia/$1_(Dizionario-Biografico)', label = 'Italian People', }, { 'DBLP', property = 2456, section = 4, patterns = {'%d%d%d?%/%d+-?[%d]*[%a]*-?[%d]*', '[%a]+%/[%w]*-?[%d]*'}, link = 'https://dblp.org/pid/$1', label = 'DBLP', }, { 'Deutsche Synchronkartei', property = 11646, section = 6, label = 'Deutsche Synchronkartei', link = 'https://www.synchronkartei.de/person/$1', remark = 'Online database of voice actors in film and television productions', pattern = string.rep('[0-9a-zA-Z_-]',9) }, { 'DIB', property = 6829, section = 6, pattern = '0[01]%d%d%d%d%.?[A-D]?', link = 'https://doi.org/10.3318/dib.$1.v1', label = 'Ireland', }, { 'DSI', property = 2349, section = 5, pattern = '[1-9]%d*', link = 'http://www.uni-stuttgart.de/hi/gnt/dsi2/index.php?table_name=dsi&function=details&where_field=id&where_value=$1', label = 'Scientific illustrators', }, { 'DTBIO', property = 7902, section = 6, pattern = '1[0-9]%d%d%d%d%d%d%d?[0-9X]', link = 'https://www.deutsche-biographie.de/pnd$1.html?language=en', label = 'Deutsche Biographie', }, { 'EBIDAT', property = 9725, section = 3, label = 'EBIDAT', link = 'https://www.ebidat.de/cgi-bin/ebidat.pl?id=$1', remark = 'Identifier for an entry in the castles inventory database EBIDAT', pattern = '[1-9]%d?%d?%d?' }, { 'Emmy', property = 8381, section = 5, link = 'https://www.emmys.com/bios/$1', label = 'Emmy Awards' }, { 'EMU', property = 4613, section = 7, pattern = '%d%d?%d?%d?%d?%d?', link = 'http://esu.com.ua/search_articles.php?id=$1', label = 'Encyclopedia of Modern Ukraine', }, { 'EUTA', property = 4535, section = 3, label = 'EUTA theatre', link = 'http://www.theatre-architecture.eu/db/?theatreId=$1', pattern = '[1-9]%d*' }, { 'EUTA person', property = 4534, section = 6, label = 'EUTA', link = 'http://www.theatre-architecture.eu/db.html?personId=$1', pattern = '[1-9]%d?%d?%d?%d?%d?%d?' }, { 'FAST', property = 2163, section = 1, pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?', link = 'http://id.worldcat.org/fast/$1/', label = 'FAST', }, { 'Finnish List of Lights', property = 4143, section = 3, pattern = '%d+', prefix = 'Finland', }, { 'FNZA', property = 6792, section = 5, pattern = '[1-9]%d*', link = 'https://findnzartists.org.nz/artist/$1/', label = 'New Zealand Artists', }, { 'GND', property = 227, section = 2, patterns = {'1[012]?%d%d%d%d%d%d%d[0-9X]', '[47]%d%d%d%d%d%d%-%d', '[1-9]%d?%d?%d?%d?%d?%d?%d?%-[0-9X]', '3%d%d%d%d%d%d%d[0-9X]'}, link = 'https://d-nb.info/gnd/$1', label = 'Germany', remark = 'Authority data on people, corporations and subjects from the [[German National Library]] (DNB)' }, { 'Google Scholar', property = 1960, section = 4, pattern = '[%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u]', link = 'https://scholar.google.com/citations?user=$1', label = 'Google Scholar', }, { 'Grammy', property = 7303, section = 5, pattern = '%w[%w-]+%/%d+', link = 'https://www.grammy.com/grammys/artists/$1', label = 'Grammy Awards', }, { 'GVP', property = 1886, section = 3, link = 'https://volcano.si.edu/volcano.cfm?vn=$1', label = 'Global Volcanism Program', pattern = '%d%d%d%d%d%d' }, { 'HDS', property = 902, section = 7, pattern = '%d%d%d%d%d%d', label = 'Historical Dictionary of Switzerland', link = 'https://hls-dhs-dss.ch/fr/articles/$1', remark = 'Historical Dictionary of Switzerland is an encyclopedia on the history of Switzerland.' }, { 'IAAF', property = 1146, section = 6, pattern = '%d+', link = 'https://www.iaaf.org/athletes/_/$1', label = 'World Athletics', remark = 'The IAAF athlete database lists information about [[sport of athletics]] competitors.' }, { 'ICCU', property = 396, section = 2, pattern = '%u%u[%u0-3]V%d%d%d%d%d%d', link = 'https://opac.sbn.it/nome/$1', label = 'Italy', remark = 'Central Institute for the Union Catalogue (ICCU: {{lang|it|Istituto Centrale per il Catalogo Unico}}) is an Italian government agency created to build a single catalog of all the libraries in the nation. It manages National Library Service ({{lang|it|Servizio bibliotecario nazionale}}).' }, { 'ICIA', property = 1736, section = 5, pattern = '%d+', link = 'https://www.imj.org.il/artcenter/newsite/en/?artist=$1', label = 'ICIA (Israel)', }, { 'IEU', property = 9070, section = 7, pattern = '[A-Z]\\[A-Z]\\%w+', link = 'http://www.encyclopediaofukraine.com/display.asp?linkpath=pages\\$1', label = 'Internet Encyclopedia of Ukraine', }, { 'ISIL', property = 791, section = 6, customlink = 'ISILlink', remark = 'Libraries, museums and archives, decentralized national databases.' }, { 'ISNI', property = 213, section = 1, label = 'ISNI', valid = 'validateIsni', link = 'https://isni.org/isni/$1', remark = 'ISNI is a method for uniquely identifying the public identities of contributors to media content such as books, TV programmes, and newspaper articles. Please take care not to confuse ISNI and ORCID identifiers.' }, { 'J9U', property = 8189, section = 2, pattern = '9870[0-1]%d%d%d%d%d%d%d%d05171', link = 'http://uli.nli.org.il/F/?func=find-b&local_base=NLX10&find_code=UID&request=$1', label = 'Israel', }, { 'Joconde', property = 347, section = 7, pattern = ''..string.rep('[%-0-9A-Za-z]', 11)..'', link = 'https://www.pop.culture.gouv.fr/notice/joconde/$1', label = 'Joconde', }, { 'KANTO', property = 8980, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'https://urn.fi/URN:NBN:fi:au:finaf:$1', label = 'Finland', }, { 'KBR', property = 11249, section = 2, pattern = '%d%d%d%d%d%d%d%d', link = 'https://opac.kbr.be/LIBRARY/doc/AUTHORITY/$1', label = 'Belgium', }, { 'KULTURNAV', property = 1248, section = 5, pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'http://kulturnav.org/$1', label = 'KulturNav', remark = 'KulturNav is a Norwegian cloud-based software service, allowing users to create, manage and distribute name authorities and terminology, focusing on the needs of museums and other cultural heritage institutions. The software is developed by KulturIT ANS and the development project is funded by the [[Arts Council Norway]].' }, { 'LCCN', property = 244, section = 2, pattern = '%l%l?%d%d%d%d%d%d%d%d%d?%d?', link = 'https://id.loc.gov/authorities/$1', label = 'United States', remark = 'See [[Wikipedia:Authority control#LCCN]] for formatting instructions' }, { 'Libris', property = 5587, section = 2, pattern = '%w+', link = 'https://libris.kb.se/$1', label = 'Sweden' }, { 'LIR', property = 886, section = 7, pattern = '%d+', link = 'http://www.e-lir.ch/e-LIR___Lexicon.$1.450.0.html', label = 'Lexicon Istoric Retic', remark = '{{lang|rm|Lexicon Istoric Retic}} (LIR) is a two volume version with a selection of articles published in Romansh.' }, { 'LNB', property = 1368, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'https://kopkatalogs.lv/F?func=direct&local_base=lnc10&doc_number=$1&P_CON_LNG=ENG', label = 'Latvia', }, { 'Marina Militare', property = 3863, section = 3, pattern = '[1-9]%d*', link = 'http://www.marina.difesa.it/cosa-facciamo/per-la-difesa-sicurezza/fari/Pagine/$1.aspx', label = 'Italy', }, { 'MarineTraffic', property = 3601, section = 3, pattern = '%d%d%d%d%d%d%d%d%d%d', link = 'https://www.marinetraffic.com/en/ais/details/lights/$1', label = 'MarineTraffic', }, { 'MATHSN', property = 4955, section = 4, pattern = '[1-9]%d%d%d%d%d?%d?', link = 'https://mathscinet.ams.org/mathscinet/MRAuthorID/$1', label = 'MathSciNet', }, { 'MBA', property = 434, section = 5, category = 'MusicBrainz', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/artist/$1', label = 'MusicBrainz', remark = 'MusicBrainz is an open music encyclopedia that collects music metadata and makes it available to the public.' }, { 'MBAREA', property = 982, section = 3, category = 'MusicBrainz area', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/area/$1', label = 'MusicBrainz area', }, { 'MBI', property = 1330, section = 7, category = 'MusicBrainz instrument', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/instrument/$1', label = 'MusicBrainz instrument', }, { 'MBL', property = 966, section = 7, category = 'MusicBrainz label', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', label = 'MusicBrainz label', link = 'https://musicbrainz.org/label/$1', }, { 'MBP', property = 1004, section = 3, category = 'MusicBrainz place', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/place/$1', label = 'MusicBrainz place', }, { 'MBRG', property = 436, section = 7, category = 'MusicBrainz release group', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/release-group/$1', label = 'MusicBrainz release group', }, { 'MBS', property = 1407, section = 7, category = 'MusicBrainz series', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/series/$1', label = 'MusicBrainz series', }, { 'MBW', property = 435, section = 7, category = 'MusicBrainz work', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/work/$1', label = 'MusicBrainz work', }, { 'Mérimée', property = 380, section = 3, link = 'https://www.pop.culture.gouv.fr/notice/merimee/$1', label = 'Mérimée', patterns = {'[PEI]A%d[0-9AB]%d%d%d%d%d%d','ACR%d%d%d%d%d%d%d', 'MI%d%d%dB?', 'JAR%d%d%d%d%d%d%d', 'SPR%d%d%d%d%d%d%d'} }, { 'MGP', property = 549, section = 4, pattern = '%d%d?%d?%d?%d?%d?', link = 'https://www.mathgenealogy.org/id.php?id=$1', label = 'Mathematics Genealogy Project', remark = 'Mathematics Genealogy Project is a web-based database for the academic genealogy of mathematicians.' }, { 'MoMA', property = 2174, section = 5, link = 'https://www.moma.org/artists/$1', label = 'Museum of Modern Art', pattern = '%d+' }, { 'Musée d\'Orsay', property = 2268, section = 5, link = 'https://www.musee-orsay.fr/en/ressources/repertoire-artistes-personnalites/$1', label = 'Musée d\'Orsay', pattern = '[1-9]%d?%d?%d?%d?%d?' }, { 'NARA', property = 1225, section = 7, pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?', link = 'https://catalog.archives.gov/id/$1', label = 'NARA', remark = 'National Archives and Records Administration (NARA) is an independent agency of the United States government charged with preserving and documenting government and historical records.' }, { 'National Gallery of Canada', property = 5368, section = 5, label = 'National Gallery of Canada', link = 'https://www.gallery.ca/collection/artist/$1', pattern = '%C+' }, { 'NCL', property = 1048, section = 2, pattern = '%d+', link = 'http://aleweb.ncl.edu.tw/F/?func=accref&acc_sequence=$1&CON_LNG=ENG', label = 'Taiwan', remark = 'National Central Library is the national library of Taiwan, Republic of China.' }, { 'NDL', property = 349, section = 2, link = 'https://id.ndl.go.jp/auth/ndlna/$1', patterns = {'a1%d?%d%d%d%d%d%d%d%d', 's?%d?%d%d%d%d%d%d%d%d'}, label = 'Japan', remark = 'Authority data listed in the catalog of the national library of Japan. Search also available via [http://viaf.org/ VIAF].' }, { 'NGA', property = 3563, section = 3, pattern = '11[0-6]%-%d+%.?%d*', link = 'https://wikidata-externalid-url.toolforge.org/?url=https%3A%2F%2Fmsi.nga.mil%2FqueryResults%3Fpublications%2Fngalol%2Flights-buoys%3Fvolume%3D%251%26featureNumber%3D%252%26includeRemovals%3Dfalse%26output%3Dhtml&exp=(%5Cd%7B3%7D)-(.*)&id=$1', label = 'NGA', }, { 'NGV', property = 2041, section = 5, pattern = '%d+', link = 'https://www.ngv.vic.gov.au/explore/collection/artist/$1/', label = 'Victoria', }, { 'NKC', property = 691, section = 2, pattern = '[a-z][a-z][a-z]?[a-z]?%d%d%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?', link = 'https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica=$1&CON_LNG=ENG', label = 'Czech Republic', remark = 'National Library of the Czech Republic ({{lang|cs|Národní knihovna České republiky}}) is the central library of the Czech Republic.' }, { 'NLA', property = 409, section = 2, pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?', link = 'https://nla.gov.au/anbd.aut-an$1', label = 'Australia', remark = "NLA Trove's People and Organisation view allows the discovery of biographical and other contextual information about people and organisations. Search also available via [http://viaf.org/ VIAF]." }, { 'NLG', property = 3348, section = 2, pattern = '[1-9]%d*', link = 'https://data.nlg.gr/resource/authority/record$1', label = 'Greece', }, { 'NLK', property = 5034, section = 2, link = 'https://lod.nl.go.kr/resource/$1', label = 'Korea', patterns = {'%u%u%u%d%d%d%d%a?%d%d%d%d%d?%d?', 'CNTS%-%d%d%d%d%d%d%d%d%d%d%d'} }, { 'NLR', property = 1003, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'http://aleph.bibnat.ro:8991/F/?func=direct&local_base=NLR10&doc_number=$1', label = 'Romania', }, { 'Norwegian List of Lights', property = 4055, section = 3, pattern = '%d+', prefix = 'Norway', }, { 'NSK', property = 1375, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'http://katalog.nsk.hr/F/?func=direct&doc_number=$1&local_base=nsk10', label = 'Croatia', }, { 'NTA', property = 1006, section = 2, pattern = '%d%d%d%d%d%d%d%d[%dX]', link = 'http://data.bibliotheken.nl/id/thes/p$1', label = 'Netherlands', }, { 'Online List of Lights', property = 3223, section = 3, pattern = '[1-9]%d*', label = 'OLL', link = 'http://listoflights.org/leuchtfeuer/detail?id=$1.aspx' }, { 'ORCID', property = 496, section = 4, label = 'ORCID', valid = 'orcidV', link = 'https://orcid.org/$1', remark = 'Authority data on researchers, academics, etc. The ID range is a subset of the [[ISNI]] range. For free text links (for example when mentioning a person on page which is not about them), it is also possible to use {{tl|ORCID}}. Authors—including Wikipedia editors—may obtain an ORCID by signing up at [https://orcid.org/register orcid.org/register]. Please take care not to confuse ORCID and ISNI identifiers.' }, { 'PIC', property = 2750, section = 5, pattern = '[1-9]%d*', link = 'https://pic.nypl.org/constituents/$1', label = 'Photographers\' Identities', remark = "PIC is a photographer's database. It is maintained by the New York Public Library." }, { 'Pleiades', property = 1584, section = 3, label = 'Pleiades', link = 'https://pleiades.stoa.org/places/$1', pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?', remark = "Pleiades is a joint project of the Institute for the Study of the Ancient World at [[New York University]] and the Ancient World Mapping Center at the [[University of North Carolina]] at Chapel Hill." }, { 'PLWABN', property = 7293, section = 2, pattern = '981%d%d%d%d%d%d%d%d05606*', link = 'http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=1&NU=1&IM=4&WI=$1', label = 'Poland', }, { 'PortugalA', property = 1005, section = 2, pattern = '[1-9]%d*', link = 'http://id.bnportugal.gov.pt/aut/catbnp/$1', label = 'Portugal', }, { 'Portuguese lighthouse', property = 4423, section = 3, patterns = {'[1-9]%d*', '[1-9]%d*.%d+'}, prefix = 'Portugal', }, { 'NLP', property = 1695, section = 2, patterns = {'9810%d+', 'A%d%d%d%d%d%d%d[%dX]'}, link = 'https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id=$1', label = 'Poland', suppressedbyproperty = {7293} }, { 'Prado', property = 5321, section = 5, link = 'https://www.museodelprado.es/en/the-collection/artist/wd/$1', label = 'Prado', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x' }, { 'Publons', property = 3829, section = 4, pattern = '%d+', link = 'https://publons.com/author/$1/', label = 'Publons' }, { 'RID', property = 1053, section = 4, patterns = {'[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-19%d%d', '[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-20%d%d'}, link = 'https://www.researcherid.com/rid/$1', label = 'ResearcherID', remark = 'An identifying system for scientific authors. The system was introduced in January 2008 by [[Thomson Reuters]]. The combined use of the [[digital object identifier]] with the ResearcherID allows for a unique association of authors and scientific articles.' }, { 'RISM', property = 5504, section = 7, label = 'RISM', patterns = {'pe[1-9]%d*', 'ks[1-9]%d*', '[1-9]%d*'}, link = 'https://opac.rism.info/search?id=$1', }, { 'RKDartists', property = 650, section = 5, pattern = '[1-9]%d?%d?%d?%d?%d?', link = 'https://rkd.nl/en/explore/artists/$1', label = 'RKD Artists', remark = 'RKDartists is an online database using a controlled vocabulary currently containing around 200,000+ names and other information about artists. Names in RKDartists may include given names, pseudonyms, variant spellings, names in multiple languages, and names that have changed over time (e.g., married names).' }, { 'RKDID', property = 350, section = 7, pattern = '[1-9]%d?%d?%d?%d?%d?', link = 'https://rkd.nl/nl/explore/images/$1', label = 'RKD ID', }, { 'RSL', property = 947, section = 2, pattern = '%d%d?%d?%d?%d?%d?%d?%d?%d?', link = 'http://aleph.rsl.ru/F?func=find-b&find_code=SYS&adjacent=Y&local_base=RSL11&request=$1&CON_LNG=ENG', label = 'Russia', remark = 'Russian State Library ({{lang|ru|Российская государственная библиотека}}) is the national library of Russia.' }, { 'Scopus', property = 1153, section = 4, pattern = '[1-9]%d%d%d%d%d%d%d%d%d%d?', link = 'https://www.scopus.com/authid/detail.uri?authorId=$1', label = 'Scopus', remark = 'SciVerse Scopus is a bibliographic database containing abstracts and citations for academic journal articles. It covers nearly 19,500 titles from over 5,000 international publishers, of which 16,500 are peer-reviewed journals in the scientific, technical, medical, and social sciences (including arts and humanities).' }, { 'SELIBR', property = 906, section = 2, pattern = '[1-9]%d%d%d%d%d?', link = 'https://libris.kb.se/auth/$1', label = 'Sweden', remark = 'Authority data from the [[National Library of Sweden]]', suppressedbyproperty = {5587} }, { 'SIKART', property = 781, section = 5, pattern = '%d%d%d%d%d%d%d%d?%d?', link = 'http://www.sikart.ch/KuenstlerInnen.aspx?id=$1&lng=en', label = 'SIKART', remark = 'SIKART is a biographical dictionary and a database on visual art in Switzerland and Liechtenstein. It is published online by the Swiss Institute for Art Research (SIAR).' }, { 'SNAC-ID', property = 3430, section = 7, pattern = '%d*[A-Za-z][0-9A-Za-z]*', link = 'https://snaccooperative.org/ark:/99166/$1', label = 'SNAC', }, { 'Städel', property = 4581, section = 5, label = 'Städel', link = 'https://sammlung.staedelmuseum.de/en/person/$1', pattern = '%C+' }, { 'StadiumDB', property = 5288, section = 3, label = 'StadiumDB', link = 'http://stadiumdb.com/stadiums/$1', pattern = '%l%l%l/[_%w]+' }, { 'Structurae structure', property = 454, section = 3, pattern = '[12]0%d%d%d%d%d%d', label = 'Structurae', link = 'https://structurae.net/structures/$1', }, { 'Structurae person', property = 2418, section = 6, pattern = '10%d%d%d%d%d', label = 'Structurae', link = 'https://structurae.net/persons/$1', }, { 'SUDOC', property = 269, section = 7, label = 'IdRef', pattern = '%d%d%d%d%d%d%d%d[%dxX]', link = 'https://www.idref.fr/$1', remark = 'Authority data of people listed in the general catalogue of the University Documentation System of France. Also available from [http://www.sudoc.abes.fr/xslt//DB=2.1/SET=2/TTL=1/LNG=EN/ English-speaking catalog] (search author, click one book, click author name, take PPN= value of the URL)' }, { 'Sycomore', property = 1045, section = 6, link = 'https://www2.assemblee-nationale.fr/sycomore/fiche/(num_dept)/$1', label = 'Sycomore', pattern = '[1-9]%d?%d?%d?%d?' }, { 'TA98', property = 1323, section = 7, pattern = 'A%d%d%.%d%.%d%d%.%d%d%d[FM]?', link = 'http://tools.wmflabs.org/wikidata-externalid-url/?p=1323&url_prefix=https:%2F%2Fwww.unifr.ch%2Fifaa%2FPublic%2FEntryPage%2FTA98%20Tree%2FEntity%20TA98%20EN%2F&url_suffix=%20Entity%20TA98%20EN.htm&id=$1', label = 'Terminologia Anatomica', }, { 'TDVİA', property = 7314, section = 7, pattern = '[%d%l/-]+', link = 'https://islamansiklopedisi.org.tr/$1', label = 'İslâm Ansiklopedisi', }, { 'TePapa', property = 3544, section = 5, pattern = '%d+', link = 'https://collections.tepapa.govt.nz/agent/$1', label = 'Te Papa (New Zealand)' }, { 'TLS', property = 1362, section = 7, valid = 'tlsV', link = 'http://tls.theaterwissenschaft.ch/wiki/$1', label = 'Theaterlexikon', remark = '{{lang|de|Theaterlexikon der Schweiz}} (TLS) is an encyclopedia about theatre in Switzerland. It was developed by the Institute of Theatre Studies of the [[University of Berne]].' }, { 'Trove', property = 1315, section = 6, label = 'Trove', pattern = '[1-9]%d%d%d%d%d%d?%d?', link = 'https://trove.nla.gov.au/people/$1', }, { 'UKPARL', property = 6213, section = 6, pattern = '[a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d]', link = 'https://id.parliament.uk/$1', label = 'UK Parliament', remark = 'UK parliament member data' }, { 'ULAN', property = 245, section = 5, pattern = '500%d%d%d%d%d%d', link = 'https://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=$1', label = 'ULAN', remark = 'ULAN is an online database using a controlled vocabulary currently containing around 293,000 names and other information about artists. Names in ULAN may include given names, pseudonyms, variant spellings, names in multiple languages, and names that have changed over time (e.g., married names).' }, { 'USCG', property = 3723, section = 3, prefix = '[[USCG (identifier)|USCG]]', customlink = 'uscgLink' }, { 'USCongress', property = 1157, section = 6, pattern = '[A-Z]00[01]%d%d%d', link = 'http://bioguide.congress.gov/scripts/biodisplay.pl?index=$1', label = 'US Congress', remark = 'Biographical Directory of the United States Congress is a biographical dictionary of all present and former members of the United States Congress and its predecessor, the Continental Congress. Also included are Delegates from territories and the District of Columbia and Resident Commissioners from the Philippines and Puerto Rico.' }, { 'VcBA', property = 8034, section = 2, pattern = '49[0-9]%/[1-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?', link = 'https://wikidata-externalid-url.toolforge.org/?p=8034&url_prefix=https://opac.vatlib.it/auth/detail/&id=$1', label = 'Vatican', remark = 'Vatican Library document data' }, { 'VIAF', property = 214, section = 1, label = 'VIAF', patterns = {'[1-9]%d%d?%d?%d?%d?%d?%d?%d?', '[1-9]%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d?%d?%d?'}, link = 'https://viaf.org/viaf/$1', remark = 'International authority data from the Online Computer Library Center (OCLC)' }, { 'Vitaskrá', property = 3993, section = 3, pattern = '[1-9]%d*', prefix = 'Iceland' }, { 'WorldCat Entities', property = 10832, section = 1, link = 'https://id.oclc.org/worldcat/entity/$1', label = 'WorldCat', patterns = {'%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w', '[QP][1-9]%d*'}, remark = 'WorldCat Entities for persons and works, by [[OCLC]]', }, { 'WORLDCATID', property = 7859, section = 1, patterns = {'viaf%-%d+', 'lccn%-n[a-z]?[0-9%-]+', 'n[cps]%-.+'}, link = 'https://www.worldcat.org/identities/$1/', label = 'WorldCat', category = 'WorldCat', suppressedbyproperty = {10832} }, { 'World Waterfall', property = 3326, section = 3, link = 'https://www.worldwaterfalldatabase.com/index.php/waterfall/$1', label = 'World Waterfall', pattern = '%d+' }, { 'ZBMATH', property = 1556, section = 4, patterns = {'%l[%l%-]*','%l[%l%-]*%.%l[%l%-]*','%l[%l%-]*.%d*','%l[%l%-]*%.%l[%l%-]*%.%d*'}, link = 'https://zbmath.org/authors/?q=ai:$1', label = 'zbMATH', } } p.sections = { [1] = {name = 'International', hidelabelwhenalone = true}, [2] = {name = 'National'}, [3] = {name = 'Geographic'}, [4] = {name = 'Academics'}, [5] = {name = 'Artists'}, [6] = {name = 'People'}, [7] = {name = 'Other', hidelabelwhenalone = true} } p.whitelists = { arts = { topic = 2018526, properties = {268, 214, 7859, 3372, 6804, 1907, 4186, 2092, 1908, 1707, 6829, 2349, 6792, 227, 1960, 347, 1248, 244, 1225, 2041, 409, 2750, 650, 350, 781, 3430, 3544, 1315, 245, 1986, 7902, 651, 791, 7303} }, lighthouse = { topic = 39715, properties = {3563, 4055, 3223, 4423, 3723, 3993, 3562, 2980, 4038, 3920, 4143, 3863, 3601} }, ch = { topic = 39, properties = {902, 886, 3065, 781, 1362}, }, cz = {topic = 213, properties = {691}}, cl = {topic = 298, properties = {1890}}, es = {topic = 29, properties = {950, 9984}}, gr = {topic = 41, properties = {3348}}, hr = {topic = 224, properties = {1375}}, il = {topic = 801, properties = {8189, 1736}}, it = {topic = 38, properties = {396, 3863, 1986, 8034}}, ja = {topic = 17, properties = {349, 271}}, kr = {topic = 884, properties = {5034}}, lv = {topic = 211, properties = {1368}}, nl = {topic = 55, properties = {651, 1006, 650, 350}}, pl = {topic = 36, properties = {1695, 7293}}, ro = {topic = 218, properties = {1003}}, ru = {topic = 159, properties = {947}}, sv = {topic = 34, properties = {906, 5587}}, tr = {topic = 43, properties = {7314}}, tw = {topic = 865, properties = {1048}}, uy = {topic = 77, properties = {2558}} } p.auto_additional = { -- defines properties to check when additional=auto 527, -- has part(s) 150, -- contains the administrative territorial entity 355, -- has subsidiary } return p 3d16330392ae8f98e913a645e15b749c50168d90 Template:Infobox 10 885 5709 2023-06-06T00:12:35Z wikipedia>Pttn 0 Remove Compatibility Stuff, thank you all for updating the InfoBoxes! wikitext text/x-wiki <includeonly><onlyinclude><div style="float: right; width: 288px; margin: 0 0 0 1em;"><table style="width: 100%; padding: 0.25em; border: 2px solid #808080; text-align:left;">{{ #if:{{{header0|}}}|<tr style="background: rgba(0, 0, 0, 0.125); font-size: 1.25em; text-align:center;"><th colspan="2">{{{header0}}}</th></tr>}}{{ #if:{{{image|}}}|<tr style="text-align: center;"><td colspan="2">[[File:{{{image}}}|256px]]</td></tr>}}{{ #if:{{{header1|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header1}}}</th></tr>|{{#if:{{{key1|}}}|<tr><th>{{{key1}}}</th><td>{{{value1}}}</td></tr>}}}}{{ #if:{{{header2|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header2}}}</th></tr>|{{#if:{{{key2|}}}|<tr><th>{{{key2}}}</th><td>{{{value2}}}</td></tr>}}}}{{ #if:{{{header3|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header3}}}</th></tr>|{{#if:{{{key3|}}}|<tr><th>{{{key3}}}</th><td>{{{value3}}}</td></tr>}}}}{{ #if:{{{header4|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header4}}}</th></tr>|{{#if:{{{key4|}}}|<tr><th>{{{key4}}}</th><td>{{{value4}}}</td></tr>}}}}{{ #if:{{{header5|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header5}}}</th></tr>|{{#if:{{{key5|}}}|<tr><th>{{{key5}}}</th><td>{{{value5}}}</td></tr>}}}}{{ #if:{{{header6|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header6}}}</th></tr>|{{#if:{{{key6|}}}|<tr><th>{{{key6}}}</th><td>{{{value6}}}</td></tr>}}}}{{ #if:{{{header7|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header7}}}</th></tr>|{{#if:{{{key7|}}}|<tr><th>{{{key7}}}</th><td>{{{value7}}}</td></tr>}}}}{{ #if:{{{header8|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header8}}}</th></tr>|{{#if:{{{key8|}}}|<tr><th>{{{key8}}}</th><td>{{{value8}}}</td></tr>}}}}{{ #if:{{{header9|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header9}}}</th></tr>|{{#if:{{{key9|}}}|<tr><th>{{{key9}}}</th><td>{{{value9}}}</td></tr>}}}}{{ #if:{{{header10|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header10}}}</th></tr>|{{#if:{{{key10|}}}|<tr><th>{{{key10}}}</th><td>{{{value10}}}</td></tr>}}}}{{ #if:{{{header11|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header11}}}</th></tr>|{{#if:{{{key11|}}}|<tr><th>{{{key11}}}</th><td>{{{value11}}}</td></tr>}}}}{{ #if:{{{header12|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header12}}}</th></tr>|{{#if:{{{key12|}}}|<tr><th>{{{key12}}}</th><td>{{{value12}}}</td></tr>}}}}{{ #if:{{{header13|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header13}}}</th></tr>|{{#if:{{{key13|}}}|<tr><th>{{{key13}}}</th><td>{{{value13}}}</td></tr>}}}}{{ #if:{{{header14|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header14}}}</th></tr>|{{#if:{{{key14|}}}|<tr><th>{{{key14}}}</th><td>{{{value14}}}</td></tr>}}}}{{ #if:{{{header15|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header15}}}</th></tr>|{{#if:{{{key15|}}}|<tr><th>{{{key15}}}</th><td>{{{value15}}}</td></tr>}}}}{{ #if:{{{header16|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header16}}}</th></tr>|{{#if:{{{key16|}}}|<tr><th>{{{key16}}}</th><td>{{{value16}}}</td></tr>}}}}{{ #if:{{{header17|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header17}}}</th></tr>|{{#if:{{{key17|}}}|<tr><th>{{{key17}}}</th><td>{{{value17}}}</td></tr>}}}}{{ #if:{{{header18|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header18}}}</th></tr>|{{#if:{{{key18|}}}|<tr><th>{{{key18}}}</th><td>{{{value18}}}</td></tr>}}}}{{ #if:{{{header19|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header19}}}</th></tr>|{{#if:{{{key19|}}}|<tr><th>{{{key19}}}</th><td>{{{value19}}}</td></tr>}}}}{{ #if:{{{header20|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header20}}}</th></tr>|{{#if:{{{key20|}}}|<tr><th>{{{key20}}}</th><td>{{{value20}}}</td></tr>}}}}{{ #if:{{{header21|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header21}}}</th></tr>|{{#if:{{{key21|}}}|<tr><th>{{{key21}}}</th><td>{{{value21}}}</td></tr>}}}}{{ #if:{{{header22|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header22}}}</th></tr>|{{#if:{{{key22|}}}|<tr><th>{{{key22}}}</th><td>{{{value22}}}</td></tr>}}}}{{ #if:{{{header23|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header23}}}</th></tr>|{{#if:{{{key23|}}}|<tr><th>{{{key23}}}</th><td>{{{value23}}}</td></tr>}}}}{{ #if:{{{header24|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header24}}}</th></tr>|{{#if:{{{key24|}}}|<tr><th>{{{key24}}}</th><td>{{{value24}}}</td></tr>}}}}{{ #if:{{{header25|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header25}}}</th></tr>|{{#if:{{{key25|}}}|<tr><th>{{{key25}}}</th><td>{{{value25}}}</td></tr>}}}}{{ #if:{{{header26|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header26}}}</th></tr>|{{#if:{{{key26|}}}|<tr><th>{{{key26}}}</th><td>{{{value26}}}</td></tr>}}}}{{ #if:{{{header27|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header27}}}</th></tr>|{{#if:{{{key27|}}}|<tr><th>{{{key27}}}</th><td>{{{value27}}}</td></tr>}}}}{{ #if:{{{header28|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header28}}}</th></tr>|{{#if:{{{key28|}}}|<tr><th>{{{key28}}}</th><td>{{{value28}}}</td></tr>}}}}{{ #if:{{{header29|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header29}}}</th></tr>|{{#if:{{{key29|}}}|<tr><th>{{{key29}}}</th><td>{{{value29}}}</td></tr>}}}} </table> {{#if:{{{footnote|}}}|<div style="text-align: right; font-size: 0.75em;">{{{footnote}}}</div>}} </div></onlyinclude></includeonly> General purpose Infobox, can be used as a base for other Infobox Templates or custom Infoboxes which Template existence is not justified. == Usage == An Infobox consists of a title, an image, and the data in a key-value form, which may also be organized with headers. There can also be a footnote. Everything is optional, but if a key if used, its value must also be set. Setting a value without its key will do nothing. The title is set with the <code>header0</code> parameter and the image with the <code>image</code> parameter, which value must be the file name of an existing image (without <code>File:</code> prefix). 29 fields/headers are available for the data. Headers can be set with <code>header1</code>, <code>header2</code>, ..., <code>header29</code> while data are set with <code>key1</code> and its respective <code>value1</code>, up to <code>key29</code>/<code>value29</code>. The lines will be presented from top to bottom as the number increase, and it is not necessary to use consecutive numbers. The use of a given header will disable its corresponding key/value, so if <code>header10</code> was used, then <code>key10</code> and <code>value10</code> will do nothing. A footnote can be provided with the <code>footnote</code> parameter. == Examples == {|style="width: 100%; background: none;" |{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key3 = key3 |value3 = value3 |header4 = header4 |key5 = key5 |value5 = value5 |key6 = key6 |value6 = value6 |key7 = key7 |value7 = value7 }} <nowiki>{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key3 = key3 |value3 = value3 |header4 = header4 |key5 = key5 |value5 = value5 |key6 = key6 |value6 = value6 |key7 = key7 |value7 = value7 }}</nowiki> |- |{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key5 = key5 |value5 = value5 |header10 = header10 |key11 = key11 |value11 = value11 |key13 = key13 |value13 = value13 |key17 = key17 |value17 = value17 }} Numbers do not have to be contiguous, this may be useful for future proofing, for example if one desires to add something between 2 and 5 with key3/value3 later without having to change 5, 10, 11, 13 and 17. <nowiki>{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key5 = key5 |value5 = value5 |header10 = header10 |key11 = key11 |value11 = value11 |key13 = key13 |value13 = value13 |key17 = key17 |value17 = value17 }}</nowiki> |- |{{Infobox |header0 = header0 |key1 = key1 |value1 = value1 |key2 = key2 |value2 = value2 |footnote = [[Template:Infobox|How to make your own Infobox]] }} <nowiki>{{Infobox |header0 = header0 |key1 = key1 |value1 = value1 |key2 = key2 |value2 = value2 |footnote = [[Template:Infobox|How to make your own Infobox]] }}</nowiki> |} d7d59541db85562f457c114d853d32fccfb54dc3 Template:Infobox Character 10 888 5715 2023-06-09T20:52:17Z wikipedia>Pttn 0 wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = {{{type|}}} |image = {{{image|}}} |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{born|}}}|Born|{{#if:{{{birthday|}}}|Birthday}}}} |value4 = {{#if:{{{born|}}}|{{{born}}}|{{#if:{{{birthday|}}}|{{{birthday}}}}}}} |key5 = {{#if:{{{pronouns|}}}|Pronouns}} |value5 = {{{pronouns|}}} |key6 = {{#if:{{{universe|}}}|Universe/Origin}} |value6 = {{{universe|}}} |key7 = {{#if:{{{designer|}}}|Designer}} |value7 = {{{designer|}}} |key8 = {{#if:{{{inspiration|}}}|Inspired by}} |value8 = {{{inspiration|}}} |key9 = {{#if:{{{debut|}}}|Debut}} |value9 = {{{debut|}}} |header10 = {{#if:{{{personification|}}}|Personification}} |key11 = {{#if:{{{personification|}}}|Personifies}} |value11 = {{{personification|}}} |key12 = {{#if:{{{developer|}}}|Developer}} |value12 = {{{developer|}}} |key13 = {{#if:{{{owner|}}}|Owner}} |value13 = {{{owner|}}} |header20 = {{#if:{{{measurements|{{{haircolor|{{{eyecolor|}}}}}}}}}|Appearance}} |key21 = {{#if:{{{measurements|}}}|Measurements|{{#if:{{{height|}}}|Height}}}} |value21 = {{#if:{{{measurements|}}}|{{{measurements}}}|{{#if:{{{height|}}}|{{{height}}}}}}} |key22 = {{#if:{{{haircolor|}}}|Hair Color}} |value22 = {{{haircolor|}}} |key23 = {{#if:{{{eyecolor|}}}|Eye Color}} |value23 = {{{eyecolor|}}} |header25 = {{#if:{{{affiliation|{{{customkey1|{{{customkey2|{{{customkey3|}}}}}}}}}}}}|Other Information}} |key26 = {{#if:{{{affiliation|}}}|Affiliation}} |value26 = {{{affiliation|}}} |key27 = {{{customkey1|}}} |value27 = {{{customvalue1|}}} |key28 = {{{customkey2|}}} |value28 = {{{customvalue2|}}} |key29 = {{{customkey3|}}} |value29 = {{{customvalue3|}}} |footnote = [[Template:Infobox Character|How to make your own Character Infobox]] }}</onlyinclude></includeonly> Infobox for characters, also suitable for User Pages (humoristically treating Real Life like any Universe on the Wiki). == General Template == If not applicable or redundant (like don't fill both measurements and height), then simply completely remove a line (don't keep it with something like N/A). <nowiki>{{Infobox Character |type = Type of character (OS-tan, OS-kun, App-tan,...) |image = Image of your character.png |fullname = Full character name |alias = Aliases (nicknames,...) |born = Character's Date of Birth. The format should be "YYYY-MM-DD". |birthday = Character's Birthday if indeterminate year (do not use both born and birthday). The format should be "Month Day". |pronouns = The pronouns to use to refer to this character |universe = Character's origin/which universe it belongs |designer = Who designed/created the character |inspiration = From which character this one is inspired, if not purely original |debut = When the character was first published, in the YYYY-MM-DD format |personification = What this character personifies |developer = Who develops what is personified (in case it is a software personification) |owner = Who owns what is personified (in case it is something like a company personification) |measurements = Character's height and weight |height = Character's height if weight not known |haircolor = Character's Hair Color |eyecolor = Character's Eye Color |affiliation = To which group/organization this character might belong to or be affiliated with, if any |customkey1 = Custom Key 1 (use these to create fields not proposed by the Template, it could be something like Friends/Family, Likes/Dislikes,...) |customvalue1 = Custom Value 1 |customkey2 = Custom Key 2 |customvalue2 = Custom Value 2 |customkey3 = Custom Key 3 |customvalue3 = Custom Value 3 }}</nowiki> == Examples == {|style="width: 100%; background: none;" |{{Infobox Character |type = [[:Category:Site personifications|Site-tan]] |image = Mona Cropped.png |fullname = Mona |birthday = October 29 |universe = [[Mona's Museum]] |designer = [[User:Pttn|Pttn]] |debut = 2022-12-29 |personification = OS-tans.moe |measurements = 164 cm, 58 kg |haircolor = Light Brown |eyecolor = Light Brown |affiliation = [[Mona's Museum (location)|Mona's Museum]] |customkey1 = Occupation |customvalue1 = IT Museum Curator }} <nowiki>{{Infobox Character |type = [[:Category:Site personifications|Site-tan]] |image = Mona Cropped.png |fullname = Mona |birthday = October 29 |universe = [[Mona's Museum]] |designer = [[User:Pttn|Pttn]] |debut = 2022-12-29 |personification = OS-tans.moe |measurements = 164 cm, 58 kg |haircolor = Light Brown |eyecolor = Light Brown |affiliation = [[Mona's Museum (location)|Mona's Museum]] |customkey1 = Occupation |customvalue1 = IT Museum Curator }}</nowiki> |- |{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Nanami_Madobe_Cropped.png |fullname = Nanami Madobe |universe = [[:Category:Madobe Universe|Madobe Universe]] |designer = [[Wakaba]] |debut = 2009-09-14 |personification = [[Windows 7]] |developer = [[Microsoft]] |haircolor = Blue |eyecolor = Blue, with rainbow reflect }} <nowiki>{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Nanami_Madobe_Cropped.png |fullname = Nanami Madobe |universe = [[:Category:Madobe Universe|Madobe Universe]] |designer = [[Wakaba]] |debut = 2009-09-14 |personification = [[Windows 7]] |developer = [[Microsoft]] |haircolor = Blue |eyecolor = Blue, with rainbow reflect }}</nowiki> |- |{{Infobox Character |type = Phone-tan |image = Jasper Ive.jpg |fullname = Jasper Ive |universe = [[The Mainframe]] |designer = [[User:Sinclair-Speccy|Sinclair-Speccy]] |debut = 2019 |personification = iPhone 3G and 3GS |owner = Apple |height = 127 cm (4 ft 2 in) |haircolor = Black |eyecolor = Purple }} <nowiki>{{Infobox Character |type = [[:Category:Hardware personifications|Phone-tan]] |image = Jasper Ive.jpg |fullname = Jasper Ive |universe = [[The Mainframe]] |designer = [[User:Sinclair-Speccy|Sinclair-Speccy]] |debut = 2019 |personification = iPhone 3G and 3GS |owner = Apple |height = 127 cm (4 ft 2 in) |haircolor = Black |eyecolor = Purple }}</nowiki> |- |{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Win9.png |fullname = Kyuubi Madobe |universe = [[Very troubl'd winbows, macks & lintux]] |designer = [[User:Francispwn|Francispwn]] |personification = [[Windows 9]] |developer = Microshaft Corporation |height = 9'0 |haircolor = Light Blue |eyecolor = Blue }} <nowiki>{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Win9.png |fullname = Kyuubi Madobe |universe = [[Very troubl'd winbows, macks & lintux]] |designer = [[User:Francispwn|Francispwn]] |personification = [[Windows 9]] |developer = Microshaft Corporation |height = 9'0 |haircolor = Light Blue |eyecolor = Blue }}</nowiki> |} 886ff6c3aada70866495effc12e45cf69d2f127a Module:Yesno/doc 828 721 1431 2023-06-11T20:38:32Z wikipedia>MSGJ 0 Protected "[[Module:Yesno/doc]]": Persistent [[WP:Vandalism|vandalism]] ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki {{used in system}} {{Module rating|protected}} This module provides a consistent interface for processing boolean or boolean-style string input. While Lua allows the <code>true</code> and <code>false</code> boolean values, wikicode templates can only express boolean values through strings such as "yes", "no", etc. This module processes these kinds of strings and turns them into boolean input for Lua to process. It also returns <code>nil</code> values as <code>nil</code>, to allow for distinctions between <code>nil</code> and <code>false</code>. The module also accepts other Lua structures as input, i.e. booleans, numbers, tables, and functions. If it is passed input that it does not recognise as boolean or <code>nil</code>, it is possible to specify a default value to return. == Syntax == <syntaxhighlight lang="lua">yesno(value, default)</syntaxhighlight> <code>value</code> is the value to be tested. Boolean input or boolean-style input (see below) always evaluates to either <code>true</code> or <code>false</code>, and <code>nil</code> always evaluates to <code>nil</code>. Other values evaluate to <code>default</code>. == Usage == First, load the module. Note that it can only be loaded from other Lua modules, not from normal wiki pages. For normal wiki pages you can use {{tl|yesno}} instead. <syntaxhighlight lang="lua"> local yesno = require('Module:Yesno') </syntaxhighlight> Some input values always return <code>true</code>, and some always return <code>false</code>. <code>nil</code> values always return <code>nil</code>. <syntaxhighlight lang="lua"> -- These always return true: yesno('yes') yesno('y') yesno('true') yesno('t') yesno('on') yesno('1') yesno(1) yesno(true) -- These always return false: yesno('no') yesno('n') yesno('false') yesno('f') yesno('off') yesno('0') yesno(0) yesno(false) -- A nil value always returns nil: yesno(nil) yesno() </syntaxhighlight> String values are converted to lower case before they are matched: <syntaxhighlight lang="lua"> -- These always return true: yesno('Yes') yesno('YES') yesno('yEs') yesno('Y') yesno('tRuE') -- These always return false: yesno('No') yesno('NO') yesno('nO') yesno('N') yesno('fALsE') </syntaxhighlight> ===Undefined input ('foo')=== You can specify a default value if yesno receives input other than that listed above. If you don't supply a default, the module will return <code>nil</code> for these inputs. <syntaxhighlight lang="lua"> -- These return nil: yesno(nil) yesno('foo') yesno({}) yesno(5) yesno('') yesno(function() return 'This is a function.' end) yesno(nil, true) yesno(nil, 'bar') -- These return true: yesno('foo', true) yesno({}, true) yesno(5, true) yesno('', true) yesno(function() return 'This is a function.' end, true) -- These return "bar": yesno('foo', 'bar') yesno({}, 'bar') yesno(5, 'bar') yesno('', 'bar') yesno(function() return 'This is a function.' end, 'bar') </syntaxhighlight> Although the empty string usually evaluates to false in wikitext, it evaluates to true in Lua. This module prefers the Lua behaviour over the wikitext behaviour. If treating the empty string as false is important for your module, you will need to convert empty strings to a value that evaluates to false before passing them to this module. In the case of arguments received from wikitext, this can be done by using [[Module:Arguments]]. ===Handling nil results=== By definition :<syntaxhighlight lang="lua"> yesno(nil) -- Returns nil. yesno('foo') -- Returns nil. yesno(nil, true) -- Returns nil. yesno(nil, false) -- Returns nil. yesno('foo', true) -- Returns true. </syntaxhighlight> To get the binary <syntaxhighlight lang="lua" inline>true/false</syntaxhighlight>-only values, use code like: <syntaxhighlight lang="lua"> myvariable = yesno(value or false) -- When value is nil, result is false. myvariable = yesno(value or true) -- When value is nil, result is true. myvariable = yesno('foo') or false -- Unknown string returns nil, result is false. myvariable = yesno('foo', true) or false -- Default value (here: true) applies, result is true. </syntaxhighlight><!-- --><includeonly>{{sandbox other|| [[Category:Lua metamodules]] }}</includeonly> acae88c54e953bbad689f511129b3d5bbf0364f3 Module:Documentation 828 296 582 2023-06-17T01:23:52Z wikipedia>Izno 0 per tper Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle local purgeLink = makeWikilink("Special:Purge/" .. docTitle.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 728908c27cb1e65ac402f1af8a9e4f144ddc3d0d Module:Transclusion count/data/A 828 718 1425 2023-06-18T05:09:58Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["A-Class"] = 6200, ["AARTalk"] = 8900, ["ACArt"] = 5400, ["AFB_game_box_end"] = 2400, ["AFB_game_box_start"] = 2400, ["AFC_comment"] = 14000, ["AFC_submission"] = 26000, ["AFC_submission_category_header"] = 4600, ["AFD_help"] = 102000, ["AFD_help/styles.css"] = 102000, ["AFI/Picture_box/show_picture"] = 3600, ["AFI_film"] = 7800, ["AFL_Car"] = 2500, ["AFL_Col"] = 2400, ["AFL_Ess"] = 2500, ["AFL_Gee"] = 2500, ["AFL_Haw"] = 2300, ["AFL_Mel"] = 2700, ["AFL_NM"] = 2200, ["AFL_Ric"] = 2400, ["AFL_StK"] = 2900, ["AFL_Tables"] = 11000, ["AFL_Year"] = 2500, ["ALG"] = 2400, ["AMARB"] = 4500, ["AML"] = 4500, ["AMQ"] = 4600, ["AM_station_data"] = 4400, ["ARG"] = 6300, ["ASIN"] = 4500, ["ASN"] = 3400, ["ATP"] = 5000, ["AUS"] = 14000, ["AUT"] = 9400, ["AZE"] = 2500, ["A_note"] = 4200, ["A_or_an"] = 29000, ["Aan"] = 44000, ["Abbr"] = 780000, ["Abbreviation"] = 2300, ["Abbrlink"] = 17000, ["Abot"] = 10000, ["About"] = 151000, ["Absolute_page_title"] = 2400, ["Acad"] = 6400, ["Access_icon"] = 2600, ["According_to_whom"] = 4200, ["AchievementTable"] = 10000, ["Active_politician"] = 20000, ["AdSenseSummary"] = 4100, ["Added"] = 2300, ["Adjacent_communities"] = 26000, ["Adjacent_stations"] = 37000, ["Adjacent_stations/styles.css"] = 37000, ["Admin"] = 13000, ["Administrator_note"] = 6500, ["Adminnote"] = 3500, ["Advert"] = 19000, ["Aet"] = 4900, ["AfC_age_category"] = 4400, ["AfC_comment"] = 15000, ["AfC_date_category"] = 189000, ["AfC_status/age"] = 4400, ["AfC_status/backlog"] = 4900, ["AfC_submission"] = 41000, ["AfC_submission/comments"] = 24000, ["AfC_submission/declined"] = 24000, ["AfC_submission/declinedivbox"] = 24000, ["AfC_submission/draft"] = 19000, ["AfC_submission/helptools"] = 44000, ["AfC_submission/pending"] = 4400, ["AfC_submission/tools"] = 4400, ["AfC_submission_category_header"] = 5600, ["AfC_submission_category_header/day"] = 5400, ["AfC_submission_category_header/td"] = 5400, ["AfC_talk/C_percentage"] = 2900, ["AfC_topic"] = 27000, ["AfD_categories_horizontal_shortnames"] = 4300, ["AfD_count_link"] = 3800, ["Afd-merged-from"] = 7800, ["AfricaProject"] = 28000, ["Africa_topic"] = 6200, ["After_extra_time"] = 4900, ["Age"] = 36000, ["Age_in_days"] = 4200, ["Age_in_years"] = 3800, ["Age_in_years,_months,_weeks_and_days"] = 4000, ["Age_in_years,_months_and_days"] = 17000, ["Age_in_years_and_days"] = 3900, ["Age_in_years_and_days_nts"] = 3000, ["Agree"] = 2100, ["Ahnentafel"] = 8300, ["Ahnentafel/styles.css"] = 8300, ["Air_Force_Historical_Research_Agency"] = 4300, ["Air_force"] = 5900, ["Air_force/core"] = 5900, ["Aircontent"] = 9300, ["Aircraft_specs"] = 12000, ["Aircraft_specs/convert"] = 12000, ["Aircraft_specs/eng"] = 12000, ["Aircraft_specs/length"] = 12000, ["Aircraft_specs/range"] = 12000, ["Aircraft_specs/speed"] = 12000, ["Airport-dest-list"] = 3600, ["Airport_codes"] = 15000, ["Airport_destination_list"] = 4900, ["Al"] = 64000, ["Album"] = 201000, ["Album_chart"] = 29000, ["Album_chart/chartnote"] = 29000, ["Album_cover_fur"] = 53000, ["Album_label_category"] = 2100, ["Album_label_category/core"] = 2100, ["Album_ratings"] = 77000, ["Album_reviews"] = 5700, ["Albums"] = 7300, ["Albums_category"] = 24000, ["Albums_category/core"] = 24000, ["Albums_category/type/default"] = 24000, ["Align"] = 169000, ["Aligned_table"] = 12000, ["AllIrelandByCountyCatNav"] = 2900, ["AllMovie_name"] = 5700, ["AllMovie_title"] = 28000, ["AllMusic"] = 77000, ["Allcaps"] = 8800, ["Allcaps/styles.css"] = 8800, ["Allmovie"] = 4300, ["Allmovie_title"] = 2300, ["Allmusic"] = 17000, ["Allow_wrap"] = 19000, ["Alumni"] = 2300, ["Always_substitute"] = 6500, ["Ambox"] = 1460000, ["Ambox_globe"] = 35000, ["Ambox_globe_current_red"] = 33000, ["American_English"] = 17000, ["American_football_roster/Footer"] = 3100, ["American_football_roster/Header"] = 3100, ["American_football_roster/Player"] = 3100, ["Americanfootballbox"] = 3100, ["Amg_movie"] = 12000, ["Amg_name"] = 3200, ["Anarchism_announcements"] = 3100, ["Anarchism_announcements/shell"] = 3100, ["Anchor"] = 76000, ["Angbr"] = 2000, ["Angbr_IPA"] = 2300, ["Angle_bracket"] = 3100, ["Anglican_navbox_titlestyle"] = 14000, ["Anglicise_rank"] = 564000, ["Animal_tasks"] = 18000, ["Anime_News_Network"] = 11000, ["Ann"] = 4900, ["Annotated_link"] = 7300, ["Annual_readership"] = 51000, ["Anonblock"] = 33000, ["Antonym_of_(dis)establish"] = 8700, ["Apostrophe"] = 75000, ["ArbCom_Arab-Israeli_editnotice"] = 2100, ["ArbCom_Arab-Israeli_enforcement"] = 2900, ["Arbitration_Committee_candidate/data"] = 76000, ["Archive"] = 153000, ["Archive-nav"] = 5800, ["Archive_bottom"] = 43000, ["Archive_box"] = 18000, ["Archive_list"] = 69000, ["Archive_navigation"] = 7400, ["Archive_top"] = 26000, ["Archive_top/styles.css"] = 26000, ["Archivebottom"] = 3600, ["Archivebox"] = 2500, ["Archives"] = 49000, ["Archivetop"] = 3600, ["Army"] = 15000, ["Army/core"] = 15000, ["Art_UK_bio"] = 2400, ["Art_UK_bio/plural"] = 2400, ["Article"] = 2900, ["ArticleHistory"] = 29000, ["Article_alerts_box"] = 3600, ["Article_alerts_box/styles.css"] = 3600, ["Article_for_improvement_banner/Picture_box"] = 3600, ["Article_for_improvement_banner/Picture_box/show_picture"] = 3600, ["Article_history"] = 46000, ["Articles_by_Quality"] = 2300, ["Articles_by_Quality/down"] = 2300, ["Articles_by_Quality/total"] = 2300, ["Articles_by_Quality/up"] = 2300, ["As_of"] = 78000, ["Asbox"] = 2390000, ["Asbox/styles.css"] = 2390000, ["Asia_topic"] = 9900, ["Asof"] = 7600, ["Assessed-Class"] = 18000, ["Assignment"] = 6000, ["Assignment_milestones"] = 5300, ["AstDys"] = 2900, ["AthAbbr"] = 4100, ["Atnhead"] = 6000, ["Atop"] = 4400, ["Attached_KML"] = 12000, ["AuEduNewbie"] = 2500, ["Audio"] = 27000, ["Audio_sample"] = 2900, ["AustralianFootball"] = 7400, ["Australian_Dictionary_of_Biography"] = 2400, ["Australian_English"] = 2700, ["Australian_party_style"] = 6000, ["Australian_politics/name"] = 4200, ["Australian_politics/party_colours"] = 6000, ["Austria_metadata_Wikidata"] = 2100, ["Austria_population_Wikidata"] = 2100, ["Aut"] = 8200, ["Authority_control"] = 2000000, ["Authority_control_(arts)"] = 16000, ["Auto_link"] = 78000, ["Autobiography"] = 2100, ["Automated_tools"] = 90000, ["Automated_tools/core"] = 90000, ["Automatic_Taxobox"] = 2600, ["Automatic_archive_navigator"] = 127000, ["Automatic_taxobox"] = 74000, ["Aviation_accidents_and_incidents"] = 2200, ["Awaiting_admin"] = 2600, ["Awaitingadmin"] = 2500, ["Award2"] = 2400, ["Awards"] = 2400, ["Awards_table"] = 5500, ["Awards_table/styles.css"] = 5500, ["Ayd"] = 2900, ["Aye"] = 24000, ["Module:A_or_an"] = 29000, ["Module:A_or_an/words"] = 29000, ["Module:About"] = 151000, ["Module:Adjacent_stations"] = 73000, ["Module:Adjacent_stations/Amtrak"] = 2300, ["Module:Adjacent_stations/Indian_Railways"] = 3200, ["Module:Adjacent_stations/JR_East"] = 2200, ["Module:Adjacent_stations/i18n"] = 73000, ["Module:AfC_submission_catcheck"] = 378000, ["Module:AfC_topic"] = 27000, ["Module:Age"] = 1170000, ["Module:Ahnentafel"] = 8300, ["Module:Airport_destination_list"] = 4900, ["Module:Aligned_dates_list"] = 2200, ["Module:Aligned_table"] = 12000, ["Module:Anchor"] = 76000, ["Module:Ancient_Egypt_era"] = 2800, ["Module:Ancient_Egypt_era/data"] = 2800, ["Module:Ancient_Egypt_kings"] = 2800, ["Module:Ancient_Egypt_kings/data"] = 2800, ["Module:Ancient_Olympiads"] = 2800, ["Module:Ancient_Olympiads/data"] = 2800, ["Module:Annotated_link"] = 7300, ["Module:Archive_list"] = 71000, ["Module:Arguments"] = 31300000, ["Module:Armenian"] = 2800, ["Module:Article_history"] = 46000, ["Module:Article_history/Category"] = 46000, ["Module:Article_history/config"] = 46000, ["Module:Article_history/styles.css"] = 46000, ["Module:Asbox"] = 2390000, ["Module:Asbox_stubtree"] = 36000, ["Module:Attached_KML"] = 12000, ["Module:Attached_KML/styles.css"] = 12000, ["Module:Australian_place_map"] = 16000, ["Module:Authority_control"] = 2020000, ["Module:Authority_control/auxiliary"] = 569000, ["Module:Authority_control/config"] = 2020000, ["Module:Automated_taxobox"] = 362000, ["Module:Automatic_archive_navigator"] = 127000, ["Module:Automatic_archive_navigator/config"] = 127000, ["Module:Autotaxobox"] = 564000, } 40bb7b96d6e7c9ec8132c8e3c07ad1fabd03549b Module:Transclusion count/data/C 828 742 1473 2023-06-18T05:10:18Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["C"] = 865000, ["C-Class"] = 78000, ["C-SPAN"] = 12000, ["C-cmn"] = 2600, ["C-pl"] = 52000, ["C."] = 3900, ["CAN"] = 20000, ["CANelec"] = 14000, ["CANelec/gain"] = 2600, ["CANelec/hold"] = 4800, ["CANelec/source"] = 7000, ["CANelec/top"] = 6200, ["CANelec/total"] = 6100, ["CAS"] = 3800, ["CBB_Standings_End"] = 15000, ["CBB_Standings_Entry"] = 15000, ["CBB_Standings_Start"] = 15000, ["CBB_Yearly_Record_End"] = 3000, ["CBB_Yearly_Record_Entry"] = 3100, ["CBB_Yearly_Record_Start"] = 3000, ["CBB_Yearly_Record_Subhead"] = 3600, ["CBB_Yearly_Record_Subtotal"] = 2800, ["CBB_roster/Footer"] = 7800, ["CBB_roster/Header"] = 7800, ["CBB_roster/Player"] = 7800, ["CBB_schedule_end"] = 10000, ["CBB_schedule_entry"] = 11000, ["CBB_schedule_start"] = 11000, ["CBB_yearly_record_end"] = 4100, ["CBB_yearly_record_end/legend"] = 3600, ["CBB_yearly_record_entry"] = 4000, ["CBB_yearly_record_start"] = 4000, ["CBB_yearly_record_subhead"] = 3700, ["CBB_yearly_record_subtotal"] = 3800, ["CBSB_Standings_End"] = 4400, ["CBSB_Standings_Entry"] = 4400, ["CBSB_Standings_Start"] = 4400, ["CBSB_link"] = 3500, ["CC0"] = 4000, ["CENTURY"] = 16000, ["CFB_Standings_End"] = 34000, ["CFB_Standings_Entry"] = 34000, ["CFB_Standings_Start"] = 34000, ["CFB_Yearly_Record_End"] = 6600, ["CFB_Yearly_Record_End/legend"] = 2300, ["CFB_Yearly_Record_Entry"] = 6600, ["CFB_Yearly_Record_Start"] = 6600, ["CFB_Yearly_Record_Subhead"] = 6600, ["CFB_Yearly_Record_Subtotal"] = 6500, ["CFB_schedule"] = 26000, ["CFB_schedule_entry"] = 19000, ["CFL_Year"] = 5600, ["CGF_year"] = 2600, ["CHE"] = 10000, ["CHI"] = 2700, ["CHL"] = 3600, ["CHN"] = 11000, ["CN"] = 3400, ["CO2"] = 3200, ["COI"] = 14000, ["COIUL"] = 128000, ["COI_editnotice"] = 6600, ["COL"] = 4900, ["COLON"] = 13000, ["CRI"] = 2200, ["CRO"] = 5000, ["CSK"] = 2800, ["CSS_image_crop"] = 4400, ["CUB"] = 3600, ["CURRENTDATE"] = 3600, ["CURRENTMINUTE"] = 2500, ["CYP"] = 2000, ["CZE"] = 15000, ["Calendar"] = 2400, ["California/color"] = 11000, ["Call_sign_disambiguation"] = 3000, ["Campaignbox"] = 22000, ["CanProvName"] = 13000, ["CanadaByProvinceCatNav"] = 9700, ["CanadaProvinceThe"] = 4000, ["Canadian_English"] = 6800, ["Canadian_Parliament_links"] = 5100, ["Canadian_election_result"] = 14000, ["Canadian_election_result/gain"] = 2600, ["Canadian_election_result/hold"] = 4900, ["Canadian_election_result/source"] = 8000, ["Canadian_election_result/top"] = 13000, ["Canadian_election_result/top/ElectionYearTest"] = 5700, ["Canadian_election_result/total"] = 10000, ["Canadian_party_colour"] = 8000, ["Canadian_party_colour/colour"] = 18000, ["Canadian_party_colour/colour/default"] = 17000, ["Canadian_party_colour/name"] = 15000, ["Canadian_party_colour/name/default"] = 6800, ["Canned_search"] = 5300, ["Cascite"] = 15000, ["Caselaw_source"] = 4000, ["Cassini-Ehess"] = 2600, ["Cast_listing"] = 15000, ["Castlist"] = 2300, ["Cat"] = 343000, ["CatAutoTOC"] = 653000, ["CatAutoTOC/core"] = 652000, ["CatRel"] = 3800, ["CatTrack"] = 3100, ["Cat_class"] = 6600, ["Cat_in_use"] = 50000, ["Cat_main"] = 198000, ["Cat_more"] = 100000, ["Cat_more_if_exists"] = 41000, ["Cat_see_also"] = 3500, ["Catalog_lookup_link"] = 513000, ["Category-Class"] = 14000, ["Category-inline"] = 8900, ["Category_TOC"] = 72000, ["Category_TOC/tracking"] = 72000, ["Category_U.S._State_elections_by_year"] = 7300, ["Category_U.S._State_elections_by_year/core"] = 7300, ["Category_class"] = 35000, ["Category_class/column"] = 35000, ["Category_class/second_row_column"] = 35000, ["Category_described_in_year"] = 5700, ["Category_diffuse"] = 8000, ["Category_disambiguation"] = 2400, ["Category_disambiguation/category_link"] = 2400, ["Category_explanation"] = 235000, ["Category_handler"] = 3280000, ["Category_ifexist"] = 5000, ["Category_importance"] = 10000, ["Category_importance/column"] = 10000, ["Category_importance/second_row_column"] = 10000, ["Category_link"] = 126000, ["Category_link_with_count"] = 6800, ["Category_more"] = 110000, ["Category_more_if_exists"] = 41000, ["Category_ordered_by_date"] = 11000, ["Category_other"] = 886000, ["Category_redirect"] = 105000, ["Category_see_also"] = 39000, ["Category_see_also/Category_pair_check"] = 39000, ["Category_see_also_if_exists"] = 72000, ["Category_see_also_if_exists_2"] = 88000, ["Category_title"] = 2400, ["Catexp"] = 7800, ["CathEncy"] = 2300, ["Catholic"] = 4100, ["Catholic_Encyclopedia"] = 5100, ["Catmain"] = 26000, ["Catmore"] = 9300, ["Cbb_link"] = 8500, ["Cbignore"] = 100000, ["Cbsb_link"] = 2100, ["Cc-by-2.5"] = 3900, ["Cc-by-3.0"] = 8800, ["Cc-by-sa-2.5"] = 2600, ["Cc-by-sa-2.5,2.0,1.0"] = 2700, ["Cc-by-sa-3.0"] = 26000, ["Cc-by-sa-3.0,2.5,2.0,1.0"] = 2300, ["Cc-by-sa-3.0-migrated"] = 25000, ["Cc-by-sa-4.0"] = 11000, ["Cc-zero"] = 3900, ["CensusAU"] = 9300, ["Census_2016_AUS"] = 7100, ["Cent"] = 5700, ["Center"] = 287000, ["Centralized_discussion"] = 6000, ["Centralized_discussion/core"] = 6000, ["Centralized_discussion/styles.css"] = 6000, ["Centre"] = 3100, ["Century"] = 2100, ["Century_name_from_decade"] = 2400, ["Century_name_from_decade_or_year"] = 77000, ["Century_name_from_title_decade"] = 7600, ["Century_name_from_title_year"] = 7500, ["Certification_Cite/Title"] = 30000, ["Certification_Cite/URL"] = 33000, ["Certification_Cite/archivedate"] = 6000, ["Certification_Cite/archiveurl"] = 6000, ["Certification_Cite_Ref"] = 29000, ["Certification_Table_Bottom"] = 28000, ["Certification_Table_Entry"] = 30000, ["Certification_Table_Entry/Foot"] = 28000, ["Certification_Table_Entry/Foot/helper"] = 28000, ["Certification_Table_Entry/Region"] = 29000, ["Certification_Table_Entry/Sales"] = 28000, ["Certification_Table_Entry/Sales/BelgianPeriod"] = 2100, ["Certification_Table_Entry/Sales/DanishPeriod"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper1"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper2"] = 3200, ["Certification_Table_Entry/Sales/GermanPeriod"] = 3900, ["Certification_Table_Entry/Sales/ItalianHelper"] = 3200, ["Certification_Table_Entry/Sales/NewZealandPeriod"] = 2000, ["Certification_Table_Entry/Sales/SwedishPeriod"] = 2100, ["Certification_Table_Separator"] = 2300, ["Certification_Table_Top"] = 30000, ["Cfb_link"] = 24000, ["Cfd_all"] = 2700, ["Cfd_result"] = 2400, ["Cfdend"] = 4000, ["Chart"] = 4600, ["Chart/end"] = 4700, ["Chart/start"] = 4600, ["Chart_bottom"] = 3400, ["Chart_top"] = 3400, ["Check_completeness_of_transclusions"] = 7300, ["Check_talk"] = 30000, ["Check_talk_wp"] = 1370000, ["Check_winner_by_scores"] = 13000, ["CheckedSockpuppet"] = 7200, ["Checked_sockpuppet"] = 18000, ["Checkedsockpuppet"] = 5300, ["Checkip"] = 13000, ["Checkuser"] = 75000, ["Checkuserblock-account"] = 16000, ["Chem"] = 5800, ["Chem/atom"] = 5800, ["Chem/link"] = 5800, ["Chem2"] = 4600, ["Chem_molar_mass"] = 18000, ["Chem_molar_mass/format"] = 18000, ["Chembox"] = 14000, ["Chembox/styles.css"] = 14000, ["Chembox_3DMet"] = 14000, ["Chembox_3DMet/format"] = 14000, ["Chembox_AllOtherNames"] = 13000, ["Chembox_AllOtherNames/format"] = 13000, ["Chembox_Appearance"] = 6000, ["Chembox_BoilingPt"] = 3800, ["Chembox_CASNo"] = 14000, ["Chembox_CASNo/format"] = 14000, ["Chembox_CalcTemperatures"] = 6700, ["Chembox_ChEBI"] = 14000, ["Chembox_ChEBI/format"] = 14000, ["Chembox_ChEMBL"] = 14000, ["Chembox_ChEMBL/format"] = 14000, ["Chembox_ChemSpiderID"] = 14000, ["Chembox_ChemSpiderID/format"] = 14000, ["Chembox_CompTox"] = 14000, ["Chembox_CompTox/format"] = 14000, ["Chembox_Datapage_check"] = 14000, ["Chembox_Density"] = 4800, ["Chembox_DrugBank"] = 14000, ["Chembox_DrugBank/format"] = 14000, ["Chembox_ECHA"] = 7500, ["Chembox_ECNumber"] = 14000, ["Chembox_ECNumber/format"] = 14000, ["Chembox_Elements"] = 13000, ["Chembox_Elements/molecular_formula"] = 18000, ["Chembox_Footer"] = 14000, ["Chembox_Footer/tracking"] = 14000, ["Chembox_GHS_(set)"] = 3400, ["Chembox_Hazards"] = 11000, ["Chembox_IUPHAR_ligand"] = 14000, ["Chembox_IUPHAR_ligand/format"] = 14000, ["Chembox_Identifiers"] = 14000, ["Chembox_InChI"] = 12000, ["Chembox_InChI/format"] = 12000, ["Chembox_Indexlist"] = 14000, ["Chembox_Jmol"] = 14000, ["Chembox_Jmol/format"] = 14000, ["Chembox_KEGG"] = 14000, ["Chembox_KEGG/format"] = 14000, ["Chembox_MeltingPt"] = 5800, ["Chembox_Properties"] = 14000, ["Chembox_PubChem"] = 14000, ["Chembox_PubChem/format"] = 14000, ["Chembox_RTECS"] = 14000, ["Chembox_RTECS/format"] = 14000, ["Chembox_Related"] = 3300, ["Chembox_SMILES"] = 13000, ["Chembox_SMILES/format"] = 13000, ["Chembox_SolubilityInWater"] = 3900, ["Chembox_Structure"] = 2100, ["Chembox_UNII"] = 14000, ["Chembox_UNII/format"] = 14000, ["Chembox_headerbar"] = 14000, ["Chembox_image"] = 13000, ["Chembox_image_cell"] = 12000, ["Chembox_image_sbs"] = 13000, ["Chembox_parametercheck"] = 13000, ["Chembox_setDatarow"] = 4400, ["Chembox_setHeader"] = 4400, ["Chembox_templatePar/formatPreviewMessage"] = 14000, ["Chembox_verification"] = 7100, ["Chemicals"] = 7400, ["Chemistry"] = 3100, ["Chemspidercite"] = 11000, ["Chessgames_player"] = 3600, ["Chinese"] = 7300, ["Chr"] = 9100, ["ChristianityWikiProject"] = 5800, ["Circa"] = 67000, ["Circular_reference"] = 4200, ["Citation"] = 399000, ["Citation/make_link"] = 6000, ["Citation/styles.css"] = 46000, ["Citation_needed"] = 539000, ["Citation_needed_span"] = 3500, ["Citation_style"] = 4200, ["Cite_AV_media"] = 42000, ["Cite_AV_media_notes"] = 26000, ["Cite_Appletons'"] = 2400, ["Cite_Australian_Dictionary_of_Biography"] = 3300, ["Cite_Catholic_Encyclopedia"] = 8100, ["Cite_Colledge2006"] = 3100, ["Cite_DCB"] = 2800, ["Cite_DNB"] = 18000, ["Cite_EB1911"] = 25000, ["Cite_GNIS"] = 2300, ["Cite_Gaia_DR2"] = 2100, ["Cite_Jewish_Encyclopedia"] = 2900, ["Cite_NIE"] = 3600, ["Cite_NSW_Parliament"] = 3300, ["Cite_NSW_SHR"] = 2600, ["Cite_ODNB"] = 17000, ["Cite_Q"] = 43000, ["Cite_QHR"] = 3000, ["Cite_QPN"] = 4000, ["Cite_Rowlett"] = 2500, ["Cite_Russian_law"] = 7800, ["Cite_Ryan"] = 3200, ["Cite_Sports-Reference"] = 54000, ["Cite_USGov"] = 24000, ["Cite_WoRMS"] = 5400, ["Cite_act"] = 2600, ["Cite_arXiv"] = 4900, ["Cite_bcgnis"] = 3100, ["Cite_book"] = 1580000, ["Cite_certification"] = 33000, ["Cite_cgndb"] = 3200, ["Cite_conference"] = 15000, ["Cite_court"] = 5300, ["Cite_court/styles.css"] = 5300, ["Cite_dictionary"] = 3700, ["Cite_document"] = 6800, ["Cite_encyclopedia"] = 200000, ["Cite_episode"] = 17000, ["Cite_gnis"] = 34000, ["Cite_interview"] = 7600, ["Cite_iucn"] = 57000, ["Cite_journal"] = 949000, ["Cite_magazine"] = 259000, ["Cite_manual"] = 2000, ["Cite_map"] = 37000, ["Cite_news"] = 1490000, ["Cite_newspaper_The_Times"] = 6500, ["Cite_patent"] = 5400, ["Cite_patent/authors"] = 4400, ["Cite_patent/core"] = 5700, ["Cite_peakbagger"] = 4500, ["Cite_podcast"] = 3700, ["Cite_press_release"] = 63000, ["Cite_report"] = 35000, ["Cite_rowlett"] = 2500, ["Cite_simbad"] = 4400, ["Cite_sports-reference"] = 59000, ["Cite_thesis"] = 31000, ["Cite_tweet"] = 35000, ["Cite_video"] = 12000, ["Cite_video_game"] = 3100, ["Cite_web"] = 4530000, ["Cite_wikisource"] = 5500, ["Cite_wikisource/make_link"] = 58000, ["Civil_navigation"] = 2700, ["Cl"] = 123000, ["Clade"] = 7500, ["Clade/styles.css"] = 7500, ["Clarify"] = 40000, ["Class"] = 8850000, ["Class/colour"] = 548000, ["Class/icon"] = 28000, ["Class_mask"] = 8540000, ["Class_mask/b"] = 347000, ["Classical"] = 6900, ["Classicon"] = 4700, ["Clc"] = 5800, ["Cleanup"] = 10000, ["Cleanup_bare_URLs"] = 30000, ["Cleanup_reorganize"] = 2500, ["Cleanup_rewrite"] = 5800, ["Clear"] = 2930000, ["Clear-left"] = 16000, ["Clear_left"] = 30000, ["Clear_right"] = 2900, ["Clerk-Note"] = 9800, ["Clerknote"] = 7400, ["Clickable_button"] = 16000, ["Clickable_button_2"] = 956000, ["Closed_access"] = 4400, ["Closed_rfc_top"] = 2200, ["Clr"] = 3700, ["Clubplayerscat"] = 8300, ["Cmbox"] = 414000, ["Cn"] = 91000, ["Cnote2"] = 2200, ["Cnote2_Begin"] = 2300, ["Cnote2_End"] = 2300, ["Coat_of_arms"] = 5300, ["Cob"] = 12000, ["Code"] = 49000, ["Col-1-of-2"] = 2400, ["Col-2"] = 170000, ["Col-2-of-2"] = 2300, ["Col-3"] = 9800, ["Col-4"] = 3500, ["Col-begin"] = 212000, ["Col-break"] = 210000, ["Col-end"] = 210000, ["Col-float"] = 2700, ["Col-float-break"] = 2600, ["Col-float-end"] = 2600, ["Col-float/styles.css"] = 2700, ["Col-start"] = 20000, ["Colbegin"] = 21000, ["Colend"] = 24000, ["Collapse"] = 9600, ["Collapse_bottom"] = 51000, ["Collapse_top"] = 51000, ["Collapsebottom"] = 3800, ["Collapsetop"] = 3800, ["Collapsible_list"] = 53000, ["Collapsible_option"] = 134000, ["College"] = 8700, ["CollegePrimaryHeader"] = 5700, ["CollegePrimaryStyle"] = 95000, ["CollegeSecondaryStyle"] = 3400, ["College_Athlete_Recruit_End"] = 2800, ["College_Athlete_Recruit_Entry"] = 3000, ["College_Athlete_Recruit_Start"] = 2900, ["College_athlete_recruit_end"] = 4000, ["College_athlete_recruit_entry"] = 4100, ["College_athlete_recruit_start"] = 4100, ["College_color_list"] = 3900, ["Colon"] = 17000, ["Color"] = 464000, ["Color_box"] = 73000, ["Colorbox"] = 3600, ["Colorbull"] = 4900, ["Colored_link"] = 62000, ["Colors"] = 3500, ["Colour"] = 5800, ["Coloured_link"] = 6900, ["Column"] = 2400, ["Column/styles.css"] = 2500, ["Columns-end"] = 2200, ["Columns-list"] = 99000, ["Columns-start"] = 2200, ["Comedy"] = 2500, ["Comic_Book_DB"] = 3500, ["Comicbookdb"] = 3500, ["Comics-replaceability"] = 2900, ["Comics_infobox_sec/creator_nat"] = 2800, ["Comics_infobox_sec/formcat"] = 3200, ["Comics_infobox_sec/genre"] = 3900, ["Comics_infobox_sec/genrecat"] = 3600, ["Comics_infobox_sec/styles.css"] = 8100, ["Comicsproj"] = 28000, ["Comma_separated_entries"] = 425000, ["Comma_separated_values"] = 44000, ["Comment"] = 5200, ["Committed_identity"] = 3000, ["Committed_identity/styles.css"] = 3000, ["Commons"] = 66000, ["Commons-inline"] = 19000, ["Commons_cat"] = 48000, ["Commons_category"] = 842000, ["Commons_category-inline"] = 145000, ["Commons_category_inline"] = 6000, ["Commonscat"] = 66000, ["Commonscat-inline"] = 18000, ["Commonscat_inline"] = 2400, ["Commonscatinline"] = 6500, ["Compact_TOC"] = 6900, ["Compact_ToC"] = 4900, ["Compare"] = 5000, ["Compare_image_with_Wikidata"] = 10000, ["Composition_bar"] = 10000, ["Confirmed"] = 16000, ["Confused"] = 2700, ["Confusing"] = 2300, ["CongBio"] = 9700, ["CongLinks"] = 4500, ["Connected_contributor"] = 17000, ["Connected_contributor_(paid)"] = 6800, ["Constellation_navbox"] = 6700, ["Container"] = 11000, ["Container_cat"] = 7500, ["Container_category"] = 42000, ["Containercat"] = 2600, ["Contains_special_characters"] = 4000, ["Contains_special_characters/core"] = 4000, ["Contains_special_characters/styles.css"] = 4000, ["Content_category"] = 7600, ["Contentious_topics/list"] = 13000, ["Contentious_topics/page_restriction_editnotice_base"] = 2400, ["Contentious_topics/page_restriction_talk_notice_base"] = 3600, ["Contentious_topics/talk_notice"] = 6500, ["Context"] = 2700, ["Continent2continental"] = 16000, ["Continent_adjective_to_noun"] = 2200, ["Controversial"] = 3200, ["Convert"] = 1160000, ["Convinfobox"] = 203000, ["Convinfobox/2"] = 16000, ["Convinfobox/3"] = 118000, ["Convinfobox/pri2"] = 62000, ["Convinfobox/prisec2"] = 3000, ["Convinfobox/prisec3"] = 25000, ["Convinfobox/sec2"] = 9200, ["Coord"] = 1320000, ["Coord_missing"] = 96000, ["Coord_missing/CheckCat"] = 95000, ["Coords"] = 8000, ["Copied"] = 18000, ["Copy_edit"] = 2500, ["Copy_to_Wikimedia_Commons"] = 112000, ["Copyvios"] = 5000, ["Cospar"] = 2500, ["Cot"] = 12000, ["Count"] = 655000, ["Country2continent"] = 36000, ["Country2continental"] = 2400, ["Country2nationality"] = 339000, ["CountryPrefixThe"] = 109000, ["Country_abbreviation"] = 88000, ["Country_alias"] = 15000, ["Country_at_games_navbox"] = 2600, ["Country_at_games_navbox/below"] = 2600, ["Country_data"] = 6700, ["Country_data_AFG"] = 2200, ["Country_data_ALB"] = 6500, ["Country_data_ALG"] = 9200, ["Country_data_AND"] = 2900, ["Country_data_ANG"] = 3800, ["Country_data_ARG"] = 47000, ["Country_data_ARM"] = 7200, ["Country_data_AUS"] = 75000, ["Country_data_AUT"] = 45000, ["Country_data_AZE"] = 9000, ["Country_data_Afghanistan"] = 12000, ["Country_data_Alaska"] = 2100, ["Country_data_Albania"] = 20000, ["Country_data_Alberta"] = 3600, ["Country_data_Algeria"] = 24000, ["Country_data_American_Samoa"] = 2900, ["Country_data_Andorra"] = 7800, ["Country_data_Angola"] = 11000, ["Country_data_Anguilla"] = 2500, ["Country_data_Antigua_and_Barbuda"] = 6000, ["Country_data_Apulia"] = 7900, ["Country_data_Argentina"] = 80000, ["Country_data_Arizona"] = 2300, ["Country_data_Arkansas"] = 2000, ["Country_data_Armenia"] = 22000, ["Country_data_Aruba"] = 3600, ["Country_data_Australia"] = 125000, ["Country_data_Austria"] = 78000, ["Country_data_Azerbaijan"] = 27000, ["Country_data_BAH"] = 3800, ["Country_data_BAN"] = 3800, ["Country_data_BAR"] = 2400, ["Country_data_BEL"] = 50000, ["Country_data_BER"] = 2300, ["Country_data_BHR"] = 4500, ["Country_data_BIH"] = 13000, ["Country_data_BLR"] = 24000, ["Country_data_BOL"] = 5700, ["Country_data_BOT"] = 2200, ["Country_data_BRA"] = 57000, ["Country_data_BUL"] = 26000, ["Country_data_Bahamas"] = 9600, ["Country_data_Bahrain"] = 12000, ["Country_data_Bangladesh"] = 18000, ["Country_data_Barbados"] = 8000, ["Country_data_Belarus"] = 43000, ["Country_data_Belgium"] = 88000, ["Country_data_Belize"] = 5200, ["Country_data_Benin"] = 7300, ["Country_data_Bermuda"] = 5700, ["Country_data_Bhutan"] = 4600, ["Country_data_Bolivia"] = 14000, ["Country_data_Bosnia_and_Herzegovina"] = 29000, ["Country_data_Botswana"] = 9100, ["Country_data_Brazil"] = 101000, ["Country_data_British_Columbia"] = 3400, ["Country_data_British_Raj"] = 2200, ["Country_data_British_Virgin_Islands"] = 3200, ["Country_data_Brunei"] = 6200, ["Country_data_Bulgaria"] = 52000, ["Country_data_Burkina_Faso"] = 10000, ["Country_data_Burma"] = 2700, ["Country_data_Burundi"] = 6000, ["Country_data_CAM"] = 2100, ["Country_data_CAN"] = 58000, ["Country_data_CGO"] = 2400, ["Country_data_CHE"] = 4700, ["Country_data_CHI"] = 17000, ["Country_data_CHL"] = 2100, ["Country_data_CHN"] = 41000, ["Country_data_CIV"] = 8000, ["Country_data_CMR"] = 8600, ["Country_data_COD"] = 3200, ["Country_data_COL"] = 24000, ["Country_data_CPV"] = 2000, ["Country_data_CRC"] = 6500, ["Country_data_CRO"] = 33000, ["Country_data_CUB"] = 9800, ["Country_data_CYP"] = 9000, ["Country_data_CZE"] = 46000, ["Country_data_California"] = 5800, ["Country_data_Cambodia"] = 8700, ["Country_data_Cameroon"] = 18000, ["Country_data_Canada"] = 121000, ["Country_data_Cape_Verde"] = 6300, ["Country_data_Castile_and_León"] = 2000, ["Country_data_Catalonia"] = 3100, ["Country_data_Cayman_Islands"] = 4100, ["Country_data_Central_African_Republic"] = 5000, ["Country_data_Chad"] = 5500, ["Country_data_Chile"] = 40000, ["Country_data_China"] = 83000, ["Country_data_Chinese_Taipei"] = 19000, ["Country_data_Colombia"] = 46000, ["Country_data_Colorado"] = 5600, ["Country_data_Comoros"] = 4400, ["Country_data_Confederate_States_of_America"] = 3100, ["Country_data_Connecticut"] = 3200, ["Country_data_Cook_Islands"] = 3800, ["Country_data_Costa_Rica"] = 18000, ["Country_data_Croatia"] = 56000, ["Country_data_Cuba"] = 22000, ["Country_data_Curaçao"] = 3500, ["Country_data_Cyprus"] = 22000, ["Country_data_Czech_Republic"] = 81000, ["Country_data_Czechoslovakia"] = 19000, ["Country_data_DEN"] = 34000, ["Country_data_DEU"] = 8600, ["Country_data_DNK"] = 3600, ["Country_data_DOM"] = 7100, ["Country_data_Democratic_Republic_of_the_Congo"] = 13000, ["Country_data_Denmark"] = 68000, ["Country_data_Djibouti"] = 4500, ["Country_data_Dominica"] = 4200, ["Country_data_Dominican_Republic"] = 17000, ["Country_data_ECU"] = 12000, ["Country_data_EGY"] = 13000, ["Country_data_ENG"] = 46000, ["Country_data_ESA"] = 2200, ["Country_data_ESP"] = 72000, ["Country_data_EST"] = 14000, ["Country_data_ETH"] = 3300, ["Country_data_EU"] = 3700, ["Country_data_East_Germany"] = 14000, ["Country_data_East_Timor"] = 4900, ["Country_data_Ecuador"] = 25000, ["Country_data_Egypt"] = 31000, ["Country_data_El_Salvador"] = 13000, ["Country_data_Empire_of_Japan"] = 4000, ["Country_data_England"] = 96000, ["Country_data_Equatorial_Guinea"] = 5100, ["Country_data_Eritrea"] = 5400, ["Country_data_Estonia"] = 34000, ["Country_data_Eswatini"] = 5000, ["Country_data_Ethiopia"] = 13000, ["Country_data_Europe"] = 2400, ["Country_data_European_Union"] = 7300, ["Country_data_FIJ"] = 3800, ["Country_data_FIN"] = 34000, ["Country_data_FRA"] = 97000, ["Country_data_FRG"] = 15000, ["Country_data_FR_Yugoslavia"] = 4000, ["Country_data_Faroe_Islands"] = 5400, ["Country_data_Federated_States_of_Micronesia"] = 3000, ["Country_data_Fiji"] = 12000, ["Country_data_Finland"] = 68000, ["Country_data_Florida"] = 6500, ["Country_data_France"] = 191000, ["Country_data_French_Guiana"] = 2100, ["Country_data_French_Polynesia"] = 3800, ["Country_data_GAB"] = 2400, ["Country_data_GAM"] = 2000, ["Country_data_GBR"] = 54000, ["Country_data_GDR"] = 8100, ["Country_data_GEO"] = 14000, ["Country_data_GER"] = 81000, ["Country_data_GHA"] = 9700, ["Country_data_GRE"] = 25000, ["Country_data_GUA"] = 4900, ["Country_data_GUI"] = 3100, ["Country_data_GUY"] = 2300, ["Country_data_Gabon"] = 7500, ["Country_data_Gambia"] = 6700, ["Country_data_Georgia"] = 8100, ["Country_data_Georgia_(U.S._state)"] = 2800, ["Country_data_Georgia_(country)"] = 29000, ["Country_data_German_Empire"] = 5400, ["Country_data_Germany"] = 149000, ["Country_data_Ghana"] = 23000, ["Country_data_Gibraltar"] = 4900, ["Country_data_Great_Britain"] = 73000, ["Country_data_Greece"] = 57000, ["Country_data_Greenland"] = 2800, ["Country_data_Grenada"] = 5100, ["Country_data_Guadeloupe"] = 2800, ["Country_data_Guam"] = 4700, ["Country_data_Guatemala"] = 13000, ["Country_data_Guernsey"] = 2100, ["Country_data_Guinea"] = 8300, ["Country_data_Guinea-Bissau"] = 5000, ["Country_data_Guyana"] = 7400, ["Country_data_HAI"] = 3100, ["Country_data_HKG"] = 13000, ["Country_data_HON"] = 4300, ["Country_data_HUN"] = 37000, ["Country_data_Haiti"] = 8600, ["Country_data_Honduras"] = 12000, ["Country_data_Hong_Kong"] = 26000, ["Country_data_Hungary"] = 70000, ["Country_data_IDN"] = 4900, ["Country_data_INA"] = 10000, ["Country_data_IND"] = 30000, ["Country_data_IRE"] = 10000, ["Country_data_IRI"] = 5400, ["Country_data_IRL"] = 21000, ["Country_data_IRN"] = 6200, ["Country_data_IRQ"] = 4100, ["Country_data_ISL"] = 8500, ["Country_data_ISR"] = 21000, ["Country_data_ITA"] = 85000, ["Country_data_Iceland"] = 23000, ["Country_data_Idaho"] = 2100, ["Country_data_Illinois"] = 4500, ["Country_data_India"] = 108000, ["Country_data_Indiana"] = 2800, ["Country_data_Indonesia"] = 36000, ["Country_data_Iowa"] = 3000, ["Country_data_Iran"] = 91000, ["Country_data_Iraq"] = 14000, ["Country_data_Ireland"] = 34000, ["Country_data_Isle_of_Man"] = 2800, ["Country_data_Israel"] = 45000, ["Country_data_Italy"] = 143000, ["Country_data_Ivory_Coast"] = 18000, ["Country_data_JAM"] = 9300, ["Country_data_JOR"] = 4000, ["Country_data_JP"] = 8100, ["Country_data_JPN"] = 58000, ["Country_data_Jamaica"] = 21000, ["Country_data_Japan"] = 117000, ["Country_data_Jersey"] = 2500, ["Country_data_Jordan"] = 12000, ["Country_data_KAZ"] = 19000, ["Country_data_KEN"] = 7100, ["Country_data_KGZ"] = 3700, ["Country_data_KOR"] = 31000, ["Country_data_KOS"] = 2300, ["Country_data_KSA"] = 5800, ["Country_data_KUW"] = 4000, ["Country_data_Kazakhstan"] = 33000, ["Country_data_Kenya"] = 19000, ["Country_data_Kingdom_of_France"] = 2100, ["Country_data_Kingdom_of_Great_Britain"] = 4800, ["Country_data_Kingdom_of_Italy"] = 4200, ["Country_data_Kiribati"] = 2900, ["Country_data_Kosovo"] = 8700, ["Country_data_Kuwait"] = 11000, ["Country_data_Kyrgyzstan"] = 9200, ["Country_data_LAT"] = 14000, ["Country_data_LBN"] = 2300, ["Country_data_LIB"] = 2500, ["Country_data_LIE"] = 3100, ["Country_data_LIT"] = 3000, ["Country_data_LTU"] = 12000, ["Country_data_LUX"] = 10000, ["Country_data_LVA"] = 2500, ["Country_data_Laos"] = 7400, ["Country_data_Latvia"] = 32000, ["Country_data_Lebanon"] = 15000, ["Country_data_Lesotho"] = 5200, ["Country_data_Liberia"] = 7200, ["Country_data_Libya"] = 8600, ["Country_data_Liechtenstein"] = 7800, ["Country_data_Lithuania"] = 31000, ["Country_data_Luxembourg"] = 24000, ["Country_data_MAC"] = 2400, ["Country_data_MAR"] = 12000, ["Country_data_MAS"] = 11000, ["Country_data_MDA"] = 7600, ["Country_data_MEX"] = 30000, ["Country_data_MGL"] = 2900, ["Country_data_MKD"] = 7500, ["Country_data_MLI"] = 4300, ["Country_data_MLT"] = 5500, ["Country_data_MNE"] = 7700, ["Country_data_MON"] = 3700, ["Country_data_MOZ"] = 2100, ["Country_data_MRI"] = 2000, ["Country_data_MYA"] = 3000, ["Country_data_MYS"] = 3700, ["Country_data_Macau"] = 6300, ["Country_data_Macedonia"] = 4900, ["Country_data_Madagascar"] = 9000, ["Country_data_Malawi"] = 5600, ["Country_data_Malaysia"] = 36000, ["Country_data_Maldives"] = 6000, ["Country_data_Mali"] = 12000, ["Country_data_Malta"] = 17000, ["Country_data_Manitoba"] = 2500, ["Country_data_Marshall_Islands"] = 3700, ["Country_data_Martinique"] = 2800, ["Country_data_Maryland"] = 3100, ["Country_data_Massachusetts"] = 3000, ["Country_data_Mauritania"] = 5800, ["Country_data_Mauritius"] = 7900, ["Country_data_Mexico"] = 66000, ["Country_data_Michigan"] = 4300, ["Country_data_Minnesota"] = 3700, ["Country_data_Missouri"] = 2100, ["Country_data_Moldova"] = 19000, ["Country_data_Monaco"] = 10000, ["Country_data_Mongolia"] = 9600, ["Country_data_Montana"] = 2100, ["Country_data_Montenegro"] = 18000, ["Country_data_Montserrat"] = 2500, ["Country_data_Morocco"] = 27000, ["Country_data_Mozambique"] = 7300, ["Country_data_Myanmar"] = 13000, ["Country_data_NAM"] = 3400, ["Country_data_NED"] = 60000, ["Country_data_NEP"] = 2800, ["Country_data_NGA"] = 8100, ["Country_data_NGR"] = 7900, ["Country_data_NIR"] = 9900, ["Country_data_NLD"] = 6100, ["Country_data_NOR"] = 29000, ["Country_data_NZ"] = 3100, ["Country_data_NZL"] = 32000, ["Country_data_Namibia"] = 9700, ["Country_data_Nauru"] = 2500, ["Country_data_Nazi_Germany"] = 9700, ["Country_data_Nepal"] = 17000, ["Country_data_Netherlands"] = 112000, ["Country_data_Netherlands_Antilles"] = 2300, ["Country_data_New_Brunswick"] = 2500, ["Country_data_New_Caledonia"] = 3400, ["Country_data_New_Jersey"] = 4200, ["Country_data_New_South_Wales"] = 5800, ["Country_data_New_York"] = 4800, ["Country_data_New_York_(state)"] = 6800, ["Country_data_New_Zealand"] = 66000, ["Country_data_Newfoundland_and_Labrador"] = 2300, ["Country_data_Nicaragua"] = 8200, ["Country_data_Niger"] = 5900, ["Country_data_Nigeria"] = 32000, ["Country_data_North_Carolina"] = 3500, ["Country_data_North_Korea"] = 13000, ["Country_data_North_Macedonia"] = 17000, ["Country_data_Northern_Ireland"] = 15000, ["Country_data_Northern_Mariana_Islands"] = 2900, ["Country_data_Norway"] = 72000, ["Country_data_Nova_Scotia"] = 2300, ["Country_data_OMA"] = 2700, ["Country_data_Ohio"] = 4800, ["Country_data_Oman"] = 8600, ["Country_data_Ontario"] = 3800, ["Country_data_Ottoman_Empire"] = 2600, ["Country_data_PAK"] = 8000, ["Country_data_PAN"] = 5600, ["Country_data_PAR"] = 9900, ["Country_data_PER"] = 12000, ["Country_data_PHI"] = 11000, ["Country_data_PHL"] = 2500, ["Country_data_PNG"] = 2700, ["Country_data_POL"] = 49000, ["Country_data_POR"] = 31000, ["Country_data_PRC"] = 2100, ["Country_data_PRK"] = 4600, ["Country_data_PRT"] = 2800, ["Country_data_PUR"] = 7200, ["Country_data_Pakistan"] = 28000, ["Country_data_Palau"] = 3000, ["Country_data_Palestine"] = 6600, ["Country_data_Panama"] = 16000, ["Country_data_Papua_New_Guinea"] = 7900, ["Country_data_Paraguay"] = 20000, ["Country_data_Pennsylvania"] = 3700, ["Country_data_People's_Republic_of_China"] = 3300, ["Country_data_Peru"] = 30000, ["Country_data_Philippines"] = 34000, ["Country_data_Poland"] = 149000, ["Country_data_Portugal"] = 68000, ["Country_data_Prussia"] = 2600, ["Country_data_Puerto_Rico"] = 17000, ["Country_data_QAT"] = 7600, ["Country_data_Qatar"] = 17000, ["Country_data_Quebec"] = 4200, ["Country_data_ROM"] = 13000, ["Country_data_ROU"] = 26000, ["Country_data_RSA"] = 31000, ["Country_data_RUS"] = 62000, ["Country_data_Republic_of_China"] = 5600, ["Country_data_Republic_of_Ireland"] = 25000, ["Country_data_Republic_of_the_Congo"] = 7600, ["Country_data_Romania"] = 68000, ["Country_data_Russia"] = 114000, ["Country_data_Russian_Empire"] = 4900, ["Country_data_Rwanda"] = 7600, ["Country_data_SAM"] = 3100, ["Country_data_SCG"] = 3100, ["Country_data_SCO"] = 26000, ["Country_data_SEN"] = 7900, ["Country_data_SER"] = 3600, ["Country_data_SGP"] = 2600, ["Country_data_SIN"] = 6900, ["Country_data_SLO"] = 19000, ["Country_data_SLV"] = 3000, ["Country_data_SMR"] = 3100, ["Country_data_SPA"] = 4600, ["Country_data_SRB"] = 26000, ["Country_data_SRI"] = 4600, ["Country_data_SUI"] = 42000, ["Country_data_SUR"] = 2000, ["Country_data_SVK"] = 28000, ["Country_data_SVN"] = 6600, ["Country_data_SWE"] = 56000, ["Country_data_SWI"] = 4700, ["Country_data_SYR"] = 3500, ["Country_data_Saint_Kitts_and_Nevis"] = 4700, ["Country_data_Saint_Lucia"] = 4900, ["Country_data_Saint_Vincent_and_the_Grenadines"] = 4800, ["Country_data_Samoa"] = 7700, ["Country_data_San_Marino"] = 8400, ["Country_data_Saskatchewan"] = 2900, ["Country_data_Saudi_Arabia"] = 19000, ["Country_data_Scotland"] = 51000, ["Country_data_Senegal"] = 17000, ["Country_data_Serbia"] = 54000, ["Country_data_Serbia_and_Montenegro"] = 5100, ["Country_data_Seychelles"] = 5400, ["Country_data_Sierra_Leone"] = 7200, ["Country_data_Singapore"] = 27000, ["Country_data_Slovakia"] = 50000, ["Country_data_Slovenia"] = 42000, ["Country_data_Solomon_Islands"] = 4700, ["Country_data_Somalia"] = 6100, ["Country_data_South_Africa"] = 69000, ["Country_data_South_Carolina"] = 3300, ["Country_data_South_Korea"] = 66000, ["Country_data_South_Sudan"] = 4000, ["Country_data_Soviet_Union"] = 36000, ["Country_data_Spain"] = 132000, ["Country_data_Sri_Lanka"] = 19000, ["Country_data_Sudan"] = 8000, ["Country_data_Suriname"] = 6400, ["Country_data_Sweden"] = 100000, ["Country_data_Switzerland"] = 82000, ["Country_data_Syria"] = 15000, ["Country_data_São_Tomé_and_Príncipe"] = 3400, ["Country_data_TAN"] = 2400, ["Country_data_TCH"] = 11000, ["Country_data_THA"] = 21000, ["Country_data_TJK"] = 2600, ["Country_data_TKM"] = 2700, ["Country_data_TPE"] = 15000, ["Country_data_TRI"] = 4700, ["Country_data_TUN"] = 10000, ["Country_data_TUR"] = 27000, ["Country_data_Taiwan"] = 13000, ["Country_data_Tajikistan"] = 8900, ["Country_data_Tanzania"] = 12000, ["Country_data_Texas"] = 5300, ["Country_data_Thailand"] = 44000, ["Country_data_Togo"] = 6900, ["Country_data_Tonga"] = 6400, ["Country_data_Trinidad_and_Tobago"] = 14000, ["Country_data_Tunisia"] = 22000, ["Country_data_Turkey"] = 76000, ["Country_data_Turkmenistan"] = 7800, ["Country_data_Turks_and_Caicos_Islands"] = 2600, ["Country_data_Tuvalu"] = 2800, ["Country_data_U.S."] = 2100, ["Country_data_U.S._Virgin_Islands"] = 4800, ["Country_data_UAE"] = 9200, ["Country_data_UGA"] = 4000, ["Country_data_UK"] = 18000, ["Country_data_UKGBI"] = 3100, ["Country_data_UKR"] = 36000, ["Country_data_URS"] = 14000, ["Country_data_URU"] = 15000, ["Country_data_US"] = 4900, ["Country_data_USA"] = 132000, ["Country_data_USSR"] = 4500, ["Country_data_UZB"] = 11000, ["Country_data_Uganda"] = 13000, ["Country_data_Ukraine"] = 72000, ["Country_data_United_Arab_Emirates"] = 20000, ["Country_data_United_Kingdom"] = 89000, ["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 4400, ["Country_data_United_Nations"] = 4000, ["Country_data_United_States"] = 281000, ["Country_data_United_States_of_America"] = 5000, ["Country_data_Uruguay"] = 29000, ["Country_data_Uzbekistan"] = 20000, ["Country_data_VEN"] = 16000, ["Country_data_VIE"] = 6200, ["Country_data_Vanuatu"] = 5000, ["Country_data_Vatican_City"] = 2300, ["Country_data_Venezuela"] = 33000, ["Country_data_Vietnam"] = 23000, ["Country_data_Virginia"] = 2900, ["Country_data_WAL"] = 17000, ["Country_data_Wales"] = 34000, ["Country_data_Washington"] = 3400, ["Country_data_Washington,_D.C."] = 2200, ["Country_data_Washington_(state)"] = 3700, ["Country_data_West_Germany"] = 24000, ["Country_data_West_Indies"] = 2600, ["Country_data_Wisconsin"] = 5300, ["Country_data_YUG"] = 9700, ["Country_data_Yemen"] = 7700, ["Country_data_Yugoslavia"] = 18000, ["Country_data_ZAF"] = 4700, ["Country_data_ZAM"] = 3200, ["Country_data_ZIM"] = 8200, ["Country_data_Zambia"] = 9500, ["Country_data_Zimbabwe"] = 17000, ["Country_flagbio"] = 27000, ["Country_name"] = 23000, ["Country_showdata"] = 6100, ["Country_topics"] = 22000, ["County"] = 6500, ["County_(judet)_of_Romania"] = 3300, ["Course_assignment"] = 4200, ["Course_details"] = 6100, ["Course_instructor"] = 2400, ["Cquote"] = 37000, ["Cr"] = 4300, ["Cr-rt"] = 2100, ["Create_taxonomy/link"] = 106000, ["Cref2"] = 2300, ["Cricinfo"] = 24000, ["Cricketarchive"] = 2900, ["Crime_opentask"] = 48000, ["Croatian_Census_2011"] = 2100, ["Cross"] = 3200, ["Crossreference"] = 2500, ["Crossreference/styles.css"] = 2500, ["Csv"] = 3000, ["Ct"] = 12000, ["Curlie"] = 6800, ["Currency"] = 3500, ["Current_events"] = 8200, ["Current_events/styles.css"] = 8200, ["Currentdate"] = 22000, ["Cvt"] = 102000, ["Cycling_Archives"] = 4300, ["Cycling_archives"] = 2600, ["Cycling_data_LTS"] = 2100, ["Cycling_team_link"] = 12000, ["Module:CFB_schedule"] = 26000, ["Module:CallAssert"] = 241000, ["Module:CanElecResTopTest"] = 5700, ["Module:CanadaByProvinceCatNav"] = 9700, ["Module:Cat_main"] = 198000, ["Module:Catalog_lookup_link"] = 513000, ["Module:Category_described_in_year"] = 5700, ["Module:Category_described_in_year/conf"] = 5700, ["Module:Category_handler"] = 4410000, ["Module:Category_handler/blacklist"] = 4410000, ["Module:Category_handler/config"] = 4410000, ["Module:Category_handler/data"] = 4410000, ["Module:Category_handler/shared"] = 4410000, ["Module:Category_more_if_exists"] = 41000, ["Module:Category_pair"] = 6100, ["Module:Category_see_also"] = 39000, ["Module:Celestial_object_quadrangle"] = 2300, ["Module:Check_DYK_hook"] = 114000, ["Module:Check_for_clobbered_parameters"] = 1200000, ["Module:Check_for_deprecated_parameters"] = 59000, ["Module:Check_for_unknown_parameters"] = 17900000, ["Module:Check_isxn"] = 480000, ["Module:Check_winner_by_scores"] = 13000, ["Module:Checkuser"] = 75000, ["Module:Chem2"] = 4600, ["Module:Chem2/styles.css"] = 4600, ["Module:Citation/CS1"] = 5550000, ["Module:Citation/CS1/COinS"] = 5550000, ["Module:Citation/CS1/Configuration"] = 5550000, ["Module:Citation/CS1/Date_validation"] = 5550000, ["Module:Citation/CS1/Identifiers"] = 5550000, ["Module:Citation/CS1/Suggestions"] = 26000, ["Module:Citation/CS1/Utilities"] = 5550000, ["Module:Citation/CS1/Whitelist"] = 5550000, ["Module:Citation/CS1/styles.css"] = 5690000, ["Module:Cite_Q"] = 43000, ["Module:Cite_iucn"] = 57000, ["Module:Cite_tweet"] = 35000, ["Module:Cite_web"] = 39000, ["Module:Clade"] = 7500, ["Module:Class"] = 9610000, ["Module:Class/definition.json"] = 9610000, ["Module:Class/styles.css"] = 8850000, ["Module:Class_mask"] = 10200000, ["Module:Clickable_button_2"] = 956000, ["Module:Collapsible_list"] = 54000, ["Module:College_color"] = 127000, ["Module:College_color/data"] = 127000, ["Module:Color_contrast"] = 499000, ["Module:Color_contrast/colors"] = 501000, ["Module:Commons_link"] = 254000, ["Module:Complex_date"] = 65000, ["Module:Convert"] = 1230000, ["Module:Convert/data"] = 1230000, ["Module:Convert/helper"] = 8300, ["Module:Convert/text"] = 1230000, ["Module:Convert/wikidata"] = 3300, ["Module:Convert/wikidata/data"] = 3300, ["Module:ConvertNumeric"] = 15000, ["Module:Convert_character_width"] = 2800, ["Module:Convert_character_width/data"] = 2800, ["Module:Coordinates"] = 1330000, ["Module:Coordinates/styles.css"] = 1330000, ["Module:Copied"] = 18000, ["Module:CountryAdjectiveDemonym"] = 44000, ["Module:CountryAdjectiveDemonym/Adjectives"] = 44000, ["Module:CountryAdjectiveDemonym/Demonyms"] = 44000, ["Module:CountryAdjectiveDemonym/The"] = 44000, ["Module:CountryData"] = 142000, ["Module:CountryData/cacheA"] = 12000, ["Module:CountryData/cacheB"] = 8200, ["Module:CountryData/cacheC"] = 12000, ["Module:CountryData/cacheD"] = 4500, ["Module:CountryData/cacheE"] = 2800, ["Module:CountryData/cacheF"] = 2600, ["Module:CountryData/cacheG"] = 2700, ["Module:CountryData/summary"] = 142000, ["Module:Country_adjective"] = 4300, ["Module:Country_alias"] = 51000, ["Module:Country_alias/data"] = 51000, ["Module:Currency"] = 3500, ["Module:Currency/Presentation"] = 3500, } 657538c55d7dfefdb7bc51a9521fea093eca3e10 Module:Transclusion count/data/H 828 692 1373 2023-06-18T05:11:08Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["H-phrases"] = 3300, ["HABS"] = 2200, ["HAER"] = 2400, ["HDS"] = 4200, ["HD_color"] = 2800, ["HKG"] = 3100, ["HMAS"] = 6200, ["HMCS"] = 4600, ["HMM"] = 4500, ["HMS"] = 35000, ["HNLMS"] = 2100, ["HOUR"] = 2300, ["HRV"] = 5500, ["HUN"] = 11000, ["Hab"] = 12000, ["Hair_space"] = 10000, ["Hanging_indent"] = 5900, ["Hansard-contribs"] = 9300, ["Harv"] = 5800, ["Harvard_citation"] = 6000, ["Harvard_citation_no_brackets"] = 45000, ["Harvard_citation_text"] = 6000, ["Harvid"] = 63000, ["Harvnb"] = 44000, ["Harvp"] = 4100, ["Harvtxt"] = 5900, ["Has_short_description"] = 641000, ["Hat"] = 12000, ["Hatnote"] = 582000, ["Hatnote_inline"] = 4000, ["Hatnote_inline/invoke"] = 4000, ["Height"] = 98000, ["Help_me-helped"] = 14000, ["Helpbox"] = 2500, ["Helpbox/styles.css"] = 2500, ["Helpme-helped"] = 2100, ["Hidden"] = 362000, ["Hidden/FC"] = 3800, ["Hidden_archive_bottom"] = 12000, ["Hidden_archive_top"] = 12000, ["Hidden_begin"] = 406000, ["Hidden_begin/styles.css"] = 406000, ["Hidden_category"] = 6400, ["Hidden_end"] = 406000, ["Hidden_ping"] = 4000, ["Hidden_sort_key"] = 19000, ["High-Class"] = 15000, ["High-importance"] = 15000, ["High-use"] = 6000, ["Highlight"] = 6900, ["Highlight/core"] = 7100, ["Highlight_round"] = 3300, ["Hilite"] = 2700, ["Historic_Environment_Scotland"] = 2500, ["Historical"] = 25000, ["Historical_populations"] = 42000, ["History"] = 6900, ["History_icon"] = 9500, ["History_icon2"] = 9500, ["Hlist"] = 230000, ["Hlist/styles.css"] = 7950000, ["Hmbox"] = 24000, ["Hmmm"] = 13000, ["Hndis"] = 69000, ["HockeyDB"] = 2700, ["Hockeydb"] = 2600, ["Hong_Kong_English"] = 3400, ["Horizontal_TOC"] = 5800, ["Horizontal_TOC/styles.css"] = 5800, ["Horse_racing"] = 3500, ["HoursElapsed"] = 41000, ["Hours_elapsed"] = 41000, ["How_to_request_photo_in"] = 2400, ["Howtoreqphotoin"] = 2200, ["Hr"] = 6100, ["Hs"] = 19000, ["Hsp"] = 5800, ["Huge"] = 2400, ["Hugman"] = 7000, ["Human_name_disambiguation"] = 74000, ["Humor"] = 3200, ["Hurricane_season_bar"] = 2400, ["Hurricane_season_bar/button"] = 2400, ["Hurricane_season_bar/styles.css"] = 2400, ["Hurricane_status_small"] = 2400, ["Module:HTMLDecode"] = 652000, ["Module:Hatnote"] = 1800000, ["Module:Hatnote/styles.css"] = 1800000, ["Module:Hatnote_inline"] = 4000, ["Module:Hatnote_list"] = 1090000, ["Module:Hidden_ping"] = 4000, ["Module:High-use"] = 50000, ["Module:Highest_archive_number"] = 127000, ["Module:Historical_populations"] = 42000, ["Module:Hms"] = 235000, } c97ccb355afa051fd7087f2b62aa18e7d51effa7 Module:Transclusion count/data/I 828 356 702 2023-06-18T05:11:18Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["IAAF_name"] = 2200, ["IAST"] = 5900, ["IBDB_name"] = 9100, ["ICD10"] = 4600, ["ICD9"] = 4400, ["ICS"] = 2900, ["IDN"] = 3300, ["IMDb_episode"] = 9800, ["IMDb_episodes"] = 2500, ["IMDb_name"] = 152000, ["IMDb_title"] = 187000, ["IMO_Number"] = 4100, ["IMSLP"] = 8200, ["INA"] = 2100, ["IND"] = 7400, ["INR"] = 6200, ["INRConvert"] = 5500, ["INRConvert/CurrentRate"] = 5500, ["INRConvert/USD"] = 5500, ["INRConvert/out"] = 5500, ["IOC_profile"] = 5500, ["IP"] = 2600, ["IPA"] = 141000, ["IPA-all"] = 3600, ["IPA-de"] = 8000, ["IPA-es"] = 7900, ["IPA-fr"] = 44000, ["IPA-it"] = 5900, ["IPA-nl"] = 3700, ["IPA-pl"] = 4000, ["IPA-pt"] = 3600, ["IPA-ru"] = 2600, ["IPA-sh"] = 2700, ["IPA-sl"] = 6900, ["IPA-th"] = 2900, ["IPA_audio_link"] = 19000, ["IPA_link"] = 3400, ["IPAc-cmn"] = 2600, ["IPAc-en"] = 48000, ["IPAc-pl"] = 52000, ["IPC_athlete"] = 2800, ["IPSummary"] = 78000, ["IP_summary"] = 78000, ["IPtalk"] = 22000, ["IPuser"] = 6900, ["IPvandal"] = 2900, ["IRC"] = 7400, ["IRI"] = 2200, ["IRL"] = 5400, ["IRN"] = 3500, ["ISBN"] = 461000, ["ISBNT"] = 38000, ["ISBN_missing"] = 2400, ["ISFDB_name"] = 4100, ["ISFDB_title"] = 4500, ["ISL"] = 2100, ["ISO_15924/script-example-character"] = 2800, ["ISO_15924/wp-article"] = 2800, ["ISO_15924/wp-article/format"] = 2800, ["ISO_15924/wp-article/label"] = 2700, ["ISO_3166_code"] = 510000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 7900, ["ISP"] = 5400, ["ISR"] = 4700, ["ISSN"] = 12000, ["ISSN_link"] = 30000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 17000, ["ITF"] = 6100, ["ITF_profile"] = 9000, ["ITIS"] = 4400, ["ITN_talk"] = 9800, ["ITN_talk/date"] = 9800, ["IUCN_banner"] = 15000, ["I_sup"] = 4600, ["Iaaf_name"] = 7400, ["Ice_hockey"] = 19000, ["Ice_hockey_stats"] = 16000, ["Icehockeystats"] = 12000, ["Icon"] = 573000, ["If"] = 266000, ["If_all"] = 6300, ["If_between"] = 3700, ["If_both"] = 8950000, ["If_empty"] = 3620000, ["If_first_display_both"] = 73000, ["If_in_page"] = 8900, ["If_last_display_both"] = 30000, ["If_preview"] = 57000, ["If_then_show"] = 279000, ["Ifempty"] = 4000, ["Ifeq"] = 16000, ["Iferror_then_show"] = 3200, ["Ifexist_not_redirect"] = 1120000, ["Ifnotempty"] = 14000, ["Ifnumber"] = 34000, ["Ifsubst"] = 431000, ["Ih"] = 7500, ["Ill"] = 110000, ["Illm"] = 6800, ["Image_frame"] = 4900, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3500, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 278000, ["Image_requested"] = 171000, ["Image_requested/Category_helper"] = 163000, ["Imbox"] = 915000, ["Imdb_name"] = 5300, ["Imdb_title"] = 4200, ["Import_style"] = 11000, ["Import_style/inputbox.css"] = 11000, ["Importance"] = 5540000, ["Importance/colour"] = 5560000, ["Importance_mask"] = 8630000, ["Improve_categories"] = 7100, ["Improve_documentation"] = 2100, ["In_class"] = 5700, ["In_lang"] = 352000, ["In_progress"] = 3100, ["In_string"] = 72000, ["In_title"] = 19000, ["Inactive_WikiProject_banner"] = 216000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 29000, ["Incomplete_list"] = 23000, ["Inconclusive"] = 2100, ["Increase"] = 42000, ["Incumbent_pope"] = 4300, ["Indent"] = 4200, ["IndexFungorum"] = 2200, ["Indian_English"] = 4300, ["Indian_Rupee"] = 10000, ["Indian_railway_code"] = 3100, ["Inflation"] = 18000, ["Inflation-fn"] = 5300, ["Inflation-year"] = 4400, ["Inflation/IN/startyear"] = 5500, ["Inflation/UK"] = 4300, ["Inflation/UK/dataset"] = 4300, ["Inflation/UK/startyear"] = 4300, ["Inflation/US"] = 11000, ["Inflation/US/dataset"] = 12000, ["Inflation/US/startyear"] = 12000, ["Inflation/fn"] = 6100, ["Inflation/year"] = 23000, ["Info"] = 7200, ["Infobox"] = 3200000, ["Infobox/Columns"] = 2300, ["Infobox/mobileviewfix.css"] = 141000, ["Infobox3cols"] = 16000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5400, ["Infobox_Aircraft_Type"] = 4700, ["Infobox_Athletics_Championships"] = 2700, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2200, ["Infobox_COA_wide"] = 3100, ["Infobox_Canada_electoral_district"] = 2400, ["Infobox_Canadian_Football_League_biography"] = 5800, ["Infobox_Canadian_Football_League_biography/position"] = 5700, ["Infobox_Chinese"] = 20000, ["Infobox_Chinese/Chinese"] = 2700, ["Infobox_Chinese/Footer"] = 8700, ["Infobox_Chinese/Header"] = 8700, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_Election"] = 2200, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 2800, ["Infobox_Gaelic_games_player"] = 5000, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2000, ["Infobox_Greece_place"] = 2800, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2400, ["Infobox_Indian_constituency"] = 4500, ["Infobox_Indian_constituency/defaultdata"] = 4500, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_MLB_yearly"] = 3100, ["Infobox_NASCAR_race_report"] = 2100, ["Infobox_NCAA_team_season"] = 18000, ["Infobox_NFL_biography"] = 28000, ["Infobox_NFL_player"] = 7900, ["Infobox_NFL_season"] = 2500, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 72000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 4900, ["Infobox_Olympic_event"] = 7300, ["Infobox_Olympic_event/games_text"] = 7300, ["Infobox_Paralympic_event"] = 2600, ["Infobox_Paralympic_event/games_text"] = 2600, ["Infobox_Politician"] = 2200, ["Infobox_Romanian_subdivision"] = 3100, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4400, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 13000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 3000, ["Infobox_UK_place"] = 25000, ["Infobox_UK_place/NoDialCode"] = 7900, ["Infobox_UK_place/NoPostCode"] = 3000, ["Infobox_UK_place/area"] = 2300, ["Infobox_UK_place/dist"] = 2500, ["Infobox_UK_place/local"] = 25000, ["Infobox_UK_place/styles.css"] = 25000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3800, ["Infobox_US_Supreme_Court_case/courts"] = 3800, ["Infobox_Wikipedia_user"] = 9600, ["Infobox_YouTube_personality"] = 2600, ["Infobox_YouTube_personality/styles.css"] = 2600, ["Infobox_academic"] = 13000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2200, ["Infobox_aircraft_type"] = 12000, ["Infobox_airline"] = 4600, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 161000, ["Infobox_album/color"] = 190000, ["Infobox_album/link"] = 161000, ["Infobox_anatomy"] = 4400, ["Infobox_ancient_site"] = 5300, ["Infobox_animanga/Footer"] = 6700, ["Infobox_animanga/Header"] = 6700, ["Infobox_animanga/Print"] = 5400, ["Infobox_animanga/Video"] = 4600, ["Infobox_architect"] = 3600, ["Infobox_artist"] = 28000, ["Infobox_artist_discography"] = 5900, ["Infobox_artwork"] = 11000, ["Infobox_athlete"] = 3000, ["Infobox_automobile"] = 8400, ["Infobox_award"] = 13000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_basketball_biography"] = 21000, ["Infobox_basketball_biography/style"] = 21000, ["Infobox_basketball_club"] = 3000, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4300, ["Infobox_body_of_water"] = 18000, ["Infobox_book"] = 52000, ["Infobox_boxer"] = 5700, ["Infobox_bridge"] = 6000, ["Infobox_building"] = 27000, ["Infobox_character"] = 7700, ["Infobox_chess_biography"] = 3700, ["Infobox_chess_player"] = 3000, ["Infobox_church"] = 14000, ["Infobox_church/denomination"] = 14000, ["Infobox_church/font_color"] = 14000, ["Infobox_civil_conflict"] = 2300, ["Infobox_civilian_attack"] = 5300, ["Infobox_college_coach"] = 11000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_sports_team_season"] = 39000, ["Infobox_college_sports_team_season/link"] = 39000, ["Infobox_college_sports_team_season/name"] = 39000, ["Infobox_college_sports_team_season/succession"] = 39000, ["Infobox_college_sports_team_season/team"] = 39000, ["Infobox_comic_book_title"] = 2900, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 83000, ["Infobox_computing_device"] = 2300, ["Infobox_concert"] = 3200, ["Infobox_constituency"] = 5100, ["Infobox_country"] = 6300, ["Infobox_country/formernext"] = 5900, ["Infobox_country/imagetable"] = 5200, ["Infobox_country/multirow"] = 8100, ["Infobox_country/status_text"] = 2700, ["Infobox_country/styles.css"] = 6300, ["Infobox_country_at_games"] = 15000, ["Infobox_country_at_games/core"] = 15000, ["Infobox_country_at_games/see_also"] = 12000, ["Infobox_court_case"] = 4600, ["Infobox_court_case/images"] = 2400, ["Infobox_cricket_tournament"] = 2300, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7400, ["Infobox_criminal"] = 6200, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4400, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5500, ["Infobox_designation_list"] = 19000, ["Infobox_designation_list/entry"] = 17000, ["Infobox_dim"] = 6900, ["Infobox_dim/core"] = 6900, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 9500, ["Infobox_drug/chemical_formula"] = 9500, ["Infobox_drug/data_page_link"] = 9500, ["Infobox_drug/formatATC"] = 9400, ["Infobox_drug/formatCASnumber"] = 9500, ["Infobox_drug/formatChEBI"] = 9500, ["Infobox_drug/formatChEMBL"] = 9500, ["Infobox_drug/formatChemDBNIAID"] = 9500, ["Infobox_drug/formatChemSpider"] = 9500, ["Infobox_drug/formatCompTox"] = 9500, ["Infobox_drug/formatDrugBank"] = 9500, ["Infobox_drug/formatIUPHARBPS"] = 9500, ["Infobox_drug/formatJmol"] = 9500, ["Infobox_drug/formatKEGG"] = 9500, ["Infobox_drug/formatPDBligand"] = 8800, ["Infobox_drug/formatPubChemCID"] = 9500, ["Infobox_drug/formatPubChemSID"] = 9500, ["Infobox_drug/formatUNII"] = 9500, ["Infobox_drug/legal_status"] = 9600, ["Infobox_drug/licence"] = 9500, ["Infobox_drug/maintenance_categories"] = 9500, ["Infobox_drug/non-ref-space"] = 3900, ["Infobox_drug/pregnancy_category"] = 9500, ["Infobox_drug/title"] = 9500, ["Infobox_election"] = 29000, ["Infobox_election/row"] = 29000, ["Infobox_election/shortname"] = 27000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7200, ["Infobox_event"] = 5200, ["Infobox_family"] = 2100, ["Infobox_figure_skater"] = 4200, ["Infobox_film"] = 154000, ["Infobox_film/short_description"] = 150000, ["Infobox_film_awards"] = 2600, ["Infobox_film_awards/link"] = 2600, ["Infobox_film_awards/style"] = 2600, ["Infobox_food"] = 6800, ["Infobox_football_biography"] = 205000, ["Infobox_football_club"] = 27000, ["Infobox_football_club_season"] = 20000, ["Infobox_football_league"] = 2500, ["Infobox_football_league_season"] = 19000, ["Infobox_football_match"] = 5800, ["Infobox_football_tournament_season"] = 8000, ["Infobox_former_subdivision"] = 3300, ["Infobox_former_subdivision/styles.css"] = 3300, ["Infobox_galaxy"] = 2000, ["Infobox_game"] = 2400, ["Infobox_game_score"] = 3400, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4000, ["Infobox_golfer"] = 4400, ["Infobox_golfer/highest_ranking"] = 4400, ["Infobox_government_agency"] = 10000, ["Infobox_government_cabinet"] = 2500, ["Infobox_gridiron_football_person"] = 2500, ["Infobox_gridiron_football_person/position"] = 5700, ["Infobox_gymnast"] = 3400, ["Infobox_handball_biography"] = 4900, ["Infobox_historic_site"] = 11000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6200, ["Infobox_hospital/care_system"] = 6200, ["Infobox_hospital/lists"] = 6200, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3000, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5700, ["Infobox_islands"] = 8700, ["Infobox_islands/area"] = 9100, ["Infobox_islands/density"] = 9100, ["Infobox_islands/length"] = 8700, ["Infobox_islands/styles.css"] = 8700, ["Infobox_journal"] = 9700, ["Infobox_journal/Abbreviation_search"] = 9600, ["Infobox_journal/Bluebook_check"] = 9300, ["Infobox_journal/Former_check"] = 9300, ["Infobox_journal/ISO_4_check"] = 9300, ["Infobox_journal/ISSN-eISSN"] = 9400, ["Infobox_journal/Indexing_search"] = 9500, ["Infobox_journal/MathSciNet_check"] = 9300, ["Infobox_journal/NLM_check"] = 9300, ["Infobox_journal/frequency"] = 8500, ["Infobox_lake"] = 4400, ["Infobox_language"] = 9500, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6500, ["Infobox_language/linguistlist"] = 9500, ["Infobox_language/ref"] = 7100, ["Infobox_legislature"] = 3600, ["Infobox_library"] = 2100, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 4800, ["Infobox_magazine"] = 7500, ["Infobox_manner_of_address"] = 3300, ["Infobox_mapframe"] = 78000, ["Infobox_martial_artist"] = 5600, ["Infobox_martial_artist/record"] = 5600, ["Infobox_medal_templates"] = 419000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8200, ["Infobox_military_conflict"] = 21000, ["Infobox_military_installation"] = 9700, ["Infobox_military_person"] = 44000, ["Infobox_military_unit"] = 26000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_mountain"] = 28000, ["Infobox_multi-sport_competition_event"] = 2300, ["Infobox_museum"] = 10000, ["Infobox_musical_artist"] = 121000, ["Infobox_musical_artist/color"] = 121000, ["Infobox_musical_artist/hCard_class"] = 311000, ["Infobox_musical_composition"] = 2800, ["Infobox_name"] = 7400, ["Infobox_name_module"] = 6700, ["Infobox_newspaper"] = 9600, ["Infobox_nobility"] = 2400, ["Infobox_noble"] = 7200, ["Infobox_officeholder"] = 214000, ["Infobox_officeholder/office"] = 219000, ["Infobox_official_post"] = 7900, ["Infobox_organization"] = 36000, ["Infobox_pageant_titleholder"] = 2800, ["Infobox_park"] = 7300, ["Infobox_person"] = 465000, ["Infobox_person/Wikidata"] = 4900, ["Infobox_person/height"] = 101000, ["Infobox_person/length"] = 7000, ["Infobox_person/weight"] = 66000, ["Infobox_philosopher"] = 3300, ["Infobox_planet"] = 4700, ["Infobox_play"] = 3800, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3000, ["Infobox_prepared_food"] = 3100, ["Infobox_professional_wrestler"] = 4200, ["Infobox_professional_wrestling_event"] = 2600, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5500, ["Infobox_racing_driver"] = 3700, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 2900, ["Infobox_rail_line"] = 7200, ["Infobox_rail_line/tracking"] = 7200, ["Infobox_rail_service"] = 2900, ["Infobox_rail_service/doc"] = 2900, ["Infobox_reality_competition_season"] = 3400, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6300, ["Infobox_religious_biography"] = 5000, ["Infobox_religious_building"] = 12000, ["Infobox_religious_building/color"] = 17000, ["Infobox_restaurant"] = 2400, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 23000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 21000, ["Infobox_royalty/short_description"] = 13000, ["Infobox_rugby_biography"] = 16000, ["Infobox_rugby_biography/correct_date"] = 16000, ["Infobox_rugby_biography/depcheck"] = 15000, ["Infobox_rugby_league_biography"] = 9900, ["Infobox_rugby_league_biography/PLAYER"] = 9800, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 4900, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5600, ["Infobox_school_district/styles.css"] = 5600, ["Infobox_scientist"] = 48000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 558000, ["Infobox_settlement/areadisp"] = 233000, ["Infobox_settlement/columns"] = 93000, ["Infobox_settlement/columns/styles.css"] = 93000, ["Infobox_settlement/densdisp"] = 430000, ["Infobox_settlement/impus"] = 81000, ["Infobox_settlement/lengthdisp"] = 168000, ["Infobox_settlement/link"] = 93000, ["Infobox_settlement/metric"] = 207000, ["Infobox_settlement/pref"] = 288000, ["Infobox_settlement/styles.css"] = 558000, ["Infobox_ship_begin"] = 41000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 40000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3400, ["Infobox_short_story"] = 2300, ["Infobox_skier"] = 2500, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 75000, ["Infobox_song/color"] = 75000, ["Infobox_song/link"] = 75000, ["Infobox_spaceflight"] = 3500, ["Infobox_spaceflight/styles.css"] = 3500, ["Infobox_sport_event"] = 2100, ["Infobox_sports_competition_event"] = 16000, ["Infobox_sports_competition_event/medalrow"] = 11000, ["Infobox_sports_league"] = 4900, ["Infobox_sports_season"] = 5300, ["Infobox_sports_team"] = 2200, ["Infobox_sportsperson"] = 105000, ["Infobox_stadium"] = 3600, ["Infobox_station"] = 55000, ["Infobox_station/doc"] = 55000, ["Infobox_station/services"] = 55000, ["Infobox_station/styles.css"] = 55000, ["Infobox_street"] = 3300, ["Infobox_swimmer"] = 9300, ["Infobox_television"] = 56000, ["Infobox_television/Short_description"] = 54000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 12000, ["Infobox_television_episode/styles.css"] = 12000, ["Infobox_television_season"] = 9300, ["Infobox_television_station"] = 3700, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2400, ["Infobox_tennis_tournament_event"] = 18000, ["Infobox_tennis_tournament_year"] = 9000, ["Infobox_tennis_tournament_year/color"] = 27000, ["Infobox_tennis_tournament_year/footer"] = 27000, ["Infobox_train"] = 2300, ["Infobox_union"] = 2100, ["Infobox_university"] = 26000, ["Infobox_user"] = 2600, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 27000, ["Infobox_video_game/styles.css"] = 27000, ["Infobox_volleyball_biography"] = 5200, ["Infobox_weapon"] = 7200, ["Infobox_website"] = 7700, ["Infobox_writer"] = 38000, ["Information"] = 104000, ["Information/styles.css"] = 104000, ["Inprogress"] = 2300, ["Input_link"] = 32000, ["Instagram"] = 10000, ["Interlanguage_link"] = 147000, ["Interlanguage_link_multi"] = 19000, ["Internet_Archive_author"] = 18000, ["Internet_Archive_film"] = 2500, ["Intitle"] = 12000, ["Invalid_SVG"] = 3800, ["Invalid_SVG/styles.css"] = 3800, ["Iptalk"] = 21000, ["IranCensus2006"] = 50000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 50000, ["Irc"] = 2100, ["Irish_place_name"] = 2600, ["IsIPAddress"] = 41000, ["IsValidPageName"] = 138000, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6100, ["Is_italic_taxon"] = 471000, ["Is_redirect"] = 26000, ["Isbn"] = 7300, ["Isfdb_name"] = 3800, ["Isfdb_title"] = 4400, ["Isnumeric"] = 205000, ["Iso2continent"] = 35000, ["Iso2country"] = 23000, ["Iso2country/article"] = 22000, ["Iso2country/data"] = 23000, ["Iso2nationality"] = 221000, ["Issubst"] = 72000, ["Isu_name"] = 2300, ["Italic_dab2"] = 5100, ["Italic_title"] = 284000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3700, ["Italictitle"] = 4300, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 122000, ["Ivory_messagebox"] = 138000, ["Module:I18n/complex_date"] = 65000, ["Module:IP"] = 129000, ["Module:IPA_symbol"] = 4700, ["Module:IPA_symbol/data"] = 4700, ["Module:IPAc-en"] = 48000, ["Module:IPAc-en/data"] = 48000, ["Module:IPAc-en/phonemes"] = 48000, ["Module:IPAc-en/pronunciation"] = 48000, ["Module:IPAddress"] = 190000, ["Module:ISO_3166"] = 1020000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2500, ["Module:ISO_3166/data/CN"] = 2100, ["Module:ISO_3166/data/DE"] = 14000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6400, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 28000, ["Module:ISO_3166/data/IR"] = 5000, ["Module:ISO_3166/data/National"] = 1020000, ["Module:ISO_3166/data/PL"] = 5700, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 24000, ["Module:ISO_3166/data/US"] = 84000, ["Module:ISO_639_name"] = 20000, ["Module:ISOdate"] = 65000, ["Module:Icon"] = 574000, ["Module:Icon/data"] = 574000, ["Module:If_empty"] = 3620000, ["Module:If_in_page"] = 8900, ["Module:If_preview"] = 543000, ["Module:If_preview/configuration"] = 543000, ["Module:If_preview/styles.css"] = 543000, ["Module:Import_style"] = 11000, ["Module:In_lang"] = 352000, ["Module:Indent"] = 4200, ["Module:Infobox"] = 4060000, ["Module:Infobox/dates"] = 66000, ["Module:Infobox/styles.css"] = 4310000, ["Module:Infobox3cols"] = 294000, ["Module:InfoboxImage"] = 4360000, ["Module:Infobox_body_of_water_tracking"] = 18000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 398000, ["Module:Infobox_military_conflict"] = 21000, ["Module:Infobox_military_conflict/styles.css"] = 21000, ["Module:Infobox_multi-lingual_name"] = 20000, ["Module:Infobox_multi-lingual_name/data"] = 20000, ["Module:Infobox_power_station"] = 3000, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 24000, ["Module:Infobox_road/route"] = 25000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 56000, ["Module:Infobox_television_disambiguation_check"] = 63000, ["Module:Infobox_television_episode"] = 12000, ["Module:Infobox_television_season_disambiguation_check"] = 8800, ["Module:Infobox_television_season_name"] = 9300, ["Module:Internet_Archive"] = 18000, ["Module:IrelandByCountyCatNav"] = 3200, ["Module:Is_infobox_in_lead"] = 375000, ["Module:Is_instance"] = 332000, ["Module:Italic_title"] = 1100000, ["Module:Italic_title2"] = 5100, } 330b94440e4c77bbe4d439bfe081f8bb9c2b6f7e Module:Transclusion count/data/M 828 704 1397 2023-06-18T05:11:58Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["M"] = 2000, ["MAD"] = 2100, ["MAR"] = 2800, ["MAS"] = 2500, ["MDG"] = 2300, ["MEX"] = 6100, ["MILHIST"] = 13000, ["MINUTE"] = 2300, ["MKD"] = 2300, ["MLB_Farm_System"] = 2100, ["MLB_Year"] = 14000, ["MLB_standings"] = 3700, ["MLBplayer"] = 3900, ["MMA_record_start"] = 3600, ["MMArecordbox"] = 3600, ["MMSI_Number"] = 3100, ["MONTH"] = 12000, ["MONTHNAME"] = 812000, ["MONTHNUMBER"] = 829000, ["MS"] = 5100, ["MV"] = 8800, ["MYS"] = 3600, ["MacTutor"] = 2000, ["Main"] = 336000, ["Main_article"] = 29000, ["Main_other"] = 9460000, ["Main_page_image"] = 25000, ["Main_page_image/DYK"] = 8800, ["Main_page_image/ITN/styles.css"] = 2400, ["Main_page_image/TFA"] = 4600, ["Maintenance_category"] = 38000, ["Malay_name"] = 2200, ["Map_requested"] = 9400, ["Map_requested/Category_helper"] = 7700, ["Maplink"] = 27000, ["Maplink-road"] = 5400, ["Marriage"] = 70000, ["Marriage/doc"] = 69000, ["Marriage/styles.css"] = 70000, ["Math"] = 9400, ["MathGenealogy"] = 6900, ["MathWorld"] = 2400, ["Mathgenealogy"] = 2100, ["Maths_rating"] = 20000, ["Max"] = 240000, ["Maybe_free_media"] = 12000, ["Mbox"] = 2820000, ["Mdash"] = 8600, ["MeSH_name"] = 6100, ["Medal"] = 111000, ["MedalBottom"] = 17000, ["MedalBronze"] = 53000, ["MedalComp"] = 2000, ["MedalCompetition"] = 86000, ["MedalCount"] = 3100, ["MedalCountry"] = 77000, ["MedalGold"] = 52000, ["MedalOlympic"] = 4000, ["MedalOlympics"] = 6100, ["MedalSilver"] = 52000, ["MedalSport"] = 76000, ["MedalTableTop"] = 17000, ["MedalTop"] = 4100, ["MedalWorldChampionships"] = 2100, ["MedalistTable"] = 15000, ["Medals_table"] = 14000, ["Media"] = 2600, ["Medical_resources"] = 6700, ["Merge_done"] = 3300, ["Merge_partner"] = 2300, ["Merged-from"] = 16000, ["Merged-to"] = 18000, ["Merged_to"] = 2200, ["MeshName"] = 5900, ["Metacritic_film"] = 4100, ["Metadata_Population_DE-BY"] = 2100, ["Metadata_Population_DE-RP"] = 2300, ["Mhof"] = 7200, ["Mid-Class"] = 15000, ["Mid-importance"] = 15000, ["Middot"] = 8100, ["Midsize"] = 2000, ["MilHist"] = 3900, ["Military_navigation"] = 83000, ["Min"] = 21000, ["Minor_planet"] = 5000, ["Minor_planet_link"] = 2700, ["Minor_planet_list_link"] = 4200, ["Minor_planets_navigator"] = 3200, ["MirrorH"] = 5300, ["Missing_information"] = 3500, ["Mlby"] = 14000, ["Mobile_IP"] = 8800, ["MobyGames"] = 8600, ["Moby_game"] = 6900, ["Mod"] = 15000, ["Module_other"] = 3500, ["Mojo_title"] = 7800, ["Molecular_formula_index"] = 2300, ["Monday"] = 2600, ["Mono"] = 30000, ["Mono/styles.css"] = 31000, ["MonthCategoryNav"] = 34000, ["MonthlyArchive"] = 3400, ["MonthlyLinks"] = 3400, ["Monthly_archive_list"] = 3400, ["Monthly_clean-up_category"] = 16000, ["Monthly_clean-up_category/core"] = 16000, ["Monthly_clean-up_category/monthname"] = 16000, ["Monthly_clean-up_category/monthno"] = 16000, ["Monthly_clean-up_category/name_part"] = 16000, ["Monthly_clean-up_category/outer_core"] = 16000, ["Monthly_clean-up_category/to_add"] = 2700, ["Monthly_clean_up_category"] = 7300, ["Monthyear"] = 77000, ["Monthyear-1"] = 76000, ["MoreInfo"] = 2000, ["More_citations_needed"] = 365000, ["More_citations_needed_section"] = 16000, ["More_footnotes"] = 37000, ["More_footnotes_needed"] = 52000, ["More_plot"] = 2200, ["More_references"] = 3200, ["Moresources"] = 5800, ["Motorcycling"] = 3200, ["Motorsport_season"] = 4900, ["Motorsport_season/styles.css"] = 4900, ["Moved_discussion_from"] = 2800, ["Moved_discussion_to"] = 2500, ["Mp"] = 5000, ["Mpl"] = 2700, ["MultiReplace"] = 209000, ["Multiple_image"] = 49000, ["Multiple_image/styles.css"] = 49000, ["Multiple_issues"] = 123000, ["Multiple_issues/styles.css"] = 123000, ["Music"] = 7500, ["MusicBrainz_artist"] = 2100, ["MusicBrainz_meta"] = 4800, ["Music_ratings"] = 95000, ["Mvar"] = 6700, ["Mw_lang"] = 78000, ["My"] = 2500, ["My_sandbox"] = 3800, ["Myprefs"] = 10000, ["Module:MLB_standings"] = 3700, ["Module:MLB_standings/data"] = 3700, ["Module:Main_page_image"] = 14000, ["Module:Mapframe"] = 422000, ["Module:Math"] = 1550000, ["Module:Medals_table"] = 14000, ["Module:Message_box"] = 9280000, ["Module:Message_box/ambox.css"] = 3030000, ["Module:Message_box/cmbox.css"] = 415000, ["Module:Message_box/configuration"] = 9280000, ["Module:Message_box/fmbox.css"] = 19000, ["Module:Message_box/imbox.css"] = 922000, ["Module:Message_box/ombox.css"] = 1500000, ["Module:Message_box/tmbox.css"] = 12000000, ["Module:Military_navigation"] = 83000, ["Module:Minor_planet_list_link"] = 4200, ["Module:MultiReplace"] = 811000, ["Module:Multiple_image"] = 49000, ["Module:Music_ratings"] = 95000, ["Module:Mw_lang"] = 78000, } 3ae42d38a64ececef60094d9370b9e1f0f5f81bf Module:Transclusion count/data/N 828 715 1419 2023-06-18T05:12:08Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["N"] = 16000, ["N.b."] = 2200, ["N/A"] = 23000, ["N/a"] = 53000, ["NA-Class"] = 14000, ["NASTRO_comment"] = 30000, ["NBA_Draft_template_list"] = 3400, ["NBA_Year"] = 5500, ["NBA_color"] = 3600, ["NBA_color_cell"] = 4300, ["NBA_color_cell2"] = 3400, ["NBA_player_statistics_legend"] = 4200, ["NBA_player_statistics_start"] = 3800, ["NBbox"] = 3400, ["NCAA_color_cell"] = 9600, ["NCAA_secondary_color_cell"] = 4100, ["NCES_District_ID"] = 2600, ["NED"] = 9600, ["NEXTYEAR"] = 7800, ["NFLAltPrimaryStyle"] = 5800, ["NFLPrimaryColor"] = 2200, ["NFLPrimaryStyle"] = 28000, ["NFLSecondaryColor"] = 19000, ["NFL_Roster_navbox_template_list"] = 2600, ["NFL_Year"] = 23000, ["NFL_predraft"] = 5800, ["NFL_predraft/check"] = 5800, ["NFL_predraft/ftin"] = 5800, ["NFLplayer"] = 2100, ["NFT"] = 6800, ["NFT_player"] = 30000, ["NGA"] = 3200, ["NGR"] = 2300, ["NHLE"] = 18000, ["NHLS_url"] = 2200, ["NLD"] = 11000, ["NLM_content"] = 2800, ["NOINDEX"] = 450000, ["NOMIS2011"] = 2300, ["NOR"] = 9400, ["NRDB_species"] = 6900, ["NRHP-PA"] = 2600, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 76000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3300, ["NRHP_navigation_box"] = 8300, ["NRHP_row"] = 3400, ["NRHP_style"] = 70000, ["NRHP_url"] = 29000, ["NRHP_url/core"] = 31000, ["NRISref"] = 73000, ["NSWcity"] = 2100, ["NSWcity/core"] = 2100, ["NUMBEROFSECTIONS"] = 4400, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3100, ["NZL"] = 6700, ["NZ_electorate_link"] = 2300, ["Na"] = 2400, ["Nac"] = 2700, ["Namespace_detect"] = 569000, ["Namespace_detect_showall"] = 9800, ["Nastaliq"] = 10000, ["Nat_fs_end"] = 2400, ["National_Film_Awards/style"] = 2000, ["National_Heritage_List_for_England"] = 22000, ["National_Rail_style"] = 5700, ["National_Register_of_Historic_Places"] = 29000, ["National_Register_of_Historic_Places_in_Massachusetts"] = 4400, ["National_Register_of_Historic_Places_in_New_York"] = 5600, ["National_Register_of_Historic_Places_in_North_Carolina"] = 2900, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3200, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3300, ["National_field_hockey_squad"] = 4000, ["National_football_squad_end"] = 2900, ["National_football_squad_start/styles.css"] = 2400, ["National_rugby_union_team"] = 3600, ["National_squad"] = 41000, ["National_squad_no_numbers"] = 17000, ["Native_name"] = 16000, ["Native_name_checker"] = 80000, ["Naval"] = 2900, ["Naval/core"] = 2900, ["Navbar"] = 38000, ["Navbar-collapsible"] = 3600, ["Navbar-header"] = 16000, ["Navbar-header/styles.css"] = 16000, ["Navbox"] = 3050000, ["Navbox_GR_munic"] = 3500, ["Navbox_Musical_artist"] = 9700, ["Navbox_bottom"] = 15000, ["Navbox_decade_list"] = 11000, ["Navbox_ice_hockey"] = 3100, ["Navbox_musical_artist"] = 220000, ["Navbox_musical_artist/color"] = 220000, ["Navbox_rugby_league_squad"] = 4900, ["Navbox_season_by_team"] = 3100, ["Navbox_top"] = 15000, ["Navbox_with_collapsible_groups"] = 131000, ["Navbox_with_collapsible_sections"] = 2300, ["Navbox_with_columns"] = 24000, ["Navboxes"] = 55000, ["Navboxes_colour"] = 5200, ["Navseasoncats"] = 479000, ["Navseasoncats_with_centuries_below_decade"] = 6700, ["Navseasoncats_with_decades_below_year"] = 18000, ["Navsource"] = 2500, ["Navy"] = 19000, ["Navy/core"] = 19000, ["Nay"] = 19000, ["Nbay"] = 5500, ["Nbsp"] = 482000, ["Nbsp_to_space"] = 20000, ["Ndash"] = 20000, ["Nee"] = 9100, ["NeilBrownPlayers"] = 3100, ["New_user_bar"] = 57000, ["Newbot"] = 4200, ["Next_period"] = 21000, ["Nfly"] = 2200, ["Nihongo"] = 102000, ["Nihongo2"] = 12000, ["Nihongo_foot"] = 2600, ["No"] = 8300, ["No."] = 14000, ["No2"] = 10000, ["NoSpam"] = 3900, ["NoSpamEmail"] = 17000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2300, ["No_footnotes"] = 51000, ["No_ping"] = 377000, ["No_plot"] = 6100, ["No_redirect"] = 563000, ["No_spam"] = 258000, ["No_wrap"] = 2300, ["Nobold"] = 383000, ["Nobold/styles.css"] = 383000, ["Nobr"] = 4700, ["Nobreak"] = 28000, ["Nochange"] = 2400, ["Noindex"] = 4800, ["Noitalic"] = 4500, ["Noitalic/styles.css"] = 4500, ["Nom"] = 40000, ["Nominated"] = 7100, ["Non-English-language_text_category"] = 2500, ["Non-admin_closure"] = 2800, ["Non-diffusing_subcategory"] = 14000, ["Non-free_2D_art"] = 7200, ["Non-free_3D_art"] = 2500, ["Non-free_album_cover"] = 202000, ["Non-free_audio_sample"] = 8400, ["Non-free_biog-pic"] = 25000, ["Non-free_book_cover"] = 55000, ["Non-free_character"] = 2400, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 17000, ["Non-free_fair_use_in"] = 14000, ["Non-free_film_poster"] = 24000, ["Non-free_film_screenshot"] = 5000, ["Non-free_game_cover"] = 7500, ["Non-free_game_screenshot"] = 4600, ["Non-free_historic_image"] = 16000, ["Non-free_image_data"] = 8600, ["Non-free_image_rationale"] = 9700, ["Non-free_in_US"] = 2100, ["Non-free_logo"] = 161000, ["Non-free_magazine_cover"] = 7700, ["Non-free_media"] = 730000, ["Non-free_media_data"] = 9800, ["Non-free_media_rationale"] = 11000, ["Non-free_movie_poster"] = 22000, ["Non-free_newspaper_image"] = 2000, ["Non-free_poster"] = 80000, ["Non-free_promotional"] = 8800, ["Non-free_school_logo"] = 2400, ["Non-free_seal"] = 4400, ["Non-free_symbol"] = 6100, ["Non-free_television_screenshot"] = 16000, ["Non-free_title-card"] = 5700, ["Non-free_use_rationale"] = 461000, ["Non-free_use_rationale/styles.css"] = 682000, ["Non-free_use_rationale_2"] = 211000, ["Non-free_use_rationale_album_cover"] = 135000, ["Non-free_use_rationale_book_cover"] = 19000, ["Non-free_use_rationale_logo"] = 94000, ["Non-free_use_rationale_poster"] = 51000, ["Non-free_use_rationale_title-card"] = 2700, ["Non-free_use_rationale_video_cover"] = 5800, ["Non-free_use_rationale_video_game_cover"] = 10000, ["Non-free_video_cover"] = 16000, ["Non-free_video_game_cover"] = 21000, ["Non-free_video_game_cover/platform"] = 21000, ["Non-free_video_game_screenshot"] = 10000, ["Non-free_video_game_screenshot/platform"] = 9600, ["Non-free_with_NC"] = 2700, ["Non-free_with_permission"] = 2100, ["Nonspecific"] = 2200, ["Nonumtoc"] = 2700, ["Nonumtoc/styles.css"] = 2700, ["Noping"] = 367000, ["Noprint"] = 2900, ["Noredirect"] = 8300, ["Normal"] = 5900, ["Normalwraplink"] = 3500, ["NorthAmNative"] = 2000, ["North_America_topic"] = 3600, ["Northern_Ireland_tasks"] = 19000, ["Nospam"] = 21000, ["Not-PD-US-expired-min-year"] = 26000, ["Not_a_ballot"] = 7700, ["Not_a_forum"] = 7700, ["Not_a_typo"] = 11000, ["Not_around"] = 2900, ["Not_done"] = 20000, ["Notability"] = 63000, ["Notavote"] = 2100, ["Notdone"] = 5500, ["Note"] = 25000, ["NoteFoot"] = 3900, ["NoteTag"] = 4000, ["Note_label"] = 9000, ["Notelist"] = 184000, ["Notelist-lr"] = 3500, ["Notelist-ua"] = 6700, ["Notes"] = 6300, ["Noteslist"] = 3600, ["Notice"] = 113000, ["NovelsWikiProject"] = 19000, ["Nowiki_="] = 2300, ["Nowrap"] = 837000, ["Np"] = 2900, ["Npby"] = 2500, ["Nq"] = 3700, ["Nrut"] = 3600, ["Ns"] = 2600, ["Ns0"] = 107000, ["Ns_has_subpages"] = 2180000, ["Nts"] = 20000, ["Ntsh"] = 3300, ["Number_of_defined_parameters"] = 4800, ["Number_table_sorting"] = 34000, ["Number_table_sorting_hidden"] = 3300, ["Numero"] = 3600, ["Nutshell"] = 3900, ["Nw="] = 2300, ["Module:NUMBEROFSECTIONS"] = 4400, ["Module:Namespace_detect"] = 15900000, ["Module:Namespace_detect/config"] = 17000000, ["Module:Namespace_detect/data"] = 17000000, ["Module:National_squad"] = 54000, ["Module:Native_name"] = 92000, ["Module:Navbar"] = 5420000, ["Module:Navbar/configuration"] = 5420000, ["Module:Navbar/styles.css"] = 4770000, ["Module:Navbox"] = 4420000, ["Module:Navbox/configuration"] = 4420000, ["Module:Navbox/styles.css"] = 4420000, ["Module:Navbox_ice_hockey"] = 3100, ["Module:Navbox_top_and_bottom"] = 15000, ["Module:Navbox_with_collapsible_groups"] = 139000, ["Module:Navboxes"] = 55000, ["Module:Navseasoncats"] = 479000, ["Module:Nihongo"] = 104000, ["Module:No_ping"] = 448000, ["Module:Noinclude"] = 674000, ["Module:Ns_has_subpages"] = 2180000, ["Module:Number_table_sorting"] = 37000, } 1e9cc3519086ceb72baeb4961f2afad864679e9c Module:Transclusion count/data/S 828 702 1393 2023-06-18T05:12:58Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["S"] = 3500, ["S-aca"] = 6300, ["S-ach"] = 16000, ["S-aft"] = 217000, ["S-aft/filter"] = 217000, ["S-bef"] = 222000, ["S-bef/filter"] = 222000, ["S-break"] = 5000, ["S-civ"] = 2600, ["S-dip"] = 5300, ["S-end"] = 245000, ["S-gov"] = 7800, ["S-hon"] = 3800, ["S-hou"] = 9400, ["S-inc"] = 13000, ["S-legal"] = 9300, ["S-mil"] = 12000, ["S-new"] = 15000, ["S-non"] = 9200, ["S-npo"] = 3900, ["S-off"] = 40000, ["S-par"] = 50000, ["S-par/en"] = 3200, ["S-par/gb"] = 3300, ["S-par/uk"] = 11000, ["S-par/us-hs"] = 11000, ["S-par/us-sen"] = 2000, ["S-ppo"] = 13000, ["S-prec"] = 3200, ["S-rail"] = 6300, ["S-rail-start"] = 6200, ["S-rail/lines"] = 6400, ["S-reg"] = 20000, ["S-rel"] = 18000, ["S-roy"] = 2700, ["S-s"] = 3600, ["S-sports"] = 10000, ["S-start"] = 238000, ["S-ttl"] = 228000, ["S-vac"] = 5900, ["SCO"] = 3700, ["SDcat"] = 5310000, ["SECOND"] = 2300, ["SGP"] = 2500, ["SIA"] = 2600, ["SIPA"] = 2500, ["SLO"] = 4200, ["SMS"] = 7100, ["SMU"] = 2100, ["SPI_archive_notice"] = 70000, ["SPIarchive_notice"] = 69000, ["SPIcat"] = 3800, ["SPIclose"] = 3300, ["SPIpriorcases"] = 64000, ["SR/Olympics_profile"] = 3200, ["SRB"] = 3600, ["SS"] = 20000, ["SSPa"] = 2600, ["STN"] = 12000, ["SUBJECTSPACE_formatted"] = 42000, ["SUI"] = 8400, ["SVG"] = 3300, ["SVG-Logo"] = 17000, ["SVG-Res"] = 15000, ["SVG-logo"] = 2900, ["SVK"] = 5900, ["SVN"] = 5100, ["SWE"] = 12000, ["Sandbox_other"] = 229000, ["Saturday"] = 2600, ["Saved_book"] = 52000, ["Sc"] = 2800, ["Scholia"] = 2700, ["School_block"] = 13000, ["School_disambiguation"] = 3300, ["Schoolblock"] = 6700, ["Schooldis"] = 2700, ["Schoolip"] = 10000, ["Scientist_icon"] = 15000, ["Scientist_icon2"] = 15000, ["Sclass"] = 31000, ["Sclass2"] = 9800, ["Screen_reader-only"] = 43000, ["Screen_reader-only/styles.css"] = 43000, ["Script"] = 5700, ["Script/Arabic"] = 2100, ["Script/Hebrew"] = 4700, ["Script/Nastaliq"] = 14000, ["Script/doc/id-unk"] = 2900, ["Script/doc/id-unk/core"] = 2900, ["Script/doc/id-unk/is-iso-alpha4"] = 2800, ["Script/doc/id-unk/name-to-alpha4"] = 2900, ["Script/styles.css"] = 3000, ["Script/styles_arabic.css"] = 2100, ["Script/styles_hebrew.css"] = 4700, ["Sdash"] = 3000, ["Search_box"] = 48000, ["Search_link"] = 9600, ["Section_link"] = 50000, ["Section_sizes"] = 2300, ["See"] = 11000, ["See_also"] = 181000, ["Seealso"] = 6600, ["Select_skin"] = 4200, ["Selected_article"] = 2700, ["Selected_picture"] = 2500, ["Self"] = 51000, ["Self-published_inline"] = 3800, ["Self-published_source"] = 6600, ["Self-reference"] = 2700, ["Self-reference_tool"] = 5000, ["Self/migration"] = 35000, ["Self2"] = 2200, ["Sent_off"] = 13000, ["Sentoff"] = 4100, ["Separated_entries"] = 173000, ["Sequence"] = 3700, ["Serial_killer_opentask"] = 3500, ["Series_overview"] = 7500, ["Serif"] = 2800, ["Set_category"] = 35000, ["Set_index_article"] = 5700, ["Sets_taxobox_colour"] = 94000, ["Sfn"] = 151000, ["SfnRef"] = 132000, ["Sfnm"] = 3400, ["Sfnp"] = 17000, ["Sfnref"] = 10000, ["Sfrac"] = 4100, ["Sfrac/styles.css"] = 4200, ["SharedIPEDU"] = 3400, ["Shared_IP"] = 11000, ["Shared_IP_advice"] = 16000, ["Shared_IP_corp"] = 5100, ["Shared_IP_edu"] = 127000, ["Shared_IP_gov"] = 3100, ["Sharedip"] = 3300, ["Sharedipedu"] = 3900, ["Sherdog"] = 2600, ["Ship"] = 85000, ["Ship/maintenancecategory"] = 85000, ["Ship_index"] = 7000, ["Shipboxflag"] = 19000, ["Shipboxflag/core"] = 19000, ["Shipwrecks_navbox_footer"] = 9900, ["Shipwrecks_navbox_footer/link"] = 9900, ["Short_description"] = 5420000, ["Short_description/lowercasecheck"] = 5420000, ["Short_pages_monitor"] = 10000, ["Short_pages_monitor/maximum_length"] = 10000, ["Shortcut"] = 19000, ["Should_be_SVG"] = 9200, ["Show_button"] = 2120000, ["Sic"] = 32000, ["Sica"] = 3000, ["Side_box"] = 1110000, ["Sidebar"] = 250000, ["Sidebar_games_events"] = 36000, ["Sidebar_person"] = 2300, ["Sidebar_person/styles.css"] = 2300, ["Sidebar_with_collapsible_lists"] = 92000, ["Sigfig"] = 3700, ["Significant_figures"] = 5000, ["Significant_figures/rnd"] = 4600, ["Signpost-subscription"] = 2100, ["Sildb_prim"] = 2000, ["Silver02"] = 16000, ["Silver2"] = 47000, ["Silver_medal"] = 5400, ["Similar_names"] = 2100, ["Single+double"] = 6600, ["Single+space"] = 14000, ["Single-innings_cricket_match"] = 3200, ["Single_chart"] = 37000, ["Single_chart/chartnote"] = 37000, ["Single_namespace"] = 198000, ["Singlechart"] = 20000, ["Singles"] = 41000, ["Sister-inline"] = 185000, ["Sister_project"] = 1030000, ["Sister_project_links"] = 10000, ["Sisterlinks"] = 2900, ["Skip_to_talk"] = 12000, ["Skip_to_talk/styles.css"] = 12000, ["Sky"] = 2700, ["Sky/styles.css"] = 2700, ["Slink"] = 12000, ["Small"] = 594000, ["Small_Solar_System_bodies"] = 3600, ["Smallcaps"] = 18000, ["Smallcaps/styles.css"] = 18000, ["Smallcaps_all"] = 2900, ["Smalldiv"] = 21000, ["Smaller"] = 72000, ["Smallsup"] = 20000, ["Smiley"] = 43000, ["Snd"] = 152000, ["Snds"] = 6300, ["Soccer_icon"] = 130000, ["Soccer_icon2"] = 130000, ["Soccer_icon4"] = 5100, ["Soccerbase"] = 13000, ["Soccerbase_season"] = 6700, ["Soccerway"] = 74000, ["Sock"] = 46000, ["Sock_list"] = 3700, ["Sockcat"] = 2000, ["Sockmaster"] = 9300, ["Sockpuppet"] = 235000, ["Sockpuppet/altmaster"] = 2000, ["Sockpuppet/categorise"] = 235000, ["SockpuppetCheckuser"] = 5500, ["Sockpuppet_category"] = 45000, ["Sockpuppet_category/confirmed"] = 23000, ["Sockpuppet_category/suspected"] = 22000, ["Sockpuppetcheckuser"] = 3600, ["Sockpuppeteer"] = 24000, ["Soft_redirect"] = 6100, ["Soft_redirect_protection"] = 8200, ["Softredirect"] = 3200, ["Solar_luminosity"] = 4400, ["Solar_mass"] = 5200, ["Solar_radius"] = 4200, ["Soldier_icon"] = 4000, ["Soldier_icon2"] = 4000, ["Song"] = 8300, ["Songs"] = 19000, ["Songs_category"] = 8200, ["Songs_category/core"] = 8200, ["Sort"] = 115000, ["Sortname"] = 51000, ["Source-attribution"] = 27000, ["Source_check"] = 966000, ["Sourcecheck"] = 966000, ["Sources"] = 2300, ["South_America_topic"] = 2500, ["Sp"] = 238000, ["Space"] = 55000, ["Space+double"] = 18000, ["Space+single"] = 13000, ["Spaced_en_dash"] = 184000, ["Spaced_en_dash_space"] = 6400, ["Spaced_ndash"] = 23000, ["Spaces"] = 2680000, ["Spain_metadata_Wikidata"] = 7500, ["Spamlink"] = 13000, ["Species_Latin_name_abbreviation_disambiguation"] = 2200, ["Species_list"] = 14000, ["Speciesbox"] = 286000, ["Speciesbox/getGenus"] = 286000, ["Speciesbox/getSpecies"] = 286000, ["Speciesbox/name"] = 286000, ["Speciesbox/parameterCheck"] = 286000, ["Speciesbox/trim"] = 286000, ["Specieslist"] = 5300, ["Split_article"] = 3600, ["Spnd"] = 4000, ["Sport_icon"] = 14000, ["Sport_icon2"] = 15000, ["SportsYearCatUSstate"] = 6400, ["SportsYearCatUSstate/core"] = 6400, ["Sports_links"] = 64000, ["Sports_reference"] = 7300, ["Squad_maintenance"] = 3400, ["Sronly"] = 41000, ["Srt"] = 4900, ["Stack"] = 25000, ["Stack/styles.css"] = 34000, ["Stack_begin"] = 8900, ["Stack_end"] = 8800, ["StaleIP"] = 3200, ["Standings_Table_End"] = 4400, ["Standings_Table_Entry"] = 4400, ["Standings_Table_Start"] = 4400, ["Standings_table_end"] = 53000, ["Standings_table_entry"] = 53000, ["Standings_table_entry/record"] = 53000, ["Standings_table_start"] = 53000, ["Standings_table_start/colheader"] = 53000, ["Standings_table_start/colspan"] = 53000, ["Starbox_astrometry"] = 5100, ["Starbox_begin"] = 5300, ["Starbox_catalog"] = 5200, ["Starbox_character"] = 5100, ["Starbox_detail"] = 5000, ["Starbox_end"] = 5200, ["Starbox_image"] = 2900, ["Starbox_observe"] = 5000, ["Starbox_reference"] = 5200, ["Start-Class"] = 121000, ["Start-date"] = 3800, ["Start_and_end_dates"] = 2600, ["Start_box"] = 8100, ["Start_date"] = 429000, ["Start_date_and_age"] = 136000, ["Start_date_and_years_ago"] = 6700, ["Start_of_course_timeline"] = 5900, ["Start_of_course_week"] = 6000, ["Start_tab"] = 4800, ["Startflatlist"] = 142000, ["Static_IP"] = 6000, ["Station"] = 7600, ["Station_link"] = 16000, ["Stdinchicite"] = 10000, ["Steady"] = 13000, ["Stl"] = 14000, ["Stn"] = 7200, ["Stn_art_lnk"] = 2000, ["Stnlnk"] = 30000, ["Storm_colour"] = 5100, ["Storm_path"] = 2100, ["StoryTeleplay"] = 3400, ["Str_endswith"] = 197000, ["Str_find"] = 114000, ["Str_index"] = 13000, ["Str_left"] = 11200000, ["Str_len"] = 18000, ["Str_letter"] = 174000, ["Str_letter/trim"] = 20000, ["Str_number"] = 8000, ["Str_number/trim"] = 141000, ["Str_rep"] = 310000, ["Str_right"] = 10300000, ["Str_trim"] = 5400, ["Str_≠_len"] = 33000, ["Str_≥_len"] = 70000, ["Strfind_short"] = 220000, ["Strikethrough"] = 15000, ["String_split"] = 2300, ["Strip_tags"] = 37000, ["Strong"] = 846000, ["Structurae"] = 2100, ["Stub-Class"] = 43000, ["Stub_Category"] = 13000, ["Stub_category"] = 18000, ["Stub_documentation"] = 36000, ["Student_editor"] = 27000, ["Student_sandbox"] = 4500, ["Student_table_row"] = 5100, ["Students_table"] = 5100, ["Su"] = 9700, ["Su-census1989"] = 4500, ["Sub"] = 4100, ["Subinfobox_bodystyle"] = 35000, ["Subject_bar"] = 18000, ["Suboff"] = 6100, ["Subon"] = 6200, ["Subpage_other"] = 280000, ["Subscription"] = 5800, ["Subscription_required"] = 34000, ["Subsidebar_bodystyle"] = 6500, ["Subst_only"] = 4500, ["Substituted_comment"] = 19000, ["Succession_box"] = 118000, ["Succession_links"] = 161000, ["Summer_Olympics_by_year_category_navigation"] = 2400, ["Summer_Olympics_by_year_category_navigation/core"] = 2400, ["Sunday"] = 2600, ["Sup"] = 58000, ["Superimpose2/base"] = 2100, ["Suppress_categories"] = 5100, ["Surname"] = 65000, ["Swiss_populations"] = 2400, ["Swiss_populations_NC"] = 3000, ["Swiss_populations_YM"] = 2300, ["Swiss_populations_ref"] = 2400, ["Switcher"] = 2400, ["Module:SDcat"] = 5310000, ["Module:SPI_archive_notice"] = 32000, ["Module:Science_redirect"] = 251000, ["Module:Science_redirect/conf"] = 251000, ["Module:Section_link"] = 50000, ["Module:Section_sizes"] = 3400, ["Module:See_also_if_exists"] = 72000, ["Module:Separated_entries"] = 2260000, ["Module:Series_overview"] = 7600, ["Module:Settlement_short_description"] = 707000, ["Module:Shortcut"] = 23000, ["Module:Shortcut/config"] = 23000, ["Module:Shortcut/styles.css"] = 23000, ["Module:Side_box"] = 1140000, ["Module:Side_box/styles.css"] = 1130000, ["Module:Sidebar"] = 333000, ["Module:Sidebar/configuration"] = 333000, ["Module:Sidebar/styles.css"] = 338000, ["Module:Sidebar_games_events"] = 36000, ["Module:Sidebar_games_events/styles.css"] = 36000, ["Module:Singles"] = 41000, ["Module:Sister_project_links"] = 14000, ["Module:Sister_project_links/bar/styles.css"] = 3200, ["Module:Sister_project_links/styles.css"] = 10000, ["Module:Sock_list"] = 3700, ["Module:Sort_title"] = 17000, ["Module:Sortkey"] = 195000, ["Module:Split_article"] = 3600, ["Module:Sports_career"] = 19000, ["Module:Sports_color"] = 68000, ["Module:Sports_color/baseball"] = 34000, ["Module:Sports_color/basketball"] = 22000, ["Module:Sports_color/ice_hockey"] = 3100, ["Module:Sports_rbr_table"] = 11000, ["Module:Sports_rbr_table/styles.css"] = 11000, ["Module:Sports_reference"] = 7300, ["Module:Sports_results"] = 14000, ["Module:Sports_results/styles.css"] = 9300, ["Module:Sports_table"] = 56000, ["Module:Sports_table/WDL"] = 49000, ["Module:Sports_table/WDL_OT"] = 2500, ["Module:Sports_table/WL"] = 3800, ["Module:Sports_table/argcheck"] = 56000, ["Module:Sports_table/styles.css"] = 56000, ["Module:Sports_table/sub"] = 57000, ["Module:Sports_table/totalscheck"] = 41000, ["Module:Stock_tickers/NYSE"] = 2100, ["Module:Storm_categories"] = 5100, ["Module:Storm_categories/categories"] = 5200, ["Module:Storm_categories/colors"] = 5100, ["Module:Storm_categories/icons"] = 5200, ["Module:String"] = 18700000, ["Module:String2"] = 2260000, ["Module:Su"] = 12000, ["Module:Subject_bar"] = 18000, ["Module:Suppress_categories"] = 5200, } aa85abf3f27208caa0afad91656cc53fe0fae8f7 Module:Transclusion count/data/U 828 700 1389 2023-06-18T05:13:19Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["U"] = 228000, ["U.S._Roads_WikiProject"] = 11000, ["UEFA_player"] = 4900, ["UK"] = 4400, ["UKR"] = 12000, ["UK_legislation"] = 2300, ["URL"] = 372000, ["URL2"] = 9900, ["URS"] = 7100, ["URY"] = 2100, ["US$"] = 11000, ["US50_Invite"] = 3700, ["USA"] = 40000, ["USBill"] = 2200, ["USCGC"] = 2600, ["USCongRep-end"] = 5000, ["USCongRep-row"] = 5400, ["USCongRep-start"] = 5000, ["USCongressOrdinal"] = 5900, ["USCongressOrdinal/code"] = 5900, ["USD"] = 4900, ["USGS_gazetteer"] = 11000, ["USNS"] = 2700, ["USN_flag"] = 10000, ["USRD"] = 5000, ["USS"] = 37000, ["USSR"] = 2200, ["USStat"] = 2200, ["US_Census_population"] = 38000, ["US_Census_population/styles.css"] = 38000, ["US_House_succession_box"] = 8700, ["US_State_Abbrev"] = 17000, ["US_county_navigation_box"] = 99000, ["US_government_sources"] = 2500, ["US_patent"] = 2800, ["US_state_navigation_box"] = 16000, ["UTRS"] = 7600, ["UTRS-unblock-user"] = 4900, ["UTZ"] = 2200, ["UZB"] = 2300, ["Ubl"] = 132000, ["Ublist"] = 4800, ["Ubx"] = 12000, ["Ucat"] = 38000, ["Ucfirstletter"] = 5200, ["Uir"] = 27000, ["Ul"] = 5500, ["Ulist"] = 6200, ["Umbox"] = 78000, ["Unassessed-Class"] = 10000, ["Unassessed_class"] = 2070000, ["Unblock-auto_reviewed"] = 5300, ["Unblock-spamun_reviewed"] = 2700, ["Unblock-un_reviewed"] = 16000, ["Unblock_reviewed"] = 66000, ["Unbulleted_list"] = 1200000, ["Uncategorized"] = 2700, ["Under_construction"] = 2400, ["Underline"] = 3600, ["Undisclosed_paid"] = 2900, ["Unindent"] = 4300, ["UnitedStatesCode"] = 3400, ["United_States_presidential_election_results_table_footer"] = 2900, ["United_States_presidential_election_results_table_header"] = 3200, ["United_States_presidential_election_results_table_row"] = 3200, ["United_States_topic"] = 5900, ["Unknown"] = 2600, ["Unknown-Class"] = 9900, ["Unlink"] = 21000, ["Unreferenced"] = 166000, ["Unreferenced_section"] = 35000, ["Unreferenced_stub"] = 2200, ["Unrelated"] = 5500, ["Unreliable_source?"] = 11000, ["Unreliable_sources"] = 8000, ["Unsourced"] = 5100, ["Update"] = 30000, ["Update_after"] = 5000, ["Update_inline"] = 5600, ["Update_inline_span"] = 2800, ["Update_section"] = 3800, ["Update_span"] = 2800, ["Updated"] = 55000, ["UploadCampaignLink"] = 2100, ["Uploader_information"] = 216000, ["Url"] = 86000, ["Use_American_English"] = 69000, ["Use_Australian_English"] = 124000, ["Use_Bangladeshi_English"] = 3000, ["Use_British_English"] = 255000, ["Use_Canadian_English"] = 37000, ["Use_Ghanaian_English"] = 2400, ["Use_Hiberno-English"] = 32000, ["Use_Hong_Kong_English"] = 4000, ["Use_Indian_English"] = 157000, ["Use_Irish_English"] = 18000, ["Use_Kenyan_English"] = 2400, ["Use_New_Zealand_English"] = 21000, ["Use_Nigerian_English"] = 4700, ["Use_Oxford_spelling"] = 2400, ["Use_Pakistani_English"] = 5600, ["Use_Philippine_English"] = 9400, ["Use_South_African_English"] = 7700, ["Use_dmy_dates"] = 1620000, ["Use_first_nonempty"] = 15000, ["Use_list-defined_references"] = 3500, ["Use_mdy_dates"] = 346000, ["Use_shortened_footnotes"] = 2200, ["User"] = 544000, ["User-generated_source"] = 5800, ["User-multi"] = 327000, ["User0"] = 15000, ["User19"] = 11000, ["User2"] = 3900, ["User21"] = 52000, ["User3"] = 237000, ["User4"] = 3200, ["User5"] = 6900, ["UserSummary"] = 114000, ["User_American"] = 2300, ["User_Copy_Edit"] = 2200, ["User_Firefox"] = 5900, ["User_HTML"] = 3000, ["User_OS:Dos/style.css"] = 2100, ["User_QAIbox"] = 5600, ["User_QAIbox/auto"] = 3600, ["User_Translator"] = 2300, ["User_UN"] = 2400, ["User_WP"] = 18000, ["User_WP/switch"] = 18000, ["User_Wikipedia"] = 2300, ["User_Wikipedia_reference"] = 2900, ["User_Wikipedian_For"] = 10000, ["User_Wikipedian_for"] = 15000, ["User_Wikipediholic"] = 2200, ["User_category_header"] = 2200, ["User_committed_identity"] = 2500, ["User_contrib"] = 5000, ["User_current_age"] = 2500, ["User_current_age/days"] = 2500, ["User_current_age/months"] = 2500, ["User_current_age/years"] = 2500, ["User_de"] = 5500, ["User_de-1"] = 7700, ["User_de-2"] = 4400, ["User_de-3"] = 2300, ["User_en"] = 39000, ["User_en-1"] = 2400, ["User_en-2"] = 7600, ["User_en-3"] = 15000, ["User_en-4"] = 8800, ["User_en-5"] = 6500, ["User_en-N"] = 4900, ["User_es"] = 3700, ["User_es-1"] = 7200, ["User_es-2"] = 4700, ["User_es-3"] = 2600, ["User_fr"] = 3800, ["User_fr-1"] = 9100, ["User_fr-2"] = 6400, ["User_fr-3"] = 3800, ["User_html"] = 2700, ["User_in_region"] = 27000, ["User_in_the_United_States"] = 4200, ["User_infobox"] = 3000, ["User_instrument"] = 2800, ["User_invitation"] = 5800, ["User_iso15924"] = 2300, ["User_iso15924/level-text"] = 2800, ["User_iso15924/user_script_catlink"] = 2700, ["User_it-1"] = 2800, ["User_ja-1"] = 2900, ["User_la-1"] = 2700, ["User_link"] = 232000, ["User_lives_in"] = 6900, ["User_male"] = 2200, ["User_oops"] = 2100, ["User_other"] = 582000, ["User_page"] = 44000, ["User_proud"] = 5000, ["User_rights"] = 4900, ["User_ru"] = 3000, ["User_ru-1"] = 2100, ["User_sandbox"] = 290000, ["User_summary"] = 114000, ["User_talk_other"] = 66000, ["User_time_zone"] = 4100, ["User_visited"] = 6400, ["User_wikipedia"] = 2000, ["User_wikipedia/RC_Patrol"] = 3700, ["User_wikipedia/Rollback"] = 2300, ["User_wikipedia/WikiGnome"] = 2700, ["User_wishes_to_visit"] = 6000, ["User_zh"] = 2200, ["Userbox"] = 297000, ["Userbox-2"] = 33000, ["Userbox-level"] = 101000, ["Userbox-r"] = 6100, ["UserboxCOI"] = 27000, ["Userbox_table_bottom"] = 11000, ["Userbox_table_category"] = 2400, ["Userbox_table_top"] = 11000, ["Userbox_table_userbox"] = 11000, ["Userboxbottom"] = 52000, ["Userboxtop"] = 56000, ["Usercheck-short"] = 3600, ["Userlinks"] = 28000, ["Userpage"] = 30000, ["Userpage_blanked"] = 8300, ["Userspace_draft"] = 41000, ["Usgs-gazetteer"] = 11000, ["Ushr"] = 15000, ["Ussc"] = 5100, ["Usurped"] = 5300, ["Utrs"] = 5200, ["Module:URL"] = 567000, ["Module:Unicode_data"] = 1400000, ["Module:Unicode_data/scripts"] = 475000, ["Module:Unstrip"] = 44000, ["Module:Unsubst"] = 12100000, ["Module:Unsubst-infobox"] = 189000, ["Module:Urldecode"] = 4300, ["Module:User"] = 544000, ["Module:UserLinks"] = 854000, ["Module:UserLinks/config"] = 854000, ["Module:UserLinks/extra"] = 23000, ["Module:UserLinks/shared"] = 854000, ["Module:User_contrib"] = 5000, ["Module:Userbox"] = 303000, ["Module:Uses_Wikidata"] = 3100, ["Module:Ustring"] = 695000, } adc4e25f4676a5238db7177f26ec7fe412ad180f Module:Transclusion count/data/Y 828 720 1429 2023-06-18T05:13:59Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["Y"] = 19000, ["YEAR"] = 75000, ["YUG"] = 2200, ["YYYY_beginnings_or_endings_category_header"] = 3900, ["YYYY_beginnings_or_endings_category_header/core"] = 3900, ["YYYY_crimes_in_countryname_category_header"] = 3200, ["YYYY_crimes_in_countryname_category_header/inner_core"] = 3200, ["YYYY_crimes_in_countryname_category_header/outer_core"] = 3200, ["YYYY_disasters_in_countryname_category_header"] = 2900, ["YYYY_disasters_in_countryname_category_header/inner_core"] = 2900, ["YYYY_disasters_in_countryname_category_header/outer_core"] = 2900, ["YYYY_elections_in_countryname_category_header"] = 3400, ["YYYY_elections_in_countryname_category_header/inner_core"] = 3400, ["YYYY_elections_in_countryname_category_header/outer_core"] = 3400, ["YYYY_in_nationality_sport_category_header"] = 12000, ["YYYY_in_nationality_sport_category_header/inner_core"] = 12000, ["YYYY_in_nationality_sport_category_header/outer_core"] = 12000, ["YYYY_in_nationality_women's_sport_category_header"] = 2000, ["YYYY_in_nationality_women's_sport_category_header/core"] = 2000, ["YYYY_in_sport_category_header"] = 6300, ["YYYY_in_sport_category_header/core"] = 6300, ["YYYY_in_sport_category_header/outer_core"] = 6300, ["Ya"] = 2800, ["Year"] = 4900, ["YearInCountryPortalBox"] = 89000, ["YearInCountryPortalBox/make"] = 89000, ["YearInCountryPortalBox/parse"] = 89000, ["Year_article"] = 6600, ["Year_category_header"] = 3200, ["Year_category_header/core"] = 3100, ["Year_category_name"] = 2500, ["Year_category_name/AD_year"] = 2500, ["Year_in_Europe"] = 5800, ["Year_in_Europe/expr"] = 5800, ["Year_in_US_state_category"] = 9500, ["Year_in_US_state_category/core"] = 9500, ["Year_in_continent/expr"] = 8200, ["Year_in_continent/link"] = 8200, ["Year_in_continent_category"] = 3700, ["Year_in_continent_category/core"] = 3700, ["Year_in_country_category"] = 39000, ["Year_in_country_category/inner_core"] = 39000, ["Year_in_country_category/outer_core"] = 39000, ["Year_in_football"] = 2500, ["Year_in_nationality_television_category"] = 3200, ["Year_in_nationality_television_category/core"] = 3200, ["Year_in_region"] = 13000, ["Year_in_region/link"] = 13000, ["Year_in_various_calendars"] = 2800, ["Year_nationality_television_series_debuts_or_endings_category"] = 4800, ["Year_nationality_television_series_debuts_or_endings_category/core"] = 4800, ["Year_nav"] = 2800, ["Year_nav_topic"] = 7000, ["Year_nav_topic5"] = 6600, ["Yearly_archive_list"] = 693000, ["Yearly_archive_list/display"] = 693000, ["Years_or_months_ago"] = 76000, ["Yel"] = 14000, ["Yellow_card"] = 14000, ["Yes"] = 9800, ["Yes2"] = 10000, ["YesNo-Yes"] = 58000, ["Yesno"] = 13700000, ["Yesno-no"] = 2050000, ["Yesno-yes"] = 11000000, ["Yo"] = 17000, ["You've_got_mail"] = 10000, ["YouTube"] = 59000, ["Youtube"] = 3600, ["Yy"] = 11000, ["Yycat"] = 2400, ["Yyend"] = 10000, ["Yytop"] = 11000, ["Module:Year_category_type"] = 3200, ["Module:Year_in_various_calendars"] = 2800, ["Module:Yesno"] = 27500000, ["Module:YouTubeSubscribers"] = 2600, } 8bddc898df7c3af0fd82656359cce002eab2aafd Module:Coordinates 828 606 1200 2023-06-21T17:33:40Z wikipedia>Ladsgroup 0 Switch from proto-relative urls (//foo.bar.com) to HTTPS (https://foo.bar.com). Since we are only serving https in Wikimedia now, it always outputs https links. At the same time, proto-relative add two duplicate rows to externallinks table meaning this is adding tens of millions of extra and useless rows bloating the table Scribunto text/plain --[[ This module is intended to replace the functionality of {{Coord}} and related templates. It provides several methods, including {{#invoke:Coordinates | coord }} : General function formatting and displaying coordinate values. {{#invoke:Coordinates | dec2dms }} : Simple function for converting decimal degree values to DMS format. {{#invoke:Coordinates | dms2dec }} : Simple function for converting DMS format to decimal degree format. {{#invoke:Coordinates | link }} : Export the link used to reach the tools ]] require('strict') local math_mod = require("Module:Math") local coordinates = {}; local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true); local current_page = mw.title.getCurrentTitle() local page_name = mw.uri.encode( current_page.prefixedText, 'WIKI' ); local coord_link = 'https://geohack.toolforge.org/geohack.php?pagename=' .. page_name .. '&params=' --[[ Helper function, replacement for {{coord/display/title}} ]] local function displaytitle(coords) return mw.getCurrentFrame():extensionTag{ name = 'indicator', args = { name = 'coordinates' }, content = '<span id="coordinates">[[Geographic coordinate system|Coordinates]]: ' .. coords .. '</span>' } end --[[ Helper function, used in detecting DMS formatting ]] local function dmsTest(first, second) if type(first) ~= 'string' or type(second) ~= 'string' then return nil end local s = (first .. second):upper() return s:find('^[NS][EW]$') or s:find('^[EW][NS]$') end --[[ Wrapper function to grab args, see Module:Arguments for this function's documentation. ]] local function makeInvokeFunc(funcName) return function (frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Coord' }) return coordinates[funcName](args, frame) end end --[[ Helper function, handle optional args. ]] local function optionalArg(arg, supplement) return arg and arg .. supplement or '' end --[[ Formats any error messages generated for display ]] local function errorPrinter(errors) local result = "" for i,v in ipairs(errors) do result = result .. '<strong class="error">Coordinates: ' .. v[2] .. '</strong><br />' end return result end --[[ Determine the required CSS class to display coordinates Usually geo-nondefault is hidden by CSS, unless a user has overridden this for himself default is the mode as specificied by the user when calling the {{coord}} template mode is the display mode (dec or dms) that we will need to determine the css class for ]] local function displayDefault(default, mode) if default == "" then default = "dec" end if default == mode then return "geo-default" else return "geo-nondefault" end end --[[ specPrinter Output formatter. Takes the structure generated by either parseDec or parseDMS and formats it for inclusion on Wikipedia. ]] local function specPrinter(args, coordinateSpec) local uriComponents = coordinateSpec["param"] if uriComponents == "" then -- RETURN error, should never be empty or nil return "ERROR param was empty" end if args["name"] then uriComponents = uriComponents .. "&title=" .. mw.uri.encode(coordinateSpec["name"]) end local geodmshtml = '<span class="geo-dms" title="Maps, aerial photos, and other data for this location">' .. '<span class="latitude">' .. coordinateSpec["dms-lat"] .. '</span> ' .. '<span class="longitude">' ..coordinateSpec["dms-long"] .. '</span>' .. '</span>' local lat = tonumber( coordinateSpec["dec-lat"] ) or 0 local geodeclat if lat < 0 then -- FIXME this breaks the pre-existing precision geodeclat = tostring(coordinateSpec["dec-lat"]):sub(2) .. "°S" else geodeclat = (coordinateSpec["dec-lat"] or 0) .. "°N" end local long = tonumber( coordinateSpec["dec-long"] ) or 0 local geodeclong if long < 0 then -- FIXME does not handle unicode minus geodeclong = tostring(coordinateSpec["dec-long"]):sub(2) .. "°W" else geodeclong = (coordinateSpec["dec-long"] or 0) .. "°E" end local geodechtml = '<span class="geo-dec" title="Maps, aerial photos, and other data for this location">' .. geodeclat .. ' ' .. geodeclong .. '</span>' local geonumhtml = '<span class="geo">' .. coordinateSpec["dec-lat"] .. '; ' .. coordinateSpec["dec-long"] .. '</span>' local inner = '<span class="' .. displayDefault(coordinateSpec["default"], "dms" ) .. '">' .. geodmshtml .. '</span>' .. '<span class="geo-multi-punct">&#xfeff; / &#xfeff;</span>' .. '<span class="' .. displayDefault(coordinateSpec["default"], "dec" ) .. '">'; if not args["name"] then inner = inner .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span></span>' else inner = inner .. '<span class="vcard">' .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span>' .. '<span style="display:none">&#xfeff; (<span class="fn org">' .. args["name"] .. '</span>)</span></span></span>' end local stylesheetLink = 'Module:Coordinates' .. ( isSandbox and '/sandbox' or '' ) .. '/styles.css' return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = stylesheetLink } } .. '<span class="plainlinks nourlexpansion">[' .. coord_link .. uriComponents .. ' ' .. inner .. ']</span>' end --[[ Helper function, convert decimal to degrees ]] local function convert_dec2dms_d(coordinate) local d = math_mod._round( coordinate, 0 ) .. "°" return d .. "" end --[[ Helper function, convert decimal to degrees and minutes ]] local function convert_dec2dms_dm(coordinate) coordinate = math_mod._round( coordinate * 60, 0 ); local m = coordinate % 60; coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°" return d .. string.format( "%02d′", m ) end --[[ Helper function, convert decimal to degrees, minutes, and seconds ]] local function convert_dec2dms_dms(coordinate) coordinate = math_mod._round( coordinate * 60 * 60, 0 ); local s = coordinate % 60 coordinate = math.floor( (coordinate - s) / 60 ); local m = coordinate % 60 coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°" return d .. string.format( "%02d′", m ) .. string.format( "%02d″", s ) end --[[ Helper function, convert decimal latitude or longitude to degrees, minutes, and seconds format based on the specified precision. ]] local function convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) local coord = tonumber(coordinate) local postfix if coord >= 0 then postfix = firstPostfix else postfix = secondPostfix end precision = precision:lower(); if precision == "dms" then return convert_dec2dms_dms( math.abs( coord ) ) .. postfix; elseif precision == "dm" then return convert_dec2dms_dm( math.abs( coord ) ) .. postfix; elseif precision == "d" then return convert_dec2dms_d( math.abs( coord ) ) .. postfix; end end --[[ Convert DMS format into a N or E decimal coordinate ]] local function convert_dms2dec(direction, degrees_str, minutes_str, seconds_str) local degrees = tonumber(degrees_str) local minutes = tonumber(minutes_str) or 0 local seconds = tonumber(seconds_str) or 0 local factor = 1 if direction == "S" or direction == "W" then factor = -1 end local precision = 0 if seconds_str then precision = 5 + math.max( math_mod._precision(seconds_str), 0 ); elseif minutes_str and minutes_str ~= '' then precision = 3 + math.max( math_mod._precision(minutes_str), 0 ); else precision = math.max( math_mod._precision(degrees_str), 0 ); end local decimal = factor * (degrees+(minutes+seconds/60)/60) return string.format( "%." .. precision .. "f", decimal ) -- not tonumber since this whole thing is string based. end --[[ Checks input values to for out of range errors. ]] local function validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, source, strong ) local errors = {}; lat_d = tonumber( lat_d ) or 0; lat_m = tonumber( lat_m ) or 0; lat_s = tonumber( lat_s ) or 0; long_d = tonumber( long_d ) or 0; long_m = tonumber( long_m ) or 0; long_s = tonumber( long_s ) or 0; if strong then if lat_d < 0 then table.insert(errors, {source, "latitude degrees < 0 with hemisphere flag"}) end if long_d < 0 then table.insert(errors, {source, "longitude degrees < 0 with hemisphere flag"}) end --[[ #coordinates is inconsistent about whether this is an error. If globe: is specified, it won't error on this condition, but otherwise it will. For not simply disable this check. if long_d > 180 then table.insert(errors, {source, "longitude degrees > 180 with hemisphere flag"}) end ]] end if lat_d > 90 then table.insert(errors, {source, "latitude degrees > 90"}) end if lat_d < -90 then table.insert(errors, {source, "latitude degrees < -90"}) end if lat_m >= 60 then table.insert(errors, {source, "latitude minutes >= 60"}) end if lat_m < 0 then table.insert(errors, {source, "latitude minutes < 0"}) end if lat_s >= 60 then table.insert(errors, {source, "latitude seconds >= 60"}) end if lat_s < 0 then table.insert(errors, {source, "latitude seconds < 0"}) end if long_d >= 360 then table.insert(errors, {source, "longitude degrees >= 360"}) end if long_d <= -360 then table.insert(errors, {source, "longitude degrees <= -360"}) end if long_m >= 60 then table.insert(errors, {source, "longitude minutes >= 60"}) end if long_m < 0 then table.insert(errors, {source, "longitude minutes < 0"}) end if long_s >= 60 then table.insert(errors, {source, "longitude seconds >= 60"}) end if long_s < 0 then table.insert(errors, {source, "longitude seconds < 0"}) end return errors; end --[[ parseDec Transforms decimal format latitude and longitude into the structure to be used in displaying coordinates ]] local function parseDec( lat, long, format ) local coordinateSpec = {} local errors = {} if not long then return nil, {{"parseDec", "Missing longitude"}} elseif not tonumber(long) then return nil, {{"parseDec", "Longitude could not be parsed as a number: " .. long}} end errors = validate( lat, nil, nil, long, nil, nil, 'parseDec', false ); coordinateSpec["dec-lat"] = lat; coordinateSpec["dec-long"] = long; local mode = coordinates.determineMode( lat, long ); coordinateSpec["dms-lat"] = convert_dec2dms( lat, "N", "S", mode) -- {{coord/dec2dms|{{{1}}}|N|S|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} coordinateSpec["dms-long"] = convert_dec2dms( long, "E", "W", mode) -- {{coord/dec2dms|{{{2}}}|E|W|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dec" end return coordinateSpec, errors end --[[ parseDMS Transforms degrees, minutes, seconds format latitude and longitude into the a structure to be used in displaying coordinates ]] local function parseDMS( lat_d, lat_m, lat_s, lat_f, long_d, long_m, long_s, long_f, format ) local coordinateSpec, errors, backward = {}, {} lat_f = lat_f:upper(); long_f = long_f:upper(); -- Check if specified backward if lat_f == 'E' or lat_f == 'W' then lat_d, long_d, lat_m, long_m, lat_s, long_s, lat_f, long_f, backward = long_d, lat_d, long_m, lat_m, long_s, lat_s, long_f, lat_f, true; end errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS', true ); if not long_d then return nil, {{"parseDMS", "Missing longitude" }} elseif not tonumber(long_d) then return nil, {{"parseDMS", "Longitude could not be parsed as a number:" .. long_d }} end if not lat_m and not lat_s and not long_m and not long_s and #errors == 0 then if math_mod._precision( lat_d ) > 0 or math_mod._precision( long_d ) > 0 then if lat_f:upper() == 'S' then lat_d = '-' .. lat_d; end if long_f:upper() == 'W' then long_d = '-' .. long_d; end return parseDec( lat_d, long_d, format ); end end coordinateSpec["dms-lat"] = lat_d.."°"..optionalArg(lat_m,"′") .. optionalArg(lat_s,"″") .. lat_f coordinateSpec["dms-long"] = long_d.."°"..optionalArg(long_m,"′") .. optionalArg(long_s,"″") .. long_f coordinateSpec["dec-lat"] = convert_dms2dec(lat_f, lat_d, lat_m, lat_s) -- {{coord/dms2dec|{{{4}}}|{{{1}}}|0{{{2}}}|0{{{3}}}}} coordinateSpec["dec-long"] = convert_dms2dec(long_f, long_d, long_m, long_s) -- {{coord/dms2dec|{{{8}}}|{{{5}}}|0{{{6}}}|0{{{7}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dms" end return coordinateSpec, errors, backward end --[[ Check the input arguments for coord to determine the kind of data being provided and then make the necessary processing. ]] local function formatTest(args) local result, errors local backward, primary = false, false local function getParam(args, lim) local ret = {} for i = 1, lim do ret[i] = args[i] or '' end return table.concat(ret, '_') end if not args[1] then -- no lat logic return errorPrinter( {{"formatTest", "Missing latitude"}} ) elseif not tonumber(args[1]) then -- bad lat logic return errorPrinter( {{"formatTest", "Unable to parse latitude as a number:" .. args[1]}} ) elseif not args[4] and not args[5] and not args[6] then -- dec logic result, errors = parseDec(args[1], args[2], args.format) if not result then return errorPrinter(errors); end -- formatting for geohack: geohack expects D_N_D_E notation or D;D notation -- wikiminiatlas doesn't support D;D notation -- #coordinates parserfunction doesn't support negative decimals with NSWE result.param = table.concat({ math.abs(tonumber(args[1])), ((tonumber(args[1]) or 0) < 0) and 'S' or 'N', math.abs(tonumber(args[2])), ((tonumber(args[2]) or 0) < 0) and 'W' or 'E', args[3] or ''}, '_') elseif dmsTest(args[4], args[8]) then -- dms logic result, errors, backward = parseDMS(args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args.format) if args[10] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 9) elseif dmsTest(args[3], args[6]) then -- dm logic result, errors, backward = parseDMS(args[1], args[2], nil, args[3], args[4], args[5], nil, args[6], args['format']) if args[8] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 7) elseif dmsTest(args[2], args[4]) then -- d logic result, errors, backward = parseDMS(args[1], nil, nil, args[2], args[3], nil, nil, args[4], args.format) if args[6] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 5) else -- Error return errorPrinter({{"formatTest", "Unknown argument format"}}) .. '[[Category:Pages with malformed coordinate tags]]' end result.name = args.name local extra_param = {'dim', 'globe', 'scale', 'region', 'source', 'type'} for _, v in ipairs(extra_param) do if args[v] then table.insert(errors, {'formatTest', 'Parameter: "' .. v .. '=" should be "' .. v .. ':"' }) end end local ret = specPrinter(args, result) if #errors > 0 then ret = ret .. ' ' .. errorPrinter(errors) .. '[[Category:Pages with malformed coordinate tags]]' end return ret, backward end --[[ Generate Wikidata tracking categories. ]] local function makeWikidataCategories(qid) local ret local qid = qid or mw.wikibase.getEntityIdForCurrentPage() if mw.wikibase and current_page.namespace == 0 then if qid and mw.wikibase.entityExists(qid) and mw.wikibase.getBestStatements(qid, "P625") and mw.wikibase.getBestStatements(qid, "P625")[1] then local snaktype = mw.wikibase.getBestStatements(qid, "P625")[1].mainsnak.snaktype if snaktype == 'value' then -- coordinates exist both here and on Wikidata, and can be compared. ret = 'Coordinates on Wikidata' elseif snaktype == 'somevalue' then ret = 'Coordinates on Wikidata set to unknown value' elseif snaktype == 'novalue' then ret = 'Coordinates on Wikidata set to no value' end else -- We have to either import the coordinates to Wikidata or remove them here. ret = 'Coordinates not on Wikidata' end end if ret then return string.format('[[Category:%s]]', ret) else return '' end end --[[ link Simple function to export the coordinates link for other uses. Usage: {{#invoke:Coordinates | link }} ]] function coordinates.link(frame) return coord_link; end --[[ dec2dms Wrapper to allow templates to call dec2dms directly. Usage: {{#invoke:Coordinates | dec2dms | decimal_coordinate | positive_suffix | negative_suffix | precision }} decimal_coordinate is converted to DMS format. If positive, the positive_suffix is appended (typical N or E), if negative, the negative suffix is appended. The specified precision is one of 'D', 'DM', or 'DMS' to specify the level of detail to use. ]] coordinates.dec2dms = makeInvokeFunc('_dec2dms') function coordinates._dec2dms(args) local coordinate = args[1] local firstPostfix = args[2] or '' local secondPostfix = args[3] or '' local precision = args[4] or '' return convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) end --[[ Helper function to determine whether to use D, DM, or DMS format depending on the precision of the decimal input. ]] function coordinates.determineMode( value1, value2 ) local precision = math.max( math_mod._precision( value1 ), math_mod._precision( value2 ) ); if precision <= 0 then return 'd' elseif precision <= 2 then return 'dm'; else return 'dms'; end end --[[ dms2dec Wrapper to allow templates to call dms2dec directly. Usage: {{#invoke:Coordinates | dms2dec | direction_flag | degrees | minutes | seconds }} Converts DMS values specified as degrees, minutes, seconds too decimal format. direction_flag is one of N, S, E, W, and determines whether the output is positive (i.e. N and E) or negative (i.e. S and W). ]] coordinates.dms2dec = makeInvokeFunc('_dms2dec') function coordinates._dms2dec(args) local direction = args[1] local degrees = args[2] local minutes = args[3] local seconds = args[4] return convert_dms2dec(direction, degrees, minutes, seconds) end --[[ coord Main entry point for Lua function to replace {{coord}} Usage: {{#invoke:Coordinates | coord }} {{#invoke:Coordinates | coord | lat | long }} {{#invoke:Coordinates | coord | lat | lat_flag | long | long_flag }} ... Refer to {{coord}} documentation page for many additional parameters and configuration options. Note: This function provides the visual display elements of {{coord}}. In order to load coordinates into the database, the {{#coordinates:}} parser function must also be called, this is done automatically in the Lua version of {{coord}}. ]] coordinates.coord = makeInvokeFunc('_coord') function coordinates._coord(args) if not tonumber(args[1]) and not args[2] then args[3] = args[1]; args[1] = nil local entity = mw.wikibase.getEntityObject(args.qid) if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1].mainsnak.snaktype == 'value' then local precision = entity.claims.P625[1].mainsnak.datavalue.value.precision args[1] = entity.claims.P625[1].mainsnak.datavalue.value.latitude args[2] = entity.claims.P625[1].mainsnak.datavalue.value.longitude if precision then precision = -math_mod._round(math.log(precision)/math.log(10),0) args[1] = math_mod._round(args[1],precision) args[2] = math_mod._round(args[2],precision) end end end local contents, backward = formatTest(args) local Notes = args.notes or '' local Display = args.display and args.display:lower() or 'inline' -- it and ti are short for inline,title and title,inline local function isInline(s) -- Finds whether coordinates are displayed inline. return s:find('inline') ~= nil or s == 'i' or s == 'it' or s == 'ti' end local function isInTitle(s) -- Finds whether coordinates are displayed in the title. return s:find('title') ~= nil or s == 't' or s == 'it' or s == 'ti' end local function coord_wrapper(in_args) -- Calls the parser function {{#coordinates:}}. return mw.getCurrentFrame():callParserFunction('#coordinates', in_args) or '' end local text = '' if isInline(Display) then text = text .. '<span class="geo-inline">' .. contents .. Notes .. '</span>' end if isInTitle(Display) then -- Add to output since indicator content is invisible to Lua later on if not isInline(Display) then text = text .. '<span class="geo-inline-hidden noexcerpt">' .. contents .. Notes .. '</span>' end text = text .. displaytitle(contents .. Notes) .. makeWikidataCategories(args.qid) end if not args.nosave then local page_title, count = mw.title.getCurrentTitle(), 1 if backward then local tmp = {} while not string.find((args[count-1] or ''), '[EW]') do tmp[count] = (args[count] or ''); count = count+1 end tmp.count = count; count = 2*(count-1) while count >= tmp.count do table.insert(tmp, 1, (args[count] or '')); count = count-1 end for i, v in ipairs(tmp) do args[i] = v end else while count <= 9 do args[count] = (args[count] or ''); count = count+1 end end if isInTitle(Display) and not page_title.isTalkPage and page_title.subpageText ~= 'doc' and page_title.subpageText ~= 'testcases' then args[10] = 'primary' end args.notes, args.format, args.display = nil text = text .. coord_wrapper(args) end return text end --[[ coord2text Extracts a single value from a transclusion of {{Coord}}. IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED. Usage: {{#invoke:Coordinates | coord2text | {{Coord}} | parameter }} Valid values for the second parameter are: lat (signed integer), long (signed integer), type, scale, dim, region, globe, source ]] function coordinates._coord2text(coord,type) if coord == '' or type == '' or not type then return nil end type = mw.text.trim(type) if type == 'lat' or type == 'long' then local result, negative = mw.text.split((mw.ustring.match(coord,'[%.%d]+°[NS] [%.%d]+°[EW]') or ''), ' ') if type == 'lat' then result, negative = result[1], 'S' else result, negative = result[2], 'W' end result = mw.text.split(result, '°') if result[2] == negative then result[1] = '-'..result[1] end return result[1] else return mw.ustring.match(coord, 'params=.-_' .. type .. ':(.-)[ _]') end end function coordinates.coord2text(frame) return coordinates._coord2text(frame.args[1],frame.args[2]) end --[[ coordinsert Injects some text into the Geohack link of a transclusion of {{Coord}} (if that text isn't already in the transclusion). Outputs the modified transclusion of {{Coord}}. IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED. Usage: {{#invoke:Coordinates | coordinsert | {{Coord}} | parameter:value | parameter:value | … }} Do not make Geohack unhappy by inserting something which isn't mentioned in the {{Coord}} documentation. ]] function coordinates.coordinsert(frame) -- for the 2nd or later integer parameter (the first is the coord template, as above) for i, v in ipairs(frame.args) do if i ~= 1 then -- if we cannot find in the coord_template the i_th coordinsert parameter e.g. region if not mw.ustring.find(frame.args[1], (mw.ustring.match(frame.args[i], '^(.-:)') or '')) then -- find from the params= up to the first possibly-present underscore -- and append the i_th coordinsert parameter and a space -- IDK why we're adding a space but it does seem somewhat convenient frame.args[1] = mw.ustring.gsub(frame.args[1], '(params=.-)_? ', '%1_'..frame.args[i]..' ') end end end if frame.args.name then -- if we can't find the vcard class if not mw.ustring.find(frame.args[1], '<span class="vcard">') then -- take something that looks like a coord template and add the vcard span with class and fn org class local namestr = frame.args.name frame.args[1] = mw.ustring.gsub( frame.args[1], '(<span class="geo%-default">)(<span[^<>]*>[^<>]*</span><span[^<>]*>[^<>]*<span[^<>]*>[^<>]*</span></span>)(</span>)', '%1<span class="vcard">%2<span style="display:none">&#xfeff; (<span class="fn org">' .. namestr .. '</span>)</span></span>%3' ) -- then find anything from coordinates parameters to the 'end' and attach the title parameter frame.args[1] = mw.ustring.gsub( frame.args[1], '(&params=[^&"<>%[%] ]*) ', '%1&title=' .. mw.uri.encode(namestr) .. ' ' ) end end -- replace the existing indicator with a new indicator using the modified content frame.args[1] = mw.ustring.gsub( frame.args[1], '(<span class="geo%-inline[^"]*">(.+)</span>)\127[^\127]*UNIQ%-%-indicator%-%x+%-%-?QINU[^\127]*\127', function (inline, coord) return inline .. displaytitle(coord) end ) return frame.args[1] end return coordinates 6162d7e98fcf6faab5809049e0a48bb3e67d88e3 Main Page 0 1 1 2023-06-22T16:29:50Z MediaWiki default 1 Create main page wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phab:|Phabricator]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 21236ac3f8d65e5563b6da6b70815ca6bf1e6616 4 1 2023-06-22T23:16:02Z Tasha04 2 wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblemn.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} e8a4b8efe55072187ab163fc5ff089a37d5918aa Template:CharacterIcon 10 2 2 2023-06-22T23:05:47Z Tasha04 2 Created page with "<includeonly><onlyinclude><div style="border:1px solid #808080; background:#E0E0E0; display:inline-block; text-align: center;"> <div>[[File:{{{icon}}}|{{{size}}}px|link={{{link}}}]]</div> <div style="font-size: 0.8em;">[[{{{link}}}|{{{name}}}]]</div> </div></onlyinclude></includeonly> == Example == <nowiki>{{CharacterIcon|name=Mona|link=Mona|icon=Mona Icon.png|size=128}}</nowiki> {{CharacterIcon|name=Mona|link=Mona|icon=Mona Icon.png|size=128}}" wikitext text/x-wiki <includeonly><onlyinclude><div style="border:1px solid #808080; background:#E0E0E0; display:inline-block; text-align: center;"> <div>[[File:{{{icon}}}|{{{size}}}px|link={{{link}}}]]</div> <div style="font-size: 0.8em;">[[{{{link}}}|{{{name}}}]]</div> </div></onlyinclude></includeonly> == Example == <nowiki>{{CharacterIcon|name=Mona|link=Mona|icon=Mona Icon.png|size=128}}</nowiki> {{CharacterIcon|name=Mona|link=Mona|icon=Mona Icon.png|size=128}} 9bb21dce256e7dc1f4bf8a1ea4405c371daec04e Template:CharacterIconGroup 10 3 3 2023-06-22T23:06:25Z Tasha04 2 Imported from OS-tans.moe, the other wiki I am on wikitext text/x-wiki <includeonly><onlyinclude><div style="text-align: center; padding: 8px;"> <div style="font-weight: bold;">{{{1}}}</div> <div> {{{2}}} </div> </div></onlyinclude></includeonly> == Example == <nowiki>{{CharacterIconGroup |[[:Category:Futaba Channel characters|Futaba]]/Legacy Windows OS-tans |{{CharacterIcon|name=3.1-tan|link=3.1-tan|icon=3.1-tan Icon.png|size=80}} {{CharacterIcon|name=95-tan|link=95-tan|icon=95-tan Icon.png|size=80}} {{CharacterIcon|name=98-tan|link=98-tan|icon=98-tan Icon.png|size=80}} {{CharacterIcon|name=98SE-tan|link=98SE-tan|icon=98SE-tan Icon.png|size=80}} {{CharacterIcon|name=Me-tan|link=Me-tan|icon=Me-tan Icon.png|size=80}} {{CharacterIcon|name=2K-tan|link=2K-tan|icon=2K-tan Icon.png|size=80}} {{CharacterIcon|name=XP-tan|link=XP-tan|icon=XP-tan Icon.png|size=80}}}}</nowiki> {{CharacterIconGroup |[[:Category:Futaba Channel characters|Futaba]]/Legacy Windows OS-tans |{{CharacterIcon|name=3.1-tan|link=3.1-tan|icon=3.1-tan Icon.png|size=80}} {{CharacterIcon|name=95-tan|link=95-tan|icon=95-tan Icon.png|size=80}} {{CharacterIcon|name=98-tan|link=98-tan|icon=98-tan Icon.png|size=80}} {{CharacterIcon|name=98SE-tan|link=98SE-tan|icon=98SE-tan Icon.png|size=80}} {{CharacterIcon|name=Me-tan|link=Me-tan|icon=Me-tan Icon.png|size=80}} {{CharacterIcon|name=2K-tan|link=2K-tan|icon=2K-tan Icon.png|size=80}} {{CharacterIcon|name=XP-tan|link=XP-tan|icon=XP-tan Icon.png|size=80}}}} 8000cfb4322838884f863fa6980447c31810f324 Main Page 0 1 5 4 2023-06-22T23:16:33Z Tasha04 2 wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblemn.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} ba2d6bdb620587922dedf8cd58964d873b2714e9 6 5 2023-06-22T23:21:47Z Tasha04 2 wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} d93cf885da53d0076a2ff2b1dd88805382997fcc 7 6 2023-06-22T23:32:15Z Tasha04 2 wikitext text/x-wiki {|style="width: 100%; background: none; border-collapse: separate; border-spacing: 8px 4px;" |style="width: 70%; border: 2px solid #c99157; background: #ffec9e; vertical-align: top;"| {|style="width: 100%; background: none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Characters</h2> |- {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:The Main 10 Elemental Kingdoms|The Main 10 Elemental Kingdoms]] |{{CharacterIcon|name=Sodor Empire|link=Sodor Empire|icon=Sodor Empire.png|size=80}} {{CharacterIcon|name=Etrathen Kingdom|link=Etrathen Kingdom|icon=Etrathen Kingdom.png|size=80}} {{CharacterIcon|name=Wraphegia Kingdom|link=Kingdom of Wraphegia|icon=Kingdom of Wraphegia.png|size=80}} {{CharacterIcon|name=Aihekar Kingdom|link=Kingdom of Aihekar|icon=Kingdom of Aihekar.png|size=80}} {{CharacterIcon|name=Icrourynese Empire|link=Icrourynese Empire|icon=Icrourynese Empire.png|size=80}} {{CharacterIcon|name=Preapia Kingdom|link=Kingdom of Preapia|icon=Kingdom of Preapia.png|size=80}} {{CharacterIcon|name=Lakya Kingdom|link=Lakya Kingdom|icon=Lakya Kingdom.png|size=80}} {{CharacterIcon|name=Madian Empire|link=Madian Empire|icon=Madian Empire.png|size=80}} {{CharacterIcon|name=Luithia Palatinate|link=Divine Kingdom of Luithia Palatinate|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dremmutian Brotherhood|link=Dremmutian Brotherhood|icon=Dremmutian Brotherhood.png|size=80}}}} ''Browse all the [[:Category:Characters|Characters]] on this Wiki'' ''Browse all the [[:Category:Artifacts|Artifacts]] on this Wiki'' |} |style="width:30%; border:2px solid #c99157; background:#ffec9e; vertical-align:top;"| {|style="width: 100%; background:none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Other stuff</h2> |- | * [[Termination of Dusk|What is Termination of Dusk]]? |- | |} 3c238962e6b52a4821cdedd1ec492c3ee84dd59f 8 7 2023-06-22T23:34:39Z Tasha04 2 wikitext text/x-wiki {|style="width: 100%; background: none; border-collapse: separate; border-spacing: 8px 4px;" |style="width: 70%; border: 2px solid #c99157; background: #ffec9e; vertical-align: top;"| {|style="width: 100%; background: none;" |- {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:The Main 10 Elemental Kingdoms|The Main 10 Elemental Kingdoms]] |{{CharacterIcon|name=Sodor Empire|link=Sodor Empire|icon=Sodor Empire.png|size=80}} {{CharacterIcon|name=Etrathen Kingdom|link=Etrathen Kingdom|icon=Etrathen Kingdom.png|size=80}} {{CharacterIcon|name=Wraphegia Kingdom|link=Kingdom of Wraphegia|icon=Kingdom of Wraphegia.png|size=80}} {{CharacterIcon|name=Aihekar Kingdom|link=Kingdom of Aihekar|icon=Kingdom of Aihekar.png|size=80}} {{CharacterIcon|name=Icrourynese Empire|link=Icrourynese Empire|icon=Icrourynese Empire.png|size=80}} {{CharacterIcon|name=Preapia Kingdom|link=Kingdom of Preapia|icon=Kingdom of Preapia.png|size=80}} {{CharacterIcon|name=Lakya Kingdom|link=Lakya Kingdom|icon=Lakya Kingdom.png|size=80}} {{CharacterIcon|name=Madian Empire|link=Madian Empire|icon=Madian Empire.png|size=80}} {{CharacterIcon|name=Divine Kingdom of Luithia Palatinatee|link=Divine Kingdom of Luithia Palatinate|icon=Luithia Palatinate.png|size=80}} {{CharacterIcon|name=Dremmutian Brotherhood|link=Dremmutian Brotherhood|icon=Dremmutian Brotherhood.png|size=80}}}} ''Browse all the [[:Category:Characters|Characters]] on this Wiki'' ''Browse all the [[:Category:Artifacts|Artifacts]] on this Wiki'' {{CharacterIconGroup |[[:Category:Important Characters|Important Characters]] |{{CharacterIcon|name=|link=|icon=.png|size=80}}}} |} |style="width:30%; border:2px solid #c99157; background:#ffec9e; vertical-align:top;"| {|style="width: 100%; background:none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Other stuff</h2> |- | * [[Termination of Dusk|What is Termination of Dusk]]? |- | |} 5f962eb9ac4c69a87d768a6668d351a0a45ee359 19 8 2023-06-23T00:04:42Z Tasha04 2 wikitext text/x-wiki {|style="width: 100%; background: none; border-collapse: separate; border-spacing: 8px 4px;" |style="width: 70%; border: 2px solid #c99157; background: #ffec9e; vertical-align: top;"| {|style="width: 100%; background: none;" |- {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:The Main 10 Elemental Kingdoms|The Main 10 Elemental Kingdoms]] |{{CharacterIcon|name=Sodor Empire|link=Sodor Empire|icon=Sodor Empire.png|size=80}} {{CharacterIcon|name=Etrathen Kingdom|link=Etrathen Kingdom|icon=Etrathen Kingdom.png|size=80}} {{CharacterIcon|name=Wraphegia Kingdom|link=Kingdom of Wraphegia|icon=Kingdom of Wraphegia.png|size=80}} {{CharacterIcon|name=Aihekar Kingdom|link=Kingdom of Aihekar|icon=Kingdom of Aihekar.png|size=80}} {{CharacterIcon|name=Icrourynese Empire|link=Icrourynese Empire|icon=Icrourynese Empire.png|size=80}} {{CharacterIcon|name=Preapia Kingdom|link=Kingdom of Preapia|icon=Kingdom of Preapia.png|size=80}} {{CharacterIcon|name=Lakya Kingdom|link=Lakya Kingdom|icon=Lakya Kingdom.png|size=80}} {{CharacterIcon|name=Madian Empire|link=Madian Empire|icon=Madian Empire.png|size=80}} {{CharacterIcon|name=Divine Kingdom of Luithia Palatinatee|link=Divine Kingdom of Luithia Palatinate|icon=Luithia Palatinate.png|size=80}} {{CharacterIcon|name=Dremmutian Brotherhood|link=Dremmutian Brotherhood|icon=Dremmutian Brotherhood.png|size=80}}}} All [[:Category:Characters|Characters]] on this Wiki All [[:Category:Artifacts|Artifacts]] on this Wiki {{CharacterIconGroup |[[:Category:Important Characters|Important Characters]] |{{CharacterIcon|name=|link=|icon=.png|size=80}}}} |} |style="width:30%; border:2px solid #c99157; background:#ffec9e; vertical-align:top;"| {|style="width: 100%; background:none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Other stuff</h2> |- | * [[Termination of Dusk|What is Termination of Dusk]]? |- | |} 7e34f59262bf3bbc78eceaf0a8c0637118add926 File:Sodor Empire.png 6 4 9 2023-06-22T23:59:31Z Tasha04 2 Emblem for Sodor wikitext text/x-wiki == Summary == Emblem for Sodor cbacdf37ad0ad9258559318ba80b95025b0e8cb8 File:Etrathen Kingdom.png 6 5 10 2023-06-23T00:00:07Z Tasha04 2 Emblem for Etrathen wikitext text/x-wiki == Summary == Emblem for Etrathen 45e7f53b29cb49cadad25ce4d923c21621034886 File:Kingdom of Wraphegia.png 6 6 11 2023-06-23T00:01:26Z Tasha04 2 Emblem for Wraphegi wikitext text/x-wiki == Summary == Emblem for Wraphegi 34e149544d63a496b0f0b159398aa3821c84569f File:Dremmutian Brotherhood.png 6 7 12 2023-06-23T00:03:00Z Tasha04 2 Emblem for Dremmutian wikitext text/x-wiki == Summary == Emblem for Dremmutian d7705cee969b25b6d02cb3c7d93bb62c138a856a File:Luithia Palatinate.png 6 8 13 2023-06-23T00:03:03Z Tasha04 2 Emblem for Luithia wikitext text/x-wiki == Summary == Emblem for Luithia 0473381f3a86bd32c0ef14746067449db4413f6f File:Madian Empire.png 6 9 14 2023-06-23T00:03:03Z Tasha04 2 Emblem for Madian wikitext text/x-wiki == Summary == Emblem for Madian a620a4bb14ffcc7c20b843737d14655c41f2ba4f File:Lakya Kingdom.png 6 10 15 2023-06-23T00:03:06Z Tasha04 2 Emblem for Lakya wikitext text/x-wiki == Summary == Emblem for Lakya fbeb294d5ff452c022b72a54186889df8087c194 File:Kingdom of Preapia.png 6 11 16 2023-06-23T00:03:08Z Tasha04 2 Emblem for Preapia wikitext text/x-wiki == Summary == Emblem for Preapia 598a221c5cf2a1a2fd43f39ea09d261144b20c5e File:Icrourynese Empire.png 6 12 17 2023-06-23T00:03:11Z Tasha04 2 Emblem for Icrourynese wikitext text/x-wiki == Summary == Emblem for Icrourynese fb8aef949c31e8869b3dc2f553826b6c463bf781 File:Kingdom of Aihekar.png 6 13 18 2023-06-23T00:03:11Z Tasha04 2 Emblem for Aihekar wikitext text/x-wiki == Summary == Emblem for Aihekar f94a6556f590eb3cb8286a156370c77dd68fc7a6 Module:Arguments 828 267 525 524 2023-06-23T00:27:02Z Tasha04 2 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Template:Tl 10 268 527 526 2023-06-23T00:27:02Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Module:Check for unknown parameters 828 271 533 532 2023-06-23T00:27:03Z Tasha04 2 1 revision imported Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:String 828 272 535 534 2023-06-23T00:27:04Z Tasha04 2 1 revision imported Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Module:Infobox 828 273 537 536 2023-06-23T00:27:04Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:InfoboxImage 828 274 539 538 2023-06-23T00:27:04Z Tasha04 2 1 revision imported Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if class ~= nil and class ~= "" then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if title ~= "" and title ~= nil then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if title ~= "" and title ~= nil then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; 0ee5fe75ba239fc5c9cedc81ca11bdc0be068542 Module:Infobox/styles.css 828 275 541 540 2023-06-23T00:27:05Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:If empty 828 280 551 550 2023-06-23T00:27:06Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p 4790391408957dea3ff9f453834c05f6b379a45c Module:Navbar 828 283 557 556 2023-06-23T00:27:08Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 79f907e59eaa8bbf8dd50bb751933ebeaaa7eb17 Module:Navbar/configuration 828 284 559 558 2023-06-23T00:27:08Z Tasha04 2 1 revision imported Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbar/styles.css 828 285 561 560 2023-06-23T00:27:09Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Navbox 828 286 563 562 2023-06-23T00:27:09Z Tasha04 2 1 revision imported Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Module:Navbox/configuration 828 287 565 564 2023-06-23T00:27:09Z Tasha04 2 1 revision imported Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbox/styles.css 828 288 567 566 2023-06-23T00:27:10Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Module:Color contrast 828 290 571 570 2023-06-23T00:27:10Z Tasha04 2 1 revision imported Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 291 573 572 2023-06-23T00:27:11Z Tasha04 2 1 revision imported Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Module:Documentation 828 296 583 582 2023-06-23T00:27:12Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle local purgeLink = makeWikilink("Special:Purge/" .. docTitle.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 728908c27cb1e65ac402f1af8a9e4f144ddc3d0d Module:Documentation/config 828 297 585 584 2023-06-23T00:27:13Z Tasha04 2 1 revision imported Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 71b68ed73088f1a59d61acf06bbee9fde6677f03 Module:Documentation/styles.css 828 298 587 586 2023-06-23T00:27:13Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Module:Parameter names example 828 301 593 592 2023-06-23T00:27:15Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end targs['nocat'] = 'yes'; targs['categories'] = 'no'; targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p 576eb8298850f4e4e62105ac740df295b7b7eb9e Template:Generic template demo 10 304 599 598 2023-06-23T00:27:17Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Parameter names example]] {{R semiprotected}} [[Category:Wikipedia utility templates]] [[Category:Template namespace templates]] [[Category:Documentation assistance templates]] 22f645541f749cfd0eeffdee734b51b284103400 Module:List 828 309 609 608 2023-06-23T00:27:55Z Tasha04 2 1 revision imported Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:TableTools 828 310 611 610 2023-06-23T00:27:56Z Tasha04 2 1 revision imported Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Module:Formatted appearance 828 311 613 612 2023-06-23T00:28:01Z Tasha04 2 1 revision imported Scribunto text/plain -- This module requires the use of Module:List. local list = require('Module:List') local p = {} -- Local function which is used to get a correctly formatted entry. -- Function checks if the array had a value added by checking the counter, -- and returns the relevant result. local function getFormattedEntry(args, counter) if (counter == 1) then -- Check if the counter stayed the same. return "" -- Nothing was added to array; Return empty string. elseif (counter == 2) then -- Check if only one value was added to the array. return args[1] -- Only one value was added to array; Return that value. else -- The array had more than one value added. return list.makeList("unbulleted", args) -- Call list.makeList() to retrieve the formatted plainlist. end end --[[ Local function which is used to format an appearance for a comic book, in the style of: Line 1: <comic book title> #<issue number> (with comic book title in italics) Line 2: <release date> For other usages, see createGenericEntry(). The function works with the following combinations: -- Only comic book title (example: "The Incredible Hulk"). -- Title and issue number (example: "The Incredible Hulk" and "181"). -- Title and release date (example: "The Incredible Hulk and "November 1974"). -- Title, issue number and release date (example: "The Incredible Hulk", "181" and "November 1974"). -- Only release date (example: "November 1974"). --]] local function createComicEntry(appearanceMajor, appearanceMinor, appearanceDate) local fullString = {} -- Variable to save the array. local counter = 1 -- Variable to save the array counter. if (appearanceMajor ~= nil) then -- Check if a comic book title was entered. if (appearanceMinor == nil) then -- A comic book title was entered; Check if a issue number was entered. fullString[counter] = appearanceMajor -- A issue was not entered; Add only the comic book title to the array. counter = counter + 1 -- Increment counter by one. else fullString[counter] = appearanceMajor .. " " .. appearanceMinor -- A issue was entered; Add both to the array. counter = counter + 1 -- Increment counter by one. end end if (appearanceDate ~= nil) then -- Check if a release date was entered. fullString[counter] = appearanceDate -- A release date was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry. end --[[ Local function which is used to format an appearance for most usages, including television, film, books, songs and games, in the style of: Line 1: <minor work title> (in quotes) (Minor works include: TV episodes, chapters, songs and game missions) Line 2: <major work title> (in italics) (Major works include: TV series, films, books, albums and games) Line 3: <release date> For comic book usages, see createComicEntry(). The function works with the following combinations: -- Only minor work title (example: "Live Together, Die Alone"). -- Minor work title and major work title (example: "Live Together, Die Alone" and "Lost"). -- Minor work title and release date (example: "Live Together, Die Alone" and "May 24, 2006"). -- Minor work title, major work title and release date (example: "Live Together, Die Alone", "Lost" and "May 24, 2006"). -- Only major work title (example: "Lost"). -- major work title and release date (example: "Lost" and "May 24, 2006"). -- Only release date (example: "May 24, 2006"). --]] local function createGenericEntry(appearanceMajor, appearanceMinor, appearanceDate) local fullString = {} -- Variable to save the array. local counter = 1 -- Variable to save the array counter. if (appearanceMinor ~= nil) then -- Check if a minor appearance was entered. fullString[counter] = appearanceMinor -- A minor appearance was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end if (appearanceMajor ~= nil) then -- Check if a major appearance was entered. fullString[counter] = appearanceMajor -- A major appearance was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end if (appearanceDate ~= nil) then -- Check if a release date was entered. fullString[counter] = appearanceDate -- A release date was entered; Add it to the array. counter = counter + 1 -- Increment counter by one. end return getFormattedEntry(fullString, counter) -- Call getFormattedEntry() to get a correctly formatted entry. end -- Local function which is used to format with a hash symbol comic book issues. -- For other minor works, see getFormattedGenericMinorWork(). local function getFormattedComicMinorWorkTitle(issue) if (issue ~= nil) then -- Check if the issue is not nil. if (string.find(issue, "#")) then -- Check if the issue already has a hash symbol. return issue -- Hash symbol already present; Return issue. else local formattedString = string.gsub(issue, "%d+", "#%1") -- Hash symbol not found; Add the symbol before the issue number. return formattedString -- Return issue. end else return nil -- issue is nil; Return nil. end end -- Local function which is used to format with quotes a minor work title of most types. -- For comic book issues, see getFormattedComicMinorWork() (see [MOS:MINORWORK]). local function getFormattedGenericMinorWorkTitle(title) if (title ~= nil) then -- Check if the title is not nil. return "\"" .. title .. "\"" -- Title is not nil; Add quotes to the title. else return nil -- Title is nil; Return nil. end end -- Local function which is used to format with italics a major work title (see [MOS:MAJORWORK]). local function getFormattedMajorWorkTitle(title) if (title ~= nil) then -- Check if the title is not nil. return "''" .. title .. "''" -- Title is not nil; Add italics to the title. else return nil -- Title is nil; Return nil. end end -- Local function which does the actual main process. local function _getFormattedAppearance(args) local appearanceMajor = args['major_work'] -- Get the title of the major work. local appearanceMinor = args['minor_work'] -- Get the title of the minor work. local isComic = false -- Variable to save the status of wether the appearence is from a comic book. if (args['issue'] ~= nil) then -- Check if the comic specific issue is not nil. appearanceMinor = args['issue'] -- Issue is not nil; Get the issue number. isComic = true -- Set isComic to true. end local appearanceDate = args['date'] -- Get the release date of the minor work. local formattedAppearanceMajor = getFormattedMajorWorkTitle(appearanceMajor) -- Call getFormattedMajorWorkTitle() to get a formatted major work title. if (isComic == false) then -- Check if the appearance is a comic book appearance. -- The appearance is not a comic book appearance; local formattedAppearanceMinor = getFormattedGenericMinorWorkTitle(appearanceMinor) -- Call getFormattedGenericMinorWorkTitle() to get a formatted minor work title. return createGenericEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createGenericEntry() to create an appearance entry. else -- The appearance is a comic book appearance. local formattedAppearanceMinor = getFormattedComicMinorWorkTitle(appearanceMinor) -- Call getFormattedComicMinorWorkTitle() to get a formatted minor work title. return createComicEntry(formattedAppearanceMajor, formattedAppearanceMinor, appearanceDate) -- Call createComicEntry() to create a comic book appearance entry. end end --[[ Public function which is used to format the |first_appeared= and |last_appeared= fields. The usage of this module allows for correct title formatting (see [MOS:MAJORWORK] and [MOS:MINORWORK]), and correct line breaks based on guidelines (see [WP:UBLIST]). Parameters: -- |major_work= — optional; The title of the major work the fictional element appeared in. Major works include TV series, films, books, albums and games. -- |minor_work= — optional; The title of the minor work the fictional element appeared in. Minor works include TV episodes, chapters, songs and game missions. -- |issue= — optional; The number of the comic book issue the fictional element appeared in. -- |date= — optional; The date of the publication/release of the minor work where the fictional element appeared in. --]] function p.getFormattedAppearance(frame) local getArgs = require('Module:Arguments').getArgs -- Use Module:Arguments to access module arguments. local args = getArgs(frame) -- Get the arguments sent via the template. return _getFormattedAppearance(args) -- Call _getFormattedAppearance() to perform the actual process. end return p 21c7590d5c0d7d710104335553aa10711c9b3b6e Module:Yesno 828 315 621 620 2023-06-23T00:28:19Z Tasha04 2 1 revision imported Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:Message box 828 316 623 622 2023-06-23T00:28:19Z Tasha04 2 1 revision imported Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) bdb0ecc9f26f26b9c0ce12a066a183ac9d4f0705 Module:Message box/configuration 828 317 625 624 2023-06-23T00:28:20Z Tasha04 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } b6f0151037e6867b577c8cca32ff297e48697a10 Module:Lua banner 828 319 629 628 2023-06-23T00:28:26Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Template:Lua 10 320 631 630 2023-06-23T00:28:27Z Tasha04 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Module:Message box/ombox.css 828 321 633 632 2023-06-23T00:28:28Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Template:Tlx 10 326 643 642 2023-06-23T00:29:41Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Module:Template link general 828 328 647 646 2023-06-23T00:29:42Z Tasha04 2 1 revision imported Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Module:Distinguish 828 331 653 652 2023-06-23T00:29:45Z Tasha04 2 1 revision imported Scribunto text/plain local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local mTableTools --initialize lazily local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} function p.distinguish(frame) mArguments = require('Module:Arguments') mTableTools = require('Module:TableTools') local args = mArguments.getArgs(frame) local selfref = args.selfref local text = args.text args = mTableTools.compressSparseArray(args) return p._distinguish(args, text, selfref) end function p._distinguish(args, text, selfref) checkType("_distinguish", 1, args, 'table') if #args == 0 and not text then return '' end local text = string.format( 'Not to be confused with %s.', text or mHatlist.orList(args, true) ) hnOptions = {selfref = selfref} return mHatnote._hatnote(text, hnOptions) end return p 0364d14af01fc656ad1d898c5036fbd12a7ca938 Module:Effective protection expiry 828 332 655 654 2023-06-23T00:29:46Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:Effective protection level 828 333 657 656 2023-06-23T00:29:46Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 70256a489edf6be9808031b14a7e3ef3e025da97 Module:File link 828 334 659 658 2023-06-23T00:29:47Z Tasha04 2 1 revision imported Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Module:Format link 828 335 661 660 2023-06-23T00:29:47Z Tasha04 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Module:Hatnote 828 336 663 662 2023-06-23T00:29:48Z Tasha04 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Module:Hatnote/styles.css 828 337 665 664 2023-06-23T00:29:48Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Module:Hatnote list 828 338 667 666 2023-06-23T00:29:48Z Tasha04 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation local function punctuationCollapse (text) local replacements = { ["%.%.$"] = ".", ["%?%.$"] = "?", ["%!%.$"] = "!", ["%.%]%]%.$"] = ".]]", ["%?%]%]%.$"] = "?]]", ["%!%]%]%.$"] = "!]]" } for k, v in pairs(replacements) do text = string.gsub(text, k, v) end return text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p d0828422b1aa0d0d0092d699d059c9e882260398 Module:Protection banner 828 339 669 668 2023-06-23T00:29:49Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Protection banner/config 828 340 671 670 2023-06-23T00:29:50Z Tasha04 2 1 revision imported Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } a20552ae38cb5253a4fa29aa126abc74215a589f Module:Sidebar 828 341 673 672 2023-06-23T00:29:50Z Tasha04 2 1 revision imported Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function hasSubgroup(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleclass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then root :tag('tr') :tag('td') :addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup or cfg.i18n.class.content) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles } } local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (child and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 71fe765846593e025ca2f94371315e9dbb5bb4d2 Module:Sidebar/configuration 828 342 675 674 2023-06-23T00:29:51Z Tasha04 2 1 revision imported Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content' } } } dc2a980ac2162a898f7c21e6d6ba7e994dfeb315 Module:Sidebar/styles.css 828 343 677 676 2023-06-23T00:29:51Z Tasha04 2 1 revision imported text text/plain /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb Template:Tlf 10 349 689 688 2023-06-23T00:29:56Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link with link off]] {{Redirect category shell| {{R from move}} }} 52759e1d3f7c9aa4a03d0b7d4f84f4c6adf53edf Module:High-use 828 353 697 696 2023-06-23T00:29:58Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p 134551888e066954a89c109d2faa8af71a4454a4 Module:Transclusion count 828 354 699 698 2023-06-23T00:29:58Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Module:Transclusion count/data/I 828 356 703 702 2023-06-23T00:30:00Z Tasha04 2 1 revision imported Scribunto text/plain return { ["IAAF_name"] = 2200, ["IAST"] = 5900, ["IBDB_name"] = 9100, ["ICD10"] = 4600, ["ICD9"] = 4400, ["ICS"] = 2900, ["IDN"] = 3300, ["IMDb_episode"] = 9800, ["IMDb_episodes"] = 2500, ["IMDb_name"] = 152000, ["IMDb_title"] = 187000, ["IMO_Number"] = 4100, ["IMSLP"] = 8200, ["INA"] = 2100, ["IND"] = 7400, ["INR"] = 6200, ["INRConvert"] = 5500, ["INRConvert/CurrentRate"] = 5500, ["INRConvert/USD"] = 5500, ["INRConvert/out"] = 5500, ["IOC_profile"] = 5500, ["IP"] = 2600, ["IPA"] = 141000, ["IPA-all"] = 3600, ["IPA-de"] = 8000, ["IPA-es"] = 7900, ["IPA-fr"] = 44000, ["IPA-it"] = 5900, ["IPA-nl"] = 3700, ["IPA-pl"] = 4000, ["IPA-pt"] = 3600, ["IPA-ru"] = 2600, ["IPA-sh"] = 2700, ["IPA-sl"] = 6900, ["IPA-th"] = 2900, ["IPA_audio_link"] = 19000, ["IPA_link"] = 3400, ["IPAc-cmn"] = 2600, ["IPAc-en"] = 48000, ["IPAc-pl"] = 52000, ["IPC_athlete"] = 2800, ["IPSummary"] = 78000, ["IP_summary"] = 78000, ["IPtalk"] = 22000, ["IPuser"] = 6900, ["IPvandal"] = 2900, ["IRC"] = 7400, ["IRI"] = 2200, ["IRL"] = 5400, ["IRN"] = 3500, ["ISBN"] = 461000, ["ISBNT"] = 38000, ["ISBN_missing"] = 2400, ["ISFDB_name"] = 4100, ["ISFDB_title"] = 4500, ["ISL"] = 2100, ["ISO_15924/script-example-character"] = 2800, ["ISO_15924/wp-article"] = 2800, ["ISO_15924/wp-article/format"] = 2800, ["ISO_15924/wp-article/label"] = 2700, ["ISO_3166_code"] = 510000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 7900, ["ISP"] = 5400, ["ISR"] = 4700, ["ISSN"] = 12000, ["ISSN_link"] = 30000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 17000, ["ITF"] = 6100, ["ITF_profile"] = 9000, ["ITIS"] = 4400, ["ITN_talk"] = 9800, ["ITN_talk/date"] = 9800, ["IUCN_banner"] = 15000, ["I_sup"] = 4600, ["Iaaf_name"] = 7400, ["Ice_hockey"] = 19000, ["Ice_hockey_stats"] = 16000, ["Icehockeystats"] = 12000, ["Icon"] = 573000, ["If"] = 266000, ["If_all"] = 6300, ["If_between"] = 3700, ["If_both"] = 8950000, ["If_empty"] = 3620000, ["If_first_display_both"] = 73000, ["If_in_page"] = 8900, ["If_last_display_both"] = 30000, ["If_preview"] = 57000, ["If_then_show"] = 279000, ["Ifempty"] = 4000, ["Ifeq"] = 16000, ["Iferror_then_show"] = 3200, ["Ifexist_not_redirect"] = 1120000, ["Ifnotempty"] = 14000, ["Ifnumber"] = 34000, ["Ifsubst"] = 431000, ["Ih"] = 7500, ["Ill"] = 110000, ["Illm"] = 6800, ["Image_frame"] = 4900, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3500, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 278000, ["Image_requested"] = 171000, ["Image_requested/Category_helper"] = 163000, ["Imbox"] = 915000, ["Imdb_name"] = 5300, ["Imdb_title"] = 4200, ["Import_style"] = 11000, ["Import_style/inputbox.css"] = 11000, ["Importance"] = 5540000, ["Importance/colour"] = 5560000, ["Importance_mask"] = 8630000, ["Improve_categories"] = 7100, ["Improve_documentation"] = 2100, ["In_class"] = 5700, ["In_lang"] = 352000, ["In_progress"] = 3100, ["In_string"] = 72000, ["In_title"] = 19000, ["Inactive_WikiProject_banner"] = 216000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 29000, ["Incomplete_list"] = 23000, ["Inconclusive"] = 2100, ["Increase"] = 42000, ["Incumbent_pope"] = 4300, ["Indent"] = 4200, ["IndexFungorum"] = 2200, ["Indian_English"] = 4300, ["Indian_Rupee"] = 10000, ["Indian_railway_code"] = 3100, ["Inflation"] = 18000, ["Inflation-fn"] = 5300, ["Inflation-year"] = 4400, ["Inflation/IN/startyear"] = 5500, ["Inflation/UK"] = 4300, ["Inflation/UK/dataset"] = 4300, ["Inflation/UK/startyear"] = 4300, ["Inflation/US"] = 11000, ["Inflation/US/dataset"] = 12000, ["Inflation/US/startyear"] = 12000, ["Inflation/fn"] = 6100, ["Inflation/year"] = 23000, ["Info"] = 7200, ["Infobox"] = 3200000, ["Infobox/Columns"] = 2300, ["Infobox/mobileviewfix.css"] = 141000, ["Infobox3cols"] = 16000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5400, ["Infobox_Aircraft_Type"] = 4700, ["Infobox_Athletics_Championships"] = 2700, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2200, ["Infobox_COA_wide"] = 3100, ["Infobox_Canada_electoral_district"] = 2400, ["Infobox_Canadian_Football_League_biography"] = 5800, ["Infobox_Canadian_Football_League_biography/position"] = 5700, ["Infobox_Chinese"] = 20000, ["Infobox_Chinese/Chinese"] = 2700, ["Infobox_Chinese/Footer"] = 8700, ["Infobox_Chinese/Header"] = 8700, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_Election"] = 2200, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 2800, ["Infobox_Gaelic_games_player"] = 5000, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Grand_Prix_race_report"] = 2000, ["Infobox_Greece_place"] = 2800, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2400, ["Infobox_Indian_constituency"] = 4500, ["Infobox_Indian_constituency/defaultdata"] = 4500, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_MLB_yearly"] = 3100, ["Infobox_NASCAR_race_report"] = 2100, ["Infobox_NCAA_team_season"] = 18000, ["Infobox_NFL_biography"] = 28000, ["Infobox_NFL_player"] = 7900, ["Infobox_NFL_season"] = 2500, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 72000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 4900, ["Infobox_Olympic_event"] = 7300, ["Infobox_Olympic_event/games_text"] = 7300, ["Infobox_Paralympic_event"] = 2600, ["Infobox_Paralympic_event/games_text"] = 2600, ["Infobox_Politician"] = 2200, ["Infobox_Romanian_subdivision"] = 3100, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4400, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 13000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 3000, ["Infobox_UK_place"] = 25000, ["Infobox_UK_place/NoDialCode"] = 7900, ["Infobox_UK_place/NoPostCode"] = 3000, ["Infobox_UK_place/area"] = 2300, ["Infobox_UK_place/dist"] = 2500, ["Infobox_UK_place/local"] = 25000, ["Infobox_UK_place/styles.css"] = 25000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3800, ["Infobox_US_Supreme_Court_case/courts"] = 3800, ["Infobox_Wikipedia_user"] = 9600, ["Infobox_YouTube_personality"] = 2600, ["Infobox_YouTube_personality/styles.css"] = 2600, ["Infobox_academic"] = 13000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2200, ["Infobox_aircraft_type"] = 12000, ["Infobox_airline"] = 4600, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 161000, ["Infobox_album/color"] = 190000, ["Infobox_album/link"] = 161000, ["Infobox_anatomy"] = 4400, ["Infobox_ancient_site"] = 5300, ["Infobox_animanga/Footer"] = 6700, ["Infobox_animanga/Header"] = 6700, ["Infobox_animanga/Print"] = 5400, ["Infobox_animanga/Video"] = 4600, ["Infobox_architect"] = 3600, ["Infobox_artist"] = 28000, ["Infobox_artist_discography"] = 5900, ["Infobox_artwork"] = 11000, ["Infobox_athlete"] = 3000, ["Infobox_automobile"] = 8400, ["Infobox_award"] = 13000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_basketball_biography"] = 21000, ["Infobox_basketball_biography/style"] = 21000, ["Infobox_basketball_club"] = 3000, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4300, ["Infobox_body_of_water"] = 18000, ["Infobox_book"] = 52000, ["Infobox_boxer"] = 5700, ["Infobox_bridge"] = 6000, ["Infobox_building"] = 27000, ["Infobox_character"] = 7700, ["Infobox_chess_biography"] = 3700, ["Infobox_chess_player"] = 3000, ["Infobox_church"] = 14000, ["Infobox_church/denomination"] = 14000, ["Infobox_church/font_color"] = 14000, ["Infobox_civil_conflict"] = 2300, ["Infobox_civilian_attack"] = 5300, ["Infobox_college_coach"] = 11000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_sports_team_season"] = 39000, ["Infobox_college_sports_team_season/link"] = 39000, ["Infobox_college_sports_team_season/name"] = 39000, ["Infobox_college_sports_team_season/succession"] = 39000, ["Infobox_college_sports_team_season/team"] = 39000, ["Infobox_comic_book_title"] = 2900, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 83000, ["Infobox_computing_device"] = 2300, ["Infobox_concert"] = 3200, ["Infobox_constituency"] = 5100, ["Infobox_country"] = 6300, ["Infobox_country/formernext"] = 5900, ["Infobox_country/imagetable"] = 5200, ["Infobox_country/multirow"] = 8100, ["Infobox_country/status_text"] = 2700, ["Infobox_country/styles.css"] = 6300, ["Infobox_country_at_games"] = 15000, ["Infobox_country_at_games/core"] = 15000, ["Infobox_country_at_games/see_also"] = 12000, ["Infobox_court_case"] = 4600, ["Infobox_court_case/images"] = 2400, ["Infobox_cricket_tournament"] = 2300, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7400, ["Infobox_criminal"] = 6200, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4400, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5500, ["Infobox_designation_list"] = 19000, ["Infobox_designation_list/entry"] = 17000, ["Infobox_dim"] = 6900, ["Infobox_dim/core"] = 6900, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 9500, ["Infobox_drug/chemical_formula"] = 9500, ["Infobox_drug/data_page_link"] = 9500, ["Infobox_drug/formatATC"] = 9400, ["Infobox_drug/formatCASnumber"] = 9500, ["Infobox_drug/formatChEBI"] = 9500, ["Infobox_drug/formatChEMBL"] = 9500, ["Infobox_drug/formatChemDBNIAID"] = 9500, ["Infobox_drug/formatChemSpider"] = 9500, ["Infobox_drug/formatCompTox"] = 9500, ["Infobox_drug/formatDrugBank"] = 9500, ["Infobox_drug/formatIUPHARBPS"] = 9500, ["Infobox_drug/formatJmol"] = 9500, ["Infobox_drug/formatKEGG"] = 9500, ["Infobox_drug/formatPDBligand"] = 8800, ["Infobox_drug/formatPubChemCID"] = 9500, ["Infobox_drug/formatPubChemSID"] = 9500, ["Infobox_drug/formatUNII"] = 9500, ["Infobox_drug/legal_status"] = 9600, ["Infobox_drug/licence"] = 9500, ["Infobox_drug/maintenance_categories"] = 9500, ["Infobox_drug/non-ref-space"] = 3900, ["Infobox_drug/pregnancy_category"] = 9500, ["Infobox_drug/title"] = 9500, ["Infobox_election"] = 29000, ["Infobox_election/row"] = 29000, ["Infobox_election/shortname"] = 27000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7200, ["Infobox_event"] = 5200, ["Infobox_family"] = 2100, ["Infobox_figure_skater"] = 4200, ["Infobox_film"] = 154000, ["Infobox_film/short_description"] = 150000, ["Infobox_film_awards"] = 2600, ["Infobox_film_awards/link"] = 2600, ["Infobox_film_awards/style"] = 2600, ["Infobox_food"] = 6800, ["Infobox_football_biography"] = 205000, ["Infobox_football_club"] = 27000, ["Infobox_football_club_season"] = 20000, ["Infobox_football_league"] = 2500, ["Infobox_football_league_season"] = 19000, ["Infobox_football_match"] = 5800, ["Infobox_football_tournament_season"] = 8000, ["Infobox_former_subdivision"] = 3300, ["Infobox_former_subdivision/styles.css"] = 3300, ["Infobox_galaxy"] = 2000, ["Infobox_game"] = 2400, ["Infobox_game_score"] = 3400, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4000, ["Infobox_golfer"] = 4400, ["Infobox_golfer/highest_ranking"] = 4400, ["Infobox_government_agency"] = 10000, ["Infobox_government_cabinet"] = 2500, ["Infobox_gridiron_football_person"] = 2500, ["Infobox_gridiron_football_person/position"] = 5700, ["Infobox_gymnast"] = 3400, ["Infobox_handball_biography"] = 4900, ["Infobox_historic_site"] = 11000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6200, ["Infobox_hospital/care_system"] = 6200, ["Infobox_hospital/lists"] = 6200, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3000, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5700, ["Infobox_islands"] = 8700, ["Infobox_islands/area"] = 9100, ["Infobox_islands/density"] = 9100, ["Infobox_islands/length"] = 8700, ["Infobox_islands/styles.css"] = 8700, ["Infobox_journal"] = 9700, ["Infobox_journal/Abbreviation_search"] = 9600, ["Infobox_journal/Bluebook_check"] = 9300, ["Infobox_journal/Former_check"] = 9300, ["Infobox_journal/ISO_4_check"] = 9300, ["Infobox_journal/ISSN-eISSN"] = 9400, ["Infobox_journal/Indexing_search"] = 9500, ["Infobox_journal/MathSciNet_check"] = 9300, ["Infobox_journal/NLM_check"] = 9300, ["Infobox_journal/frequency"] = 8500, ["Infobox_lake"] = 4400, ["Infobox_language"] = 9500, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6500, ["Infobox_language/linguistlist"] = 9500, ["Infobox_language/ref"] = 7100, ["Infobox_legislature"] = 3600, ["Infobox_library"] = 2100, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 4800, ["Infobox_magazine"] = 7500, ["Infobox_manner_of_address"] = 3300, ["Infobox_mapframe"] = 78000, ["Infobox_martial_artist"] = 5600, ["Infobox_martial_artist/record"] = 5600, ["Infobox_medal_templates"] = 419000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8200, ["Infobox_military_conflict"] = 21000, ["Infobox_military_installation"] = 9700, ["Infobox_military_person"] = 44000, ["Infobox_military_unit"] = 26000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_mountain"] = 28000, ["Infobox_multi-sport_competition_event"] = 2300, ["Infobox_museum"] = 10000, ["Infobox_musical_artist"] = 121000, ["Infobox_musical_artist/color"] = 121000, ["Infobox_musical_artist/hCard_class"] = 311000, ["Infobox_musical_composition"] = 2800, ["Infobox_name"] = 7400, ["Infobox_name_module"] = 6700, ["Infobox_newspaper"] = 9600, ["Infobox_nobility"] = 2400, ["Infobox_noble"] = 7200, ["Infobox_officeholder"] = 214000, ["Infobox_officeholder/office"] = 219000, ["Infobox_official_post"] = 7900, ["Infobox_organization"] = 36000, ["Infobox_pageant_titleholder"] = 2800, ["Infobox_park"] = 7300, ["Infobox_person"] = 465000, ["Infobox_person/Wikidata"] = 4900, ["Infobox_person/height"] = 101000, ["Infobox_person/length"] = 7000, ["Infobox_person/weight"] = 66000, ["Infobox_philosopher"] = 3300, ["Infobox_planet"] = 4700, ["Infobox_play"] = 3800, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3000, ["Infobox_prepared_food"] = 3100, ["Infobox_professional_wrestler"] = 4200, ["Infobox_professional_wrestling_event"] = 2600, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5500, ["Infobox_racing_driver"] = 3700, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 2900, ["Infobox_rail_line"] = 7200, ["Infobox_rail_line/tracking"] = 7200, ["Infobox_rail_service"] = 2900, ["Infobox_rail_service/doc"] = 2900, ["Infobox_reality_competition_season"] = 3400, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6300, ["Infobox_religious_biography"] = 5000, ["Infobox_religious_building"] = 12000, ["Infobox_religious_building/color"] = 17000, ["Infobox_restaurant"] = 2400, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 23000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 21000, ["Infobox_royalty/short_description"] = 13000, ["Infobox_rugby_biography"] = 16000, ["Infobox_rugby_biography/correct_date"] = 16000, ["Infobox_rugby_biography/depcheck"] = 15000, ["Infobox_rugby_league_biography"] = 9900, ["Infobox_rugby_league_biography/PLAYER"] = 9800, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2300, ["Infobox_saint"] = 4900, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5600, ["Infobox_school_district/styles.css"] = 5600, ["Infobox_scientist"] = 48000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 558000, ["Infobox_settlement/areadisp"] = 233000, ["Infobox_settlement/columns"] = 93000, ["Infobox_settlement/columns/styles.css"] = 93000, ["Infobox_settlement/densdisp"] = 430000, ["Infobox_settlement/impus"] = 81000, ["Infobox_settlement/lengthdisp"] = 168000, ["Infobox_settlement/link"] = 93000, ["Infobox_settlement/metric"] = 207000, ["Infobox_settlement/pref"] = 288000, ["Infobox_settlement/styles.css"] = 558000, ["Infobox_ship_begin"] = 41000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 40000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3400, ["Infobox_short_story"] = 2300, ["Infobox_skier"] = 2500, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 75000, ["Infobox_song/color"] = 75000, ["Infobox_song/link"] = 75000, ["Infobox_spaceflight"] = 3500, ["Infobox_spaceflight/styles.css"] = 3500, ["Infobox_sport_event"] = 2100, ["Infobox_sports_competition_event"] = 16000, ["Infobox_sports_competition_event/medalrow"] = 11000, ["Infobox_sports_league"] = 4900, ["Infobox_sports_season"] = 5300, ["Infobox_sports_team"] = 2200, ["Infobox_sportsperson"] = 105000, ["Infobox_stadium"] = 3600, ["Infobox_station"] = 55000, ["Infobox_station/doc"] = 55000, ["Infobox_station/services"] = 55000, ["Infobox_station/styles.css"] = 55000, ["Infobox_street"] = 3300, ["Infobox_swimmer"] = 9300, ["Infobox_television"] = 56000, ["Infobox_television/Short_description"] = 54000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 12000, ["Infobox_television_episode/styles.css"] = 12000, ["Infobox_television_season"] = 9300, ["Infobox_television_station"] = 3700, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2400, ["Infobox_tennis_tournament_event"] = 18000, ["Infobox_tennis_tournament_year"] = 9000, ["Infobox_tennis_tournament_year/color"] = 27000, ["Infobox_tennis_tournament_year/footer"] = 27000, ["Infobox_train"] = 2300, ["Infobox_union"] = 2100, ["Infobox_university"] = 26000, ["Infobox_user"] = 2600, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 27000, ["Infobox_video_game/styles.css"] = 27000, ["Infobox_volleyball_biography"] = 5200, ["Infobox_weapon"] = 7200, ["Infobox_website"] = 7700, ["Infobox_writer"] = 38000, ["Information"] = 104000, ["Information/styles.css"] = 104000, ["Inprogress"] = 2300, ["Input_link"] = 32000, ["Instagram"] = 10000, ["Interlanguage_link"] = 147000, ["Interlanguage_link_multi"] = 19000, ["Internet_Archive_author"] = 18000, ["Internet_Archive_film"] = 2500, ["Intitle"] = 12000, ["Invalid_SVG"] = 3800, ["Invalid_SVG/styles.css"] = 3800, ["Iptalk"] = 21000, ["IranCensus2006"] = 50000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 50000, ["Irc"] = 2100, ["Irish_place_name"] = 2600, ["IsIPAddress"] = 41000, ["IsValidPageName"] = 138000, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6100, ["Is_italic_taxon"] = 471000, ["Is_redirect"] = 26000, ["Isbn"] = 7300, ["Isfdb_name"] = 3800, ["Isfdb_title"] = 4400, ["Isnumeric"] = 205000, ["Iso2continent"] = 35000, ["Iso2country"] = 23000, ["Iso2country/article"] = 22000, ["Iso2country/data"] = 23000, ["Iso2nationality"] = 221000, ["Issubst"] = 72000, ["Isu_name"] = 2300, ["Italic_dab2"] = 5100, ["Italic_title"] = 284000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3700, ["Italictitle"] = 4300, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 122000, ["Ivory_messagebox"] = 138000, ["Module:I18n/complex_date"] = 65000, ["Module:IP"] = 129000, ["Module:IPA_symbol"] = 4700, ["Module:IPA_symbol/data"] = 4700, ["Module:IPAc-en"] = 48000, ["Module:IPAc-en/data"] = 48000, ["Module:IPAc-en/phonemes"] = 48000, ["Module:IPAc-en/pronunciation"] = 48000, ["Module:IPAddress"] = 190000, ["Module:ISO_3166"] = 1020000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2500, ["Module:ISO_3166/data/CN"] = 2100, ["Module:ISO_3166/data/DE"] = 14000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6400, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 28000, ["Module:ISO_3166/data/IR"] = 5000, ["Module:ISO_3166/data/National"] = 1020000, ["Module:ISO_3166/data/PL"] = 5700, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 24000, ["Module:ISO_3166/data/US"] = 84000, ["Module:ISO_639_name"] = 20000, ["Module:ISOdate"] = 65000, ["Module:Icon"] = 574000, ["Module:Icon/data"] = 574000, ["Module:If_empty"] = 3620000, ["Module:If_in_page"] = 8900, ["Module:If_preview"] = 543000, ["Module:If_preview/configuration"] = 543000, ["Module:If_preview/styles.css"] = 543000, ["Module:Import_style"] = 11000, ["Module:In_lang"] = 352000, ["Module:Indent"] = 4200, ["Module:Infobox"] = 4060000, ["Module:Infobox/dates"] = 66000, ["Module:Infobox/styles.css"] = 4310000, ["Module:Infobox3cols"] = 294000, ["Module:InfoboxImage"] = 4360000, ["Module:Infobox_body_of_water_tracking"] = 18000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 398000, ["Module:Infobox_military_conflict"] = 21000, ["Module:Infobox_military_conflict/styles.css"] = 21000, ["Module:Infobox_multi-lingual_name"] = 20000, ["Module:Infobox_multi-lingual_name/data"] = 20000, ["Module:Infobox_power_station"] = 3000, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 24000, ["Module:Infobox_road/route"] = 25000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 56000, ["Module:Infobox_television_disambiguation_check"] = 63000, ["Module:Infobox_television_episode"] = 12000, ["Module:Infobox_television_season_disambiguation_check"] = 8800, ["Module:Infobox_television_season_name"] = 9300, ["Module:Internet_Archive"] = 18000, ["Module:IrelandByCountyCatNav"] = 3200, ["Module:Is_infobox_in_lead"] = 375000, ["Module:Is_instance"] = 332000, ["Module:Italic_title"] = 1100000, ["Module:Italic_title2"] = 5100, } 330b94440e4c77bbe4d439bfe081f8bb9c2b6f7e Help:Infobox/user style 12 358 707 706 2023-06-23T00:30:02Z Tasha04 2 1 revision imported wikitext text/x-wiki {{{heading| ==Infoboxes and user style == }}} Users can have [[WP:User style|user CSS]] that hides<!--, moves, or makes collapsible--> any infoboxes in their own browsers. To hide all infoboxes, add the following to [[Special:MyPage/common.css]] (for all [[WP:Skin|skins]], or [[Special:MyPage/skin.css]] for just the current skin), on a line by itself: <syntaxhighlight lang="css">div.mw-parser-output .infobox { display: none; }</syntaxhighlight> Alternatively, you can add the following code to [[Special:MyPage/common.js|your common.js]] or into a browser user script that is executed by an extension like [[Greasemonkey]]: <syntaxhighlight lang="js">$('.infobox').hide();</syntaxhighlight> Be aware that although{{#if:{{{guideline|}}}||, per [[WP:Manual of Style/Infoboxes]],}} all information in an infobox ideally should also be found in the main body of an article, there isn't perfect compliance with this guideline. For example, the full taxonomic hierarchy in {{tlx|Taxobox}}, and the OMIM and other medical database codes of {{tlx|Infobox disease}} are often not found in the main article content. The infobox is also often the location of the most significant, even only, image in an article. There is a userscript which removes infoboxes but moves the images contained to separate thumbnails: [[User:Maddy from Celeste/disinfobox.js]].<!-- Needs Special:Mypage/common.js options for: * Making infoboxes collapsible ** Making them auto-collapsed * Moving infoboxes to bottom of page --><noinclude> {{Documentation|content= This documentation snippet is transcluded at [[Help:Infobox]], [[Template:Infobox/doc]], [[WP:Customisation#Hiding specific messages]], [[Help:User style]], [[WP:Manual of Style/Infoboxes]], and other places where this information is relevant. As a template, this snippet takes a {{para|heading}} parameter to replace the level-2 <code>==Infoboxes and user style==</code> section heading code, as needed. E.g., for a <code>=== ... ===</code> level-3 heading: <code><nowiki>heading={{=}}{{=}}{{=}}Infoboxes and user style{{=}}{{=}}{{=}}</nowiki></code> }} </noinclude> ba4dac68eb2bdc49a32f2a11b9afd52381bf06b5 Module:Lang 828 360 711 710 2023-06-23T00:30:26Z Tasha04 2 1 revision imported Scribunto text/plain --[=[ Lua support for the {{lang}}, {{lang-xx}}, and {{transl}} templates and replacement of various supporting templates. ]=] require('strict'); local getArgs = require ('Module:Arguments').getArgs; local unicode = require ("Module:Unicode data"); -- for is_latin() and is_rtl() local yesno = require ('Module:Yesno'); local lang_data = mw.loadData ('Module:Lang/data'); -- language name override and transliteration tool-tip tables local lang_name_table = lang_data.lang_name_table; -- language codes, names, regions, scripts, suppressed scripts local lang_table = lang_data.lang_name_table.lang; local lang_dep_table = lang_data.lang_name_table.lang_dep; local script_table = lang_data.lang_name_table.script; local region_table = lang_data.lang_name_table.region; local variant_table = lang_data.lang_name_table.variant; local suppressed_table = lang_data.lang_name_table.suppressed; local override_table = lang_data.override; local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization local content_lang = mw.language.getContentLanguage(); local this_wiki_lang_tag = content_lang.code; -- get this wiki's language tag local this_wiki_lang_dir = content_lang:getDir(); -- get this wiki's language direction local initial_style_state; -- set by lang_xx_normal() and lang_xx_italic() local maint_cats = {}; -- maintenance categories go here local maint_msgs = {}; -- and their messages go here --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< I N V E R T _ I T A L I C S >------------------------------------------------- This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup in args.text. Like |italic=unset, |italic=invert disables automatic italic markup. Individual leading/trailing apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become bold markup inadvertently. Leading and trailing wiki markup is extracted from args.text into separate table elements. Addition, removal, replacement of wiki markup is handled by a string.gsub() replacement table operating only on these separate elements. In the string.gsub() matching pattern, '.*' matches empty string as well as the three expected wiki markup patterns. This function expects that markup in args.text is complete and correct; if it is not, oddness may result. ]] local function invert_italics (source) local invert_pattern_table = { -- leading/trailing markup add/remove/replace patterns [""]="\'\'", -- empty string becomes italic markup ["\'\'"]="", -- italic markup becomes empty string ["\'\'\'"]="\'\'\'\'\'", -- bold becomes bold italic ["\'\'\'\'\'"]="\'\'\'", -- bold italic become bold }; local seg = {}; source = source:gsub ("%f[\']\'%f[^\']", '&#39;'); -- protect single quote marks from being interpreted as bold markup seg[1] = source:match ('^(\'\'+%f[^\']).+') or ''; -- get leading markup, if any; ignore single quote seg[3] = source:match ('.+(%f[\']\'\'+)$') or ''; -- get trailing markup, if any; ignore single quote if '' ~= seg[1] and '' ~= seg[3] then -- extract the 'text' seg[2] = source:match ('^\'\'+%f[^\'](.+)%f[\']\'\'+$') -- from between leading and trailing markup elseif '' ~= seg[1] then seg[2] = source:match ('^\'\'+%f[^\'](.+)') -- following leading markup elseif '' ~= seg[3] then seg[2] = source:match ('(.+)%f[\']\'\'+$') -- preceding trailing markup else seg[2] = source -- when there is no markup end seg[1] = invert_pattern_table[seg[1]] or seg[1]; -- replace leading markup according to pattern table seg[3] = invert_pattern_table[seg[3]] or seg[3]; -- replace leading markup according to pattern table return table.concat (seg); -- put it all back together and done end --[[--------------------------< V A L I D A T E _ I T A L I C >------------------------------------------------ validates |italic= or |italics= assigned values. When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or, for the special case 'default', return nil. When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message. When both |italic= and |italics= are set, returns nil and a 'conflicting' error message. The return value nil causes the calling lang, lang_xx, or transl function to set args.italic according to the template's defined default ('inherit' for {{lang}}, 'inherit' or 'italic' for {{lang-xx}} depending on the individual template's requirements, 'italic' for {{transl}}) or to the value appropriate to |script=, if set ({{lang}} and {{lang-xx}} only). Accepted values and the values that this function returns are are: nil - when |italic= absent or not set; returns nil default - for completeness, should rarely if ever be used; returns nil yes - force args.text to be rendered in italic font; returns 'italic' no - force args.text to be rendered in normal font; returns 'normal' unset - disables font control so that font-style applied to text is dictated by markup inside or outside the template; returns 'inherit' invert - disables font control so that font-style applied to text is dictated by markup outside or inverted inside the template; returns 'invert' ]] local function validate_italic (args) local properties = {['yes'] = 'italic', ['no'] = 'normal', ['unset'] = 'inherit', ['invert'] = 'invert', ['default'] = nil}; local count = 0 for _, arg in pairs {'italic', 'italics', 'i'} do if args[arg] then count = count + 1 end end if count > 1 then -- return nil and an error message if more than one is set return nil, 'only one of |italic=, |italics=, or |i= can be specified'; end return properties[args.italic or args.italics or args.i], nil; -- return an appropriate value and a nil error message end --[=[--------------------------< V A L I D A T E _ C A T _ A R G S >---------------------------------------------------------- Default behavior of the {{lang}} and {{lang-xx}} templates is to add categorization when the templates are used in mainspace. This default functionality may be suppressed by setting |nocat=yes or |cat=no. This function selects one of these two parameters to control categorization. Because having two parameters with 'opposite' names and 'opposite' values is confusing, this function accepts only affirmative values for |nocat= and only negative values for |cat=; in both cases the 'other' sense (and non-sense) is not accepted and the parameter is treated as if it were not set in the template. Sets args.nocat to true if categorization is to be turned off; to nil if the default behavior should apply. Accepted values for |nocat= are the text strings: 'yes', 'y', 'true', 't', on, '1' -- [[Module:Yesno]] returns logical true for all of these; false or nil else for |cat= 'no', 'n', 'false', 'f', 'off', '0' -- [[Module:Yesno]] returns logical false for all of these; true or nil else ]=] local function validate_cat_args (args) if not (args.nocat or args.cat) then -- both are nil, so categorize return; end if false == yesno (args.cat) or true == yesno (args.nocat) then args.nocat = true; -- set to true when args.nocat is affirmative; nil else (as if the parameter were not set in the template) else -- args.nocat is the parameter actually used. args.nocat = nil; end end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array ( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< F O R M A T _ I E T F _ T A G >------------------------------------------------ prettify ietf tags to use recommended subtag formats: code: lower case script: sentence case region: upper case variant: lower case private: lower case prefixed with -x- ]] local function format_ietf_tag (code, script, region, variant, private) local out = {}; if is_set (private) then return table.concat ({code:lower(), 'x', private:lower()}, '-'); -- if private, all other tags ignored end table.insert (out, code:lower()); if is_set (script) then script = script:lower():gsub ('^%a', string.upper); table.insert (out, script); end if is_set (region) then table.insert (out, region:upper()); end if is_set (variant) then table.insert (out, variant:lower()); end return table.concat (out, '-'); end --[[--------------------------< G E T _ I E T F _ P A R T S >-------------------------------------------------- extracts and returns IETF language tag parts: primary language subtag (required) - 2 or 3 character IANA language code script subtag - four character IANA script code region subtag - two-letter or three digit IANA region code variant subtag - four digit or 5-8 alnum variant code; only one variant subtag supported private subtag - x- followed by 1-8 alnum private code; only supported with the primary language tag in any one of these forms lang lang-variant lang-script lang-script-variant lang-region lang-region-variant lang-script-region lang-script-region-variant lang-x-private each of lang, script, region, variant, and private, when used, must be valid Languages with both two- and three-character code synonyms are promoted to the two-character synonym because the IANA registry file omits the synonymous three-character code; we cannot depend on browsers understanding the synonymous three-character codes in the lang= attribute. For {{lang-xx}} templates, the parameters |script=, |region=, and |variant= are supported (not supported in {{lang}} because those parameters are superfluous to the IETF subtags in |code=) returns six values; all lower case. Valid parts are returned as themselves; omitted parts are returned as empty strings, invalid parts are returned as nil; the sixth returned item is an error message (if an error detected) or nil. see http://www.rfc-editor.org/rfc/bcp/bcp47.txt section 2.1 ]] local function get_ietf_parts (source, args_script, args_region, args_variant) local code, script, region, variant, private; -- ietf tag parts if not is_set (source) then return nil, nil, nil, nil, nil, 'missing language tag'; end local pattern = { -- table of tables holding acceptibe ietf tag patterns and short names of the ietf part captured by the pattern {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 1 - ll-Ssss-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%d%d%d%d)$', 's', 'r', 'v'}, -- 2 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 3 - ll-Ssss-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'r', 'v'}, -- 4 - ll-Ssss-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d%d)$', 's', 'v'}, -- 5 - ll-Ssss-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%a%a%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 's', 'v'}, -- 6 - ll-Ssss-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a)%-(%d%d%d%d)$', 'r', 'v'}, -- 7 - ll-RR-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%d%d%d)%-(%d%d%d%d)$', 'r', 'v'}, -- 8 - ll-DDD-variant (where region is 3 digits; variant is 4 digits) {'^(%a%a%a?)%-(%a%a)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 9 - ll-RR-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d)%-(%w%w%w%w%w%w?%w?%w?)$', 'r', 'v'}, -- 10 - ll-DDD-variant (where region is 3 digits; variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%d%d%d%d)$', 'v'}, -- 11 - ll-variant (where variant is 4 digits) {'^(%a%a%a?)%-(%w%w%w%w%w%w?%w?%w?)$', 'v'}, -- 12 - ll-variant (where variant is 5-8 alnum characters) {'^(%a%a%a?)%-(%a%a%a%a)%-(%a%a)$', 's', 'r'}, -- 13 - ll-Ssss-RR {'^(%a%a%a?)%-(%a%a%a%a)%-(%d%d%d)$', 's', 'r'}, -- 14 - ll-Ssss-DDD (region is 3 digits) {'^(%a%a%a?)%-(%a%a%a%a)$', 's'}, -- 15 - ll-Ssss {'^(%a%a%a?)%-(%a%a)$', 'r'}, -- 16 - ll-RR {'^(%a%a%a?)%-(%d%d%d)$', 'r'}, -- 17 - ll-DDD (region is 3 digits) {'^(%a%a%a?)$'}, -- 18 - ll {'^(%a%a%a?)%-x%-(%w%w?%w?%w?%w?%w?%w?%w?)$', 'p'}, -- 19 - ll-x-pppppppp (private is 1-8 alnum characters) } local t = {}; -- table of captures; serves as a translator between captured ietf tag parts and named variables for i, v in ipairs (pattern) do -- spin through the pattern table looking for a match local c1, c2, c3, c4; -- captures in the 'pattern' from the pattern table go here c1, c2, c3, c4 = source:match (pattern[i][1]); -- one or more captures set if source matches pattern[i]) if c1 then -- c1 always set on match code = c1; -- first capture is always code t = { [pattern[i][2] or 'x'] = c2, -- fill the table of captures with the rest of the captures [pattern[i][3] or 'x'] = c3, -- take index names from pattern table and assign sequential captures [pattern[i][4] or 'x'] = c4, -- index name may be nil in pattern[i] table so "or 'x'" spoofs a name for this index in this table }; script = t.s or ''; -- translate table contents to named variables; region = t.r or ''; -- absent table entries are nil so set named ietf parts to empty string for concatenation variant= t.v or ''; private = t.p or ''; break; -- and done end end if not code then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language tag: ', source}); -- don't know what we got but it is malformed end code = code:lower(); -- ensure that we use and return lower case version of this if not (override_table[code] or lang_table[code] or synonym_table[code] or lang_dep_table[code]) then return nil, nil, nil, nil, nil, table.concat ({'unrecognized language code: ', code}); -- invalid language code, don't know about the others (don't care?) end if synonym_table[code] then -- if 639-2/639-2T code has a 639-1 synonym table.insert (maint_cats, table.concat ({'Lang and lang-xx code promoted to ISO 639-1|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' promoted to code: ', synonym_table[code]})); code = synonym_table[code]; -- use the synonym end if is_set (script) then if is_set (args_script) then return code, nil, nil, nil, nil, 'redundant script tag'; -- both code with script and |script= not allowed end else script = args_script or ''; -- use args.script if provided end if is_set (script) then script = script:lower(); -- ensure that we use and return lower case version of this if not script_table[script] then return code, nil, nil, nil, nil, table.concat ({'unrecognized script: ', script, ' for code: ', code}); -- language code ok, invalid script, don't know about the others (don't care?) end end if suppressed_table[script] then -- ensure that code-script does not use a suppressed script if in_array (code, suppressed_table[script]) then return code, nil, nil, nil, nil, table.concat ({'script: ', script, ' not supported for code: ', code}); -- language code ok, script is suppressed for this code end end if is_set (region) then if is_set (args_region) then return code, nil, nil, nil, nil, 'redundant region tag'; -- both code with region and |region= not allowed end else region = args_region or ''; -- use args.region if provided end if is_set (region) then region = region:lower(); -- ensure that we use and return lower case version of this if not region_table[region] then return code, script, nil, nil, nil, table.concat ({'unrecognized region: ', region, ' for code: ', code}); end end if is_set (variant) then if is_set (args_variant) then return code, nil, nil, nil, nil, 'redundant variant tag'; -- both code with variant and |variant= not allowed end else variant = args_variant or ''; -- use args.variant if provided end if is_set (variant) then variant = variant:lower(); -- ensure that we use and return lower case version of this if not variant_table[variant] then -- make sure variant is valid return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant}); end -- does this duplicate/replace tests in lang() and lang_xx()? if is_set (script) then -- if script set it must be part of the 'prefix' if not in_array (table.concat ({code, '-', script}), variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-script pair: ', code, '-', script}); end elseif is_set (region) then -- if region set, there are some prefixes that require lang code and region (en-CA-newfound) if not in_array (code, variant_table[variant]['prefixes']) then -- first see if lang code is all that's required (en-oxendict though en-GB-oxendict is preferred) if not in_array (table.concat ({code, '-', region}), variant_table[variant]['prefixes']) then -- now try for lang code and region (en-CA-newfound) return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code-region pair: ', code, '-', region}); end end else -- cheap way to determine if there are prefixes; fonipa and others don't have prefixes; # operator always returns 0 if variant_table[variant]['prefixes'][1] and not in_array (code, variant_table[variant]['prefixes']) then return code, script, region, nil, nil, table.concat ({'unrecognized variant: ', variant, ' for code: ', code}); end end end if is_set (private) then private = private:lower(); -- ensure that we use and return lower case version of this if not override_table[table.concat ({code, '-x-', private})] then -- make sure private tag is valid; note that index return code, script, region, nil, nil, table.concat ({'unrecognized private tag: ', private}); end end return code, script, region, variant, private, nil; -- return the good bits; make sure that msg is nil end --[[--------------------------< M A K E _ E R R O R _ M S G >-------------------------------------------------- assembles an error message from template name, message text, help link, and error category. ]] local function make_error_msg (msg, args, template) local out = {}; local category; if 'Transl' == template then category = 'Transl'; else category = 'Lang and lang-xx' end table.insert (out, table.concat ({'[', args.text or 'undefined', '] '})); -- for error messages output args.text if available table.insert (out, table.concat ({'<span style=\"color:#d33\">Error: {{', template, '}}: '})); table.insert (out, msg); table.insert (out, table.concat ({' ([[:Category:', category, ' template errors|help]])'})); table.insert (out, '</span>'); if (0 == namespace or 10 == namespace) and not args.nocat then -- categorize in article space (and template space to take care of broken usages) table.insert (out, table.concat ({'[[Category:', category, ' template errors]]'})); end return table.concat (out); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if is_set (link) then if is_set (display) then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end else return ''; end end --[[--------------------------< D I V _ M A R K U P _ A D D >-------------------------------------------------- adds <i> and </i> tags to list-item text or to implied <p>..</p> text. mixed not supported ]] local function div_markup_add (text, style) local implied_p = {}; if text:find ('^\n[%*:;#]') then -- look for list markup; list markup must begin at start of text if 'italic' == style then return text:gsub ('(\n[%*:;#]+)([^\n]+)', '%1<i>%2</i>'); -- insert italic markup at each list item else return text; end end if text:find ('\n+') then -- look for any number of \n characters in text text = text:gsub ('([^\n])\n([^\n])', '%1 %2'); -- replace single newline characters with a space character which mimics mediawiki if 'italic' == style then text = text:gsub('[^\n]+', '<p><i>%1</i></p>'); -- insert p and italic markup tags at each impled p (two or more consecutive '\n\n' sequences) else text = text:gsub ('[^\n]+', '<p>%1</p>'); -- insert p markup at each impled p text = text:gsub ('\n', ''); -- strip newline characters end end return text; end --[[--------------------------< T I T L E _ W R A P P E R _ M A K E >------------------------------------------ makes a <span title="<title text>"><content_text></span> or <div title="<title text>"><content_text></div> where <title text> is in the tool-tip in the wiki's local language and <content_text> is non-local-language text in html markup. This because the lang= attibute applies to the content of its enclosing tag. <tag> holds a string 'div' or 'span' used to choose the correct wrapping tag ]] local function title_wrapper_make (title_text, content_text, tag) local wrapper_t = {}; table.insert (wrapper_t, table.concat ({'<', tag})); -- open opening wrapper tag table.insert (wrapper_t, ' title=\"'); -- begin title attribute table.insert (wrapper_t, title_text); -- add <title_text> table.insert (wrapper_t, '\">'); -- end title attribute and close opening wrapper tag table.insert (wrapper_t, content_text); -- add <content_text> table.insert (wrapper_t, table.concat ({'</', tag, '>'})); -- add closing wrapper tag return table.concat (wrapper_t); -- make a big string and done end --[[--------------------------< M A K E _ T E X T _ H T M L >-------------------------------------------------- Add the html markup to text according to the type of content that it is: <span> or <i> tags for inline content or <div> tags for block content The lang= attribute also applies to the content of the tag where it is placed so this is wrong because 'Spanish language text' is English: <i lang="es" title="Spanish language text">casa</i> should be: <span title="Spanish language text"><i lang="es">casa</i></span> or for <div>...</div>: <div title="Spanish language text"><div lang="es"><spanish-language-text></div></div> ]] local function make_text_html (code, text, tag, rtl, style, size, language) local html_t = {}; local style_added = ''; local wrapper_tag = tag; -- <tag> gets modified so save a copy for use when/if we create a wrapper span or div if text:match ('^%*') then table.insert (html_t, '&#42;'); -- move proto language text prefix outside of italic markup if any; use numeric entity because plain splat confuses MediaWiki text = text:gsub ('^%*', ''); -- remove the splat from the text end if 'span' == tag then -- default html tag for inline content if 'italic' == style then -- but if italic tag = 'i'; -- change to <i> tags end else -- must be div so go text = div_markup_add (text, style); -- handle implied <p>, implied <p> with <i>, and list markup (*;:#) with <i> end table.insert (html_t, table.concat ({'<', tag})); -- open the <i>, <span>, or <div> html tag code = code:gsub ('%-x%-.*', ''); -- strip private use subtag from code tag because meaningless outside of wikipedia table.insert (html_t, table.concat ({' lang="', code, '\"'})); -- add language attribute if (rtl or unicode.is_rtl(text)) and ('ltr' == this_wiki_lang_dir) then -- text is right-to-left on a left-to-right wiki table.insert (html_t, ' dir="rtl"'); -- add direction attribute for right-to-left languages elseif not (rtl or unicode.is_rtl(text)) and ('rtl' == this_wiki_lang_dir) then -- text is left-to-right on a right-to-left wiki table.insert (html_t, ' dir="ltr"'); -- add direction attribute for left-to-right languages end if 'normal' == style then -- when |italic=no table.insert (html_t, ' style=\"font-style: normal;'); -- override external markup, if any style_added = '\"'; -- remember that style attribute added and is not yet closed end if is_set (size) then -- when |size=<something> if is_set (style_added) then table.insert (html_t, table.concat ({' font-size: ', size, ';'})); -- add when style attribute already inserted else table.insert (html_t, table.concat ({' style=\"font-size: ', size, ';'})); -- create style attribute style_added = '\"'; -- remember that style attribute added and is not yet closed end end table.insert (html_t, table.concat ({style_added, '>'})); -- close the opening html tag table.insert (html_t, text); -- insert the text table.insert (html_t, table.concat ({'</', tag, '>'})); -- close the 'text' <i>, <span>, or <div> html tag if is_set (language) then -- create a <title_text> string for the title= attribute in a wrapper span or div local title_text; if 'zxx' == code then -- special case for this tag 'no linguistic content' title_text = table.concat ({language, ' text'}); -- not a language so don't use 'language' in title text elseif mw.ustring.find (language, 'languages', 1, true) then title_text = table.concat ({language, ' collective text'}); -- for collective languages else title_text = table.concat ({language, '-language text'}); -- for individual languages end return title_wrapper_make (title_text, table.concat (html_t), wrapper_tag); else return table.concat (html_t); end end --[=[-------------------------< M A K E _ C A T E G O R Y >---------------------------------------------------- For individual language, <language>, returns: [[Category:Articles containing <language>-language text]] for English: [[Category:Articles containing explicitly cited English-language text]] for ISO 639-2 collective languages (and for 639-1 bh): [[Category:Articles with text in <language> languages]] ]=] local function make_category (code, language_name, nocat, name_get) local cat = {}; local retval; if ((0 ~= namespace) or nocat) and not name_get then -- only categorize in article space return ''; -- return empty string for concatenation end if mw.ustring.find (language_name, 'languages', 1, true) then return table.concat ({'[[Category:Articles with text in ', language_name, ']]'}); end table.insert (cat, '[[Category:Articles containing '); if this_wiki_lang_tag == code then table.insert (cat, 'explicitly cited ' .. language_name); -- unique category name for the local language else table.insert (cat, language_name); end table.insert (cat, '-language text]]'); return table.concat (cat); end --[[--------------------------< M A K E _ T R A N S L I T >---------------------------------------------------- return translit <i lang=xx-Latn>...</i> where xx is the language code; else return empty string The value |script= is not used in {{transl}} for this purpose; instead it uses |code. Because language scripts are listed in the {{transl}} switches they are included in the data tables. The script parameter is introduced at {{Language with name and transliteration}}. If |script= is set, this function uses it in preference to code. To avoid confusion, in this module and the templates that use it, the transliteration script parameter is renamed to be |translit-script= (in this function, tscript) This function is used by both lang_xx() and transl() lang_xx() always provides code, language_name, and translit; may provide tscript; never provides style transl() always provides language_name, translit, and one of code or tscript, never both; always provides style For {{transl}}, style only applies when a language code is provided ]] local function make_translit (code, language_name, translit, std, tscript, style) local title; local out_t = {}; local title_t = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local title_text = ''; -- tool tip text for title= attribute std = std and std:lower(); -- lower case for table indexing if not is_set (std) and not is_set (tscript) then -- when neither standard nor script specified title_text = language_name; -- write a generic tool tip if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' romanization'; -- finish the tool tip; use romanization when neither script nor standard supplied elseif is_set (std) and is_set (tscript) then -- when both are specified if title_t[std] then -- and if standard is legitimate if title_t[std][tscript] then -- and if script for that standard is legitimate if script_table[tscript] then title_text = title_text .. table.concat ({title_t[std][tscript:lower()], ' (', script_table[tscript], ' script) transliteration'}); -- add the appropriate text to the tool tip else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else title_text = title_text .. title_t[std]['default']; -- use the default if script not in std table; TODO: maint cat? error message because script not found for this standard? end else return ''; -- invalid standard, setup for error message end elseif is_set (std) then -- translit-script not set, use language code if not title_t[std] then return ''; end -- invalid standard, setup for error message if title_t[std][code] then -- if language code is in the table (transl may not provide a language code) title_text = title_text .. table.concat ({title_t[std][code:lower()], ' (', language_name, ' language) transliteration'}); -- add the appropriate text to the tool tip else -- code doesn't match title_text = title_text .. title_t[std]['default']; -- so use the standard's default end else -- here if translit-script set but translit-std not set if title_t['no_std'][tscript] then title_text = title_text .. title_t['no_std'][tscript]; -- use translit-script if set elseif title_t['no_std'][code] then title_text = title_text .. title_t['no_std'][code]; -- use language code else if is_set (tscript) then title_text = title_text .. table.concat ({language_name, '-script transliteration'}); -- write a script tool tip elseif is_set (code) then if not mw.ustring.find (language_name, 'languages', 1, true) then -- collective language names (plural 'languages' is part of the name) title_text = title_text .. '-language'; -- skip this text (individual and macro languages only) end title_text = title_text .. ' transliteration'; -- finish the tool tip else title_text = title_text .. ' transliteration'; -- generic tool tip (can we ever get here?) end end end local close_tag; if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transl}}) code = code:match ('^(%a%a%a?)'); -- strip all subtags leaving only the language subtag if not style then -- nil for the default italic style table.insert (out_t, "<i lang=\""); -- so use <i> tag close_tag = '</i>'; -- tag to be used when closing else table.insert (out_t, table.concat ({'<span style=\"font-style: ', style, '\" lang=\"'})); -- non-standard style, construct a span tag for it close_tag = '</span>'; -- tag to be used when closing end table.insert (out_t, code); table.insert (out_t, "-Latn\">"); -- transliterations are always Latin script else table.insert (out_t, "<span>"); -- when no language code: no lang= attribute, not italic ({{transl}} only) close_tag = '</span>'; end table.insert (out_t, translit); -- add the translit text table.insert (out_t, close_tag); -- and add the appropriate </i> or </span> if '' == title_text then -- when there is no need for a tool-tip return table.concat (out_t); -- make a string and done else return title_wrapper_make (title_text, table.concat (out_t), 'span'); -- wrap with a tool-tip span and don end end --[[--------------------------< V A L I D A T E _ T E X T >---------------------------------------------------- This function checks the content of args.text and returns empty string if nothing is amiss else it returns an error message. The tests are for empty or missing text and for improper or disallowed use of apostrophe markup. Italic rendering is controlled by the |italic= template parameter so italic markup should never appear in args.text either as ''itself'' or as '''''bold italic''''' unless |italic=unset or |italic=invert. ]] local function validate_text (template, args) if not is_set (args.text) then return make_error_msg ('no text', args, template); end if args.text:find ("%f[\']\'\'\'\'%f[^\']") or args.text:find ("\'\'\'\'\'[\']+") then -- because we're looking, look for 4 appostrophes or 6+ appostrophes return make_error_msg ('text has malformed markup', args, template); end local style = args.italic; if ('unset' ~= style) and ('invert' ~=style) then if args.text:find ("%f[\']\'\'%f[^\']") or args.text:find ("%f[\']\'\'\'\'\'%f[^\']") then -- italic but not bold, or bold italic return make_error_msg ('text has italic markup', args, template); end end end --[[--------------------------< R E N D E R _ M A I N T >------------------------------------------------------ render mainenance messages and categories ]] local function render_maint(nocat) local maint = {}; if 0 < #maint_msgs then -- when there are maintenance messages table.insert (maint, table.concat ({'<span class="lang-comment" style="font-style: normal; display: none; color: #33aa33; margin-left: 0.3em;">'})); -- opening <span> tag for _, msg in ipairs (maint_msgs) do table.insert (maint, table.concat ({msg, ' '})); -- add message strings end table.insert (maint, '</span>'); -- close the span end if (0 < #maint_cats) and (0 == namespace) and not nocat then -- when there are maintenance categories; article namespace only for _, cat in ipairs (maint_cats) do table.insert (maint, table.concat ({'[[Category:', cat, ']]'})); -- format and add the categories end end return table.concat (maint); end --[[--------------------------< P R O T O _ P R E F I X >------------------------------------------------------ for proto languages, text is prefixed with a splat. We do that here as a flag for make_text_html() so that a splat will be rendered outside of italic markup (if used). If the first character in text here is already a splat, we do nothing proto_param is boolean or nil; true adds splat prefix regardless of language name; false removes and / or inhibits regardless of language name; nil does nothing; presumes that the value in text is correct but removes extra splac ]] local function proto_prefix (text, language_name, proto_param) if false == proto_param then -- when forced by |proto=no return text:gsub ('^%**', ''); -- return text without splat prefix regardless of language name or existing splat prefix in text elseif (language_name:find ('^Proto%-') or (true == proto_param)) then -- language is a proto or forced by |proto=yes return text:gsub ('^%**', '*'); -- prefix proto-language text with a splat; also removes duplicate prefixing splats end return text:gsub ('^%*+', '*'); -- return text unmolested except multiple splats reduced to one splat end --[[--------------------------< H A S _ P O E M _ T A G >------------------------------------------------------ looks for a poem strip marker in text; returns true when found; false else auto-italic detection disabled when text has poem stripmarker because it is not possible for this code to know the content that will replace the stripmarker. ]] local function has_poem_tag (text) return text:find ('\127[^\127]*UNIQ%-%-poem%-[%a%d]+%-QINU[^\127]*\127') and true or false; end --[[--------------------------< H T M L _ T A G _ S E L E C T >------------------------------------------------ Inspects content of and selectively trims text. Returns text and the name of an appropriate html tag for text. If text contains: \n\n text has implied <p>..</p> tags - trim leading and trailing whitespace and return If text begins with list markup: \n* unordered \n; definition \n: definition \n# ordered trim all leading whitespace except \n and trim all trailing whitespace If text contains <poem>...</poem> stripmarker, return text unmodified and choose <div>..</div> tags because the stripmarker is replaced with text wrapped in <div>..</div> tags. If the text contains any actual <div>...</div> tags, then it's again returned unmodified and <div>...</div> tags are used to wrap it, to prevent div/span inversion. ]] local function html_tag_select (text) local tag; if has_poem_tag (text) then -- contains poem stripmarker (we can't know the content of that) tag = 'div'; -- poem replacement is in div tags so lang must use div tags elseif text:find ('<div') then -- reductive; if the text contains a div tag, we must use div tags tag = 'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing whitespace characters tag = 'div'; -- must be div because span may not contain p tags (added later by MediaWiki); poem replacement is in div tags elseif text:find ('\n[%*:;%#]') then -- if text has list markup text = text:gsub ('^[\t\r\f ]*', ''):gsub ('%s*$', ''); -- trim all whitespace except leading newline character '\n' tag = 'div'; -- must be div because span may not contain ul, dd, dl, ol tags (added later by MediaWiki) else text = mw.text.trim (text); -- plain text tag = 'span'; -- so span is fine end return text, tag; end --[[--------------------------< V A L I D A T E _ P R O T O >-------------------------------------------------- validates value assigned to |proto=; permitted values are yes and no; yes returns as true, no returns as false, empty string (or parameter omitted) returns as nil; any other value returns as nil with a second return value of true indicating that some other value has been assigned to |proto= ]] local function validate_proto (proto_param) if 'yes' == proto_param then return true; elseif 'no' == proto_param then return false; elseif is_set (proto_param) then return nil, true; -- |proto= something other than 'yes' or 'no' else return nil; -- missing or empty end end --[[--------------------------< L A N G U A G E _ N A M E _ G E T >-------------------------------------------- common function to return language name from the data set according to IETF tag returns language name if found in data tables; nil else ]] local function language_name_get (ietf, code, cat) ietf = ietf:lower(); -- ietf:lower() because format_ietf_tag() returns mixed case local name; -- remains nil if not found if override_table[ietf] then -- look for whole IETF tag in override table name = override_table[ietf]; elseif override_table[code] then -- not there so try basic language tag name = override_table[code]; elseif lang_table[code] then -- shift to iana active tag/name table name = lang_table[code]; elseif lang_dep_table[code] then -- try the iana deprecated tag/name table name = lang_dep_table[code]; end if lang_dep_table[code] and cat then -- because deprecated code may have been overridden to en.wiki preferred name table.insert (maint_cats, table.concat ({'Lang and lang-xx using deprecated ISO 639 codes|', code})); table.insert (maint_msgs, table.concat ({'code: ', code, ' is deprecated'})); end return name; -- name from data tables or nil end --[[--------------------------< _ L A N G >-------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function _lang (args) local out = {}; local language_name; -- used to make category names local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, variant, and private local code; -- the language code local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; validate_cat_args (args); -- determine if categorization should be suppressed if args[1] and args.code then return make_error_msg ('conflicting: {{{1}}} and |code=', args, template); else args.code = args[1] or args.code; -- prefer args.code end if args[2] and args.text then return make_error_msg ('conflicting: {{{2}}} and |text=', args, template); else args.text = args[2] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set if is_set (msg) then -- msg is an already-formatted error message return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code); -- |script=, |region=, |variant= not supported because they should be part of args.code ({{{1}}} in {{lang}}) if msg then return make_error_msg ( msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- nil when |italic= absent or not set or |italic=default; args.italic controls if ('latn' == subtags.script) or -- script is latn (this_wiki_lang_tag ~= code and not is_set (subtags.script) and not has_poem_tag (args.text) and unicode.is_Latin (args.text)) then -- text not this wiki's language, no script specified and not in poem markup but is wholly latn script (auto-italics) args.italic = 'italic'; -- DEFAULT for {{lang}} templates is upright; but if latn script set for font-style:italic else args.italic = 'inherit'; -- italic not set; script not latn; inherit current style end end if is_set (subtags.script) then -- if script set, override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant if 'invert' == args.italic and 'span' == tag then -- invert only supported for in-line content args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, language_name)); table.insert (out, make_category (code, language_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G >---------------------------------------------------------------------- entry point for {{lang}} there should be no reason to set parameters in the {{lang}} {{#invoke:}} <includeonly>{{#invoke:lang|lang}}</includeonly> parameters are received from the template's frame (parent frame) ]] local function lang (frame) local args = getArgs (frame, { -- this code so that we can detect and handle wiki list markup in text valueFunc = function (key, value) if 2 == key or 'text' == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return _lang (args); end --[[--------------------------< T R A N S L A T I O N _ M A K E >---------------------------------------------- stand-alone function to create literal translation of main text Also used by {{lang-x2}} ]] local function translation_make (args_t) local translation_t = {', '}; -- initialize output if 'none' ~= args_t.label then -- if we want a label table.insert (translation_t, '<small>'); -- open the <small> html tag if 'no' == args_t.link then table.insert (translation_t, '<abbr title="literal translation">lit.</abbr>'); -- unlinked form else table.insert (translation_t, make_wikilink ('Literal translation', 'lit.')); -- linked form end table.insert (translation_t, "&thinsp;</small>"); -- close the <small> html tag end table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use html entities to avoid wiki markup confusion return table.concat (translation_t); -- make a big string and done end --[[--------------------------< L A N G _ X X >---------------------------------------------------------------- For the {{lang-xx}} templates, the only parameter required to be set in the template is the language code. All other parameters can, usually should, be written in the template call. For {{lang-xx}} templates for languages that can have multiple writing systems, it may be appropriate to set |script= as well. For each {{lang-xx}} template choose the appropriate entry-point function so that this function knows the default styling that should be applied to text. For normal, upright style: <includeonly>{{#invoke:lang|lang_xx_inherit|code=xx}}</includeonly> For italic style: <includeonly>{{#invoke:lang|lang_xx_italic|code=xx}}</includeonly> All other parameters should be received from the template's frame (parent frame) Supported parameters are: |code = (required) the IANA language code |script = IANA script code; especially for use with languages that use multiple writing systems |region = IANA region code |variant = IANA variant code |text = (required) the displayed text in language specified by code |link = boolean false ('no') does not link code-spcified language name to associated language article |rtl = boolean true ('yes') identifies the language specified by code as a right-to-left language |nocat = boolean true ('yes') inhibits normal categorization; error categories are not affected |cat = boolian false ('no') opposite form of |nocat= |italic = boolean true ('yes') renders displayed text in italic font; boolean false ('no') renders displayed text in normal font; not set renders according to initial_style_state |lit = text that is a literal translation of text |label = 'none' to suppress all labeling (language name, 'translit.', 'lit.') any other text replaces language-name label - automatic wikilinking disabled for those {{lang-xx}} templates that support transliteration (those templates where |text= is not entirely latn script): |translit = text that is a transliteration of text |translit-std = the standard that applies to the transliteration |translit-script = ISO 15924 script name; falls back to code For {{lang-xx}}, the positional parameters are: {{{1}}} text {{{2}}} transliterated text {{{3}}} literal translation text no other positional parameters are allowed ]] local function _lang_xx (args) local out = {}; local language_name; -- used to make display text, article links local category_name; -- same as language_name except that it retains any parenthetical disambiguators (if any) from the data set local subtags = {}; -- IETF subtags script, region, and variant local code; -- the language code local translit_script_name; -- name associated with IANA (ISO 15924) script code local translit; local translit_title; local msg; -- for error messages local tag = 'span'; -- initial value for make_text_html() local template = args.template or 'Lang-xx'; maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if args[1] and args.text then return make_error_msg ('conflicting: {{{1}}} and |text=', args, template); else args.text = args[1] or args.text; -- prefer args.text end msg = validate_text (template, args); -- ensure that |text= is set, does not contain italic markup and is protected from improper bolding if is_set (msg) then return msg; end args.text, tag = html_tag_select (args.text); -- inspects text; returns appropriate html tag with text trimmed accordingly if args[2] and args.translit then return make_error_msg ('conflicting: {{{2}}} and |translit=', args, template); else args.translit = args[2] or args.translit -- prefer args.translit end if args[3] and (args.translation or args.lit) then return make_error_msg ('conflicting: {{{3}}} and |lit= or |translation=', args, template); elseif args.translation and args.lit then return make_error_msg ('conflicting: |lit= and |translation=', args, template); else args.translation = args[3] or args.translation or args.lit; -- prefer args.translation end if args.links and args.link then return make_error_msg ('conflicting: |links= and |link=', args, template); else args.link = args.link or args.links; -- prefer args.link end validate_cat_args (args); -- determine if categorization should be suppressed args.rtl = args.rtl == 'yes'; -- convert to boolean: 'yes' -> true, other values -> false code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (args.code, args.script, args.region, args.variant); -- private omitted because private if msg then -- if an error detected then there is an error message return make_error_msg (msg, args, template); end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, template); end if nil == args.italic then -- args.italic controls if is_set (subtags.script) then if 'latn' == subtags.script then args.italic = 'italic'; -- |script=Latn; set for font-style:italic else args.italic = initial_style_state; -- italic not set; script is not latn; set for font-style:<initial_style_state> end else args.italic = initial_style_state; -- here when |italic= and |script= not set; set for font-style:<initial_style_state> end end if is_set (subtags.script) then -- if script set override rtl setting if in_array (subtags.script, lang_data.rtl_scripts) then args.rtl = true; -- script is an rtl script else args.rtl = false; -- script is not an rtl script end end args.proto, msg = validate_proto (args.proto); -- return boolean, or nil, or nil and error message flag if msg then return make_error_msg (table.concat ({'invalid |proto=: ', args.proto}), args, template); end args.code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles language_name = language_name_get (args.code, code, true); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = language_name; -- category names retain IANA parenthetical diambiguators (if any) language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if args.label then if 'none' ~= args.label then table.insert (out, table.concat ({args.label, ': '})); -- custom label end else if 'no' == args.link then table.insert (out, language_name); -- language name without wikilink else if mw.ustring.find (language_name, 'languages', 1, true) then table.insert (out, make_wikilink (language_name)); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then table.insert (out, make_wikilink (lang_data.article_name[code], language_name)); -- language name with wikilink from override data else table.insert (out, make_wikilink (language_name .. ' language', language_name)); -- language name with wikilink end end table.insert (out, ': '); -- separator end if 'invert' == args.italic then args.text = invert_italics (args.text) end args.text = proto_prefix (args.text, language_name, args.proto); -- prefix proto-language text with a splat table.insert (out, make_text_html (args.code, args.text, tag, args.rtl, args.italic, args.size, ('none' == args.label) and language_name or nil)) if is_set (args.translit) and not unicode.is_Latin (args.text) then -- transliteration (not supported in {{lang}}); not supported when args.text is wholly latn text (this is an imperfect test) table.insert (out, ', '); -- comma to separate text from translit if 'none' ~= args.label then table.insert (out, '<small>'); if script_table[args['translit-script']] then -- when |translit-script= is set, try to use the script's name translit_script_name = script_table[args['translit-script']]; else translit_script_name = language_name; -- fall back on language name end translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object if translit_title.exists and ('no' ~= args.link) then table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'romanized') .. ':'); -- make a wikilink if there is an article to link to else table.insert (out, 'romanized:'); -- else plain text end table.insert (out, '&nbsp;</small>'); -- close the small tag end translit = make_translit (args.code, language_name, args.translit, args['translit-std'], args['translit-script']) if is_set (translit) then table.insert (out, translit); else return make_error_msg (table.concat ({'invalid translit-std: \'', args['translit-std'] or '[missing]'}), args, template); end end if is_set (args.translation) then -- translation (not supported in {{lang}}) table.insert (out, translation_make (args)); end table.insert (out, make_category (code, category_name, args.nocat)); table.insert (out, render_maint(args.nocat)); -- maintenance messages and categories return table.concat (out); -- put it all together and done end --[[--------------------------< L A N G _ X X _ A R G S _ G E T >---------------------------------------------- common function to get args table from {{lang-??}} templates returns table of args ]] local function lang_xx_args_get (frame) local args = getArgs(frame, { parentFirst= true, -- parameters in the template override parameters set in the {{#invoke:}} valueFunc = function (key, value) if 1 == key then -- the 'text' parameter; do not trim wite space return value; -- return untrimmed 'text' elseif value then -- all other values: if the value is not nil value = mw.text.trim (value); -- trim whitespace if '' ~= value then -- empty string when value was only whitespace return value; end end return nil; -- value was empty or contained only whitespace end -- end of valueFunc }); return args; end --[[--------------------------< L A N G _ X X _ I T A L I C >-------------------------------------------------- Entry point for those {{lang-xx}} templates that call lang_xx_italic(). Sets the initial style state to italic. ]] local function lang_xx_italic (frame) local args = lang_xx_args_get (frame); initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I T A L I C >------------------------------------------------ Entry point ffrom another module. Sets the initial style state to italic. ]] local function _lang_xx_italic (args) initial_style_state = 'italic'; return _lang_xx (args); end --[[--------------------------< L A N G _ X X _ I N H E R I T >------------------------------------------------ Entry point for those {{lang-xx}} templates that call lang_xx_inherit(). Sets the initial style state to inherit. ]] local function lang_xx_inherit (frame) local args = lang_xx_args_get (frame); initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ L A N G _ X X _ I N H E R I T >---------------------------------------------- Entry point from another module. Sets the initial style state to inherit. ]] local function _lang_xx_inherit (args) initial_style_state = 'inherit'; return _lang_xx (args); end --[[--------------------------< _ I S _ I E T F _ T A G >------------------------------------------------------ Returns true when a language name associated with IETF language tag exists; nil else. IETF language tag must be valid. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _is_ietf_tag (tag) -- entry point when this module is require()d into another local c, s, r, v, p, err; -- code, script, region, variant, private, error message c, s, r, v, p, err = get_ietf_parts (tag); -- disassemble tag into constituent part and validate return ((c and not err) and true) or nil; -- return true when code portion has a value without error message; nil else end --[[--------------------------< I S _ I E T F _ T A G >-------------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function is_ietf_tag (frame) return _is_ietf_tag (getArgs (frame)[1]); -- args[1] is the ietf language tag to be tested; also get parent frame end --[[--------------------------< I S _ I E T F _ T A G _ F R A M E >-------------------------------------------- Module entry point from an {{#invoke:}}; same as is_ietf_tag() except does not get parameters from the parent (template) frame. This function not useful when called by {{lang|fn=is_ietf_tag_frame|<tag>}} because <tag> is in the parent frame. ]] local function is_ietf_tag_frame (frame) return _is_ietf_tag (getArgs (frame, {frameOnly = true,})[1]); -- args[1] is the ietf language tag to be tested; do not get parent frame end --[[--------------------------< _ N A M E _ F R O M _ T A G >-------------------------------------------------- Returns language name associated with IETF language tag if valid; error message else. All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Set invoke's |link= parameter to yes to get wikilinked version of the language name. Module entry point from another module ]] local function _name_from_tag (args) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args[1]; -- save a copy of the input IETF subtag local link = 'yes' == args['link']; -- make a boolean local label = args.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local language_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args['template'] and table.concat ({'{{', args['template'], '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private language_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant language_name = language_name:gsub ('%s+%b()', ''); -- remove IANA parenthetical disambiguators or qualifiers from names that have them if link then -- when |link=yes, wikilink the language name if mw.ustring.find (language_name, 'languages', 1, true) then language_name = make_wikilink (language_name, label); -- collective language name uses simple wikilink elseif lang_data.article_name[code] then language_name = make_wikilink (lang_data.article_name[code], label or language_name); -- language name with wikilink from override data else language_name = make_wikilink (language_name .. ' language', label or language_name); -- language name with wikilink end end return language_name; end --[[--------------------------< N A M E _ F R O M _ T A G >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function name_from_tag (frame) -- entry point from an {{#invoke:Lang|name_from_tag|<ietf tag>|link=<yes>|template=<template name>}} return _name_from_tag (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< _ T A G _ F R O M _ N A M E >-------------------------------------------------- Returns the ietf language tag associated with the language name. Spelling of language name must be correct according to the spelling in the source tables. When a standard language name has a parenthetical disambiguator, that disambiguator must be omitted (they are not present in the data name-to-tag tables). Module entry point from another module ]] local function _tag_from_name (args) -- entry point from another module local msg; if args[1] and '' ~= args[1] then local data = mw.loadData ('Module:Lang/tag from name'); -- get the reversed data tables TODO: change when going live local lang = args[1]:lower(); -- allow any-case for the language name (speeling must till be correct) local tag = data.rev_override_table[lang] or data.rev_lang_table[lang] or data.rev_lang_dep_table[lang]; -- get the code; look first in the override then in the standard if tag then return tag, true; -- language name found so return tag and done; second return used by is_lang_name() else msg = 'language: ' .. args[1] .. ' not found' -- language name not found, error message end else msg = 'missing language name' -- language name not provided, error message end local template = ''; if args.template and '' ~= args.template then template = table.concat ({'{{', args['template'], '}}: '}); -- make template name (if provided by the template) end return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end --[[--------------------------< T A G _ F R O M _ N A M E >---------------------------------------------------- Module entry point from an {{#invoke:}} ]] local function tag_from_name (frame) -- entry point from an {{#invoke:Lang|tag_from_name|<language name>|link=<yes>|template=<template name>}} local result, _ = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by is_lang_name() return result; end --[[--------------------------< I S _ L A N G _ N A M E >------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function is_lang_name (frame) local _, result = _tag_from_name (getArgs(frame)) -- pass-on the args table, nothing else; getArgs() so we also get parent frame; supress second return used by tag_from_name() return result and true or nil; end --[[--------------------------< _ T R A N S L >---------------------------------------------------------------- Module entry point from another module ]] local function _transl (args) local title_table = lang_data.translit_title_table; -- table of transliteration standards and the language codes and scripts that apply to those standards local language_name; -- language name that matches language code; used for tool tip local translit; -- transliterated text to display local script; -- IANA script local msg; -- for when called functions return an error message maint_cats = {}; -- initialize because when this module required into another module, these only declared once so only initialzed once maint_msgs = {}; if is_set (args[3]) then -- [3] set when {{transl|code|standard|text}} args.text = args[3]; -- get the transliterated text args.translit_std = args[2] and args[2]:lower(); -- get the standard; lower case for table indexing if not title_table[args.translit_std] then return make_error_msg (table.concat ({'unrecognized transliteration standard: ', args.translit_std}), args, 'Transl'); end else if is_set (args[2]) then -- [2] set when {{transl|code|text}} args.text = args[2]; -- get the transliterated text else if args[1] and (args[1]:match ('^%a%a%a?%a?$') or -- args[2] missing; is args[1] a language or script tag or is it the transliterated text? args[1]:match ('^%a%a%a?%-x%-')) then -- or is args[1] a private-use tag return make_error_msg ('no text', args, 'Transl'); -- args[1] is a code so we're missing text else args.text = args[1]; -- args[1] is not a code so we're missing that; assign args.text for error message return make_error_msg ('missing language / script code', args, 'Transl'); end end end if is_set (args[1]) then -- IANA language code used for html lang= attribute; or ISO 15924 script code if args[1]:match ('^%a%a%a?%a?$') or args[1]:match ('^%a%a%a?%-x%-') then -- args[1] has correct form? args.code = args[1]:lower(); -- use the language/script code; only (2, 3, or 4 alpha characters) or private-use; lower case because table indexes are lower case else return make_error_msg (table.concat ({'unrecognized language / script code: ', args[1]}), args, 'Transl'); -- invalid language / script code end else return make_error_msg ('missing language / script code', args, 'Transl'); -- missing language / script code so quit end args.italic, msg = validate_italic (args); if msg then return make_error_msg (msg, args, 'Transl'); end if 'italic' == args.italic then -- 'italic' when |italic=yes; because that is same as absent or not set and |italic=default args.italic = nil; -- set to nil; end if override_table[args.code] then -- is code a language code defined in the override table? language_name = override_table[args.code]; args.code = args.code:match ('^%a%a%a?'); -- if private use, strip all but language subtag elseif lang_table[args.code] then -- is code a language code defined in the standard language code tables? language_name = lang_table[args.code]; elseif lang_dep_table[args.code] then -- is code a language code defined in the deprecated language code tables? language_name = lang_dep_table[args.code]; elseif script_table[args.code] then -- if here, code is not a language code; is it a script code? language_name = script_table[args.code]; script = args.code; -- code was an ISO 15924 script so use that instead args.code = ''; -- unset because not a language code else return make_error_msg (table.concat ({'unrecognized language / script code: ', args.code}), args, 'Transl'); -- invalid language / script code end -- here only when all parameters passed to make_translit() are valid return make_translit (args.code, language_name, args.text, args.translit_std, script, args.italic); end --[[--------------------------< T R A N S L >------------------------------------------------------------------ Module entry point from an {{#invoke:}} ]] local function transl (frame) return _transl (getArgs(frame)); end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Returns category name associated with IETF language tag if valid; error message else All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function. Module entry point from another module ]] local function _category_from_tag (args_t) local subtags = {}; -- IETF subtags script, region, variant, and private local raw_code = args_t[1]; -- save a copy of the input IETF subtag local link = 'yes' == args_t.link; -- make a boolean local label = args_t.label; local code; -- the language code local msg; -- gets an error message if IETF language tag is malformed or invalid local category_name = ''; code, subtags.script, subtags.region, subtags.variant, subtags.private, msg = get_ietf_parts (raw_code); if msg then local template = (args_t.template and table.concat ({'{{', args_t.template, '}}: '})) or ''; -- make template name (if provided by the template) return table.concat ({'<span style=\"color:#d33\">Error: ', template, msg, '</span>'}); end raw_code = format_ietf_tag (code, subtags.script, subtags.region, subtags.variant, subtags.private); -- format to recommended subtag styles; private omitted because private category_name = language_name_get (raw_code, code); -- get language name; try ietf tag first, then code w/o variant then code w/ variant category_name = make_category (code, category_name, nil, true):gsub ('[%[%]]', ''); if link then return table.concat ({'[[:', category_name, ']]'}); else return category_name; end end --[[--------------------------< C A T E G O R Y _ F R O M _ T A G >-------------------------------------------- Module entry point from an {{#invoke:}} ]] local function category_from_tag (frame) -- entry point from an {{#invoke:Lang|category_from_tag|<ietf tag>|template=<template name>}} return _category_from_tag (getArgs (frame)); -- pass-on the args table, nothing else; getArgs() so we also get parent frame end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { category_from_tag = category_from_tag, lang = lang, -- entry point for {{lang}} lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}} lang_xx_italic = lang_xx_italic, is_ietf_tag = is_ietf_tag, is_ietf_tag_frame = is_ietf_tag_frame, is_lang_name = is_lang_name, tag_from_name = tag_from_name, -- returns ietf tag associated with language name name_from_tag = name_from_tag, -- used for template documentation; possible use in ISO 639 name from code templates transl = transl, -- entry point for {{transl}} _category_from_tag = _category_from_tag, -- entry points when this module is require()d into other modules _lang = _lang, _lang_xx_inherit = _lang_xx_inherit, _lang_xx_italic = _lang_xx_italic, _is_ietf_tag = _is_ietf_tag, get_ietf_parts = get_ietf_parts, _tag_from_name = _tag_from_name, _name_from_tag = _name_from_tag, _transl = _transl, _translation_make = translation_make, }; 9d4ce44c7c49db6155692a2f959ea14ce5f8df40 Module:Unicode data 828 361 713 712 2023-06-23T00:30:27Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} local floor = math.floor local function errorf(level, ...) if type(level) == "number" then return error(string.format(...), level + 1) else -- level is actually the format string. return error(string.format(level, ...), 2) end end local function binary_range_search(codepoint, ranges) local low, mid, high low, high = 1, ranges.length or require "Module:TableTools".length(ranges) while low <= high do mid = floor((low + high) / 2) local range = ranges[mid] if codepoint < range[1] then high = mid - 1 elseif codepoint <= range[2] then return range, mid else low = mid + 1 end end return nil, mid end p.binary_range_search = binary_range_search --[[ local function linear_range_search(codepoint, ranges) for i, range in ipairs(ranges) do if range[1] <= codepoint and codepoint <= range[2] then return range end end end --]] -- Load a module by indexing "loader" with the name of the module minus the -- "Module:Unicode data/" part. For instance, loader.blocks returns -- [[Module:Unicode data/blocks]]. If a module cannot be loaded, false will be -- returned. local loader = setmetatable({}, { __index = function (self, key) local success, data = pcall(mw.loadData, "Module:Unicode data/" .. key) if not success then data = false end self[key] = data return data end }) -- For the algorithm used to generate Hangul Syllable names, -- see "Hangul Syllable Name Generation" in section 3.12 of the -- Unicode Specification: -- https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf local name_hooks = { { 0x00, 0x1F, "<control-%04X>" }, -- C0 control characters { 0x7F, 0x9F, "<control-%04X>" }, -- DEL and C1 control characters { 0x3400, 0x4DBF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension A { 0x4E00, 0x9FFF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph { 0xAC00, 0xD7A3, function (codepoint) -- Hangul Syllables local Hangul_data = loader.Hangul local syllable_index = codepoint - 0xAC00 return ("HANGUL SYLLABLE %s%s%s"):format( Hangul_data.leads[floor(syllable_index / Hangul_data.final_count)], Hangul_data.vowels[floor((syllable_index % Hangul_data.final_count) / Hangul_data.trail_count)], Hangul_data.trails[syllable_index % Hangul_data.trail_count] ) end }, -- High Surrogates, High Private Use Surrogates, Low Surrogates { 0xD800, 0xDFFF, "<surrogate-%04X>" }, { 0xE000, 0xF8FF, "<private-use-%04X>" }, -- Private Use -- CJK Compatibility Ideographs { 0xF900, 0xFA6D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xFA70, 0xFAD9, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0x17000, 0x187F7, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph { 0x18800, 0x18AFF, function (codepoint) return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF) end }, { 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut Ideograph Supplement { 0x1B170, 0x1B2FB, "NUSHU CHARACTER-%04X" }, -- Nushu { 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B { 0x2A700, 0x2B739, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension C { 0x2B740, 0x2B81D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension D { 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E { 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F -- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane) { 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" }, { 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17) end}, { 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G { 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H { 0xF0000, 0xFFFFD, "<private-use-%04X>" }, -- Plane 15 Private Use { 0x100000, 0x10FFFD, "<private-use-%04X>" } -- Plane 16 Private Use } name_hooks.length = #name_hooks local name_range_cache local function generate_name(data, codepoint) if type(data) == "string" then return data:format(codepoint) else return data(codepoint) end end --[[ -- Checks that the code point is a number and in range. -- Does not check whether code point is an integer. -- Not used local function check_codepoint(funcName, argIdx, val) require 'libraryUtil'.checkType(funcName, argIdx, val, 'number') if codepoint < 0 or 0x10FFFF < codepoint then errorf("Codepoint %04X out of range", codepoint) end end --]] -- https://www.unicode.org/versions/Unicode11.0.0/ch04.pdf, section 4.8 function p.lookup_name(codepoint) -- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned -- (Cn) and specifically noncharacters: -- https://www.unicode.org/faq/private_use.html#nonchar4 if 0xFDD0 <= codepoint and (codepoint <= 0xFDEF or floor(codepoint % 0x10000) >= 0xFFFE) then return ("<noncharacter-%04X>"):format(codepoint) end if name_range_cache -- Check if previously used "name hook" applies to this code point. and codepoint >= name_range_cache[1] and codepoint <= name_range_cache[2] then return generate_name(name_range_cache[3], codepoint) end local range = binary_range_search(codepoint, name_hooks) if range then name_range_cache = range return generate_name(range[3], codepoint) end local data = loader[('names/%03X'):format(codepoint / 0x1000)] if data and data[codepoint] then return data[codepoint] -- Unassigned (Cn) consists of noncharacters and reserved characters. -- The character has been established not to be a noncharacter, -- and if it were assigned, its name would already been retrieved, -- so it must be reserved. else return ("<reserved-%04X>"):format(codepoint) end end --[[ -- No image data modules on Wikipedia yet. function p.lookup_image(codepoint) local data = loader[('images/%03X'):format(codepoint / 0x1000)] if data then return data[codepoint] end end --]] local planes = { [ 0] = "Basic Multilingual Plane"; [ 1] = "Supplementary Multilingual Plane"; [ 2] = "Supplementary Ideographic Plane"; [ 3] = "Tertiary Ideographic Plane"; [14] = "Supplementary Special-purpose Plane"; [15] = "Supplementary Private Use Area-A"; [16] = "Supplementary Private Use Area-B"; } -- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable. local blocks local function block_iter(blocks, i) i = i + 1 local data = blocks[i] if data then -- Unpack doesn't work on tables loaded with mw.loadData. return i, data[1], data[2], data[3] end end -- An ipairs-type iterator generator for the list of blocks. function p.enum_blocks() local blocks = loader.blocks return block_iter, blocks, 0 end function p.lookup_plane(codepoint) local i = floor(codepoint / 0x10000) return planes[i] or ("Plane %u"):format(i) end function p.lookup_block(codepoint) local blocks = loader.blocks local range = binary_range_search(codepoint, blocks) if range then return range[3] else return "No Block" end end function p.get_block_info(name) for i, block in ipairs(loader.blocks) do if block[3] == name then return block end end end function p.is_valid_pagename(pagename) local has_nonws = false for cp in mw.ustring.gcodepoint(pagename) do if (cp == 0x0023) -- # or (cp == 0x005B) -- [ or (cp == 0x005D) -- ] or (cp == 0x007B) -- { or (cp == 0x007C) -- | or (cp == 0x007D) -- } or (cp == 0x180E) -- MONGOLIAN VOWEL SEPARATOR or ((cp >= 0x2000) and (cp <= 0x200A)) -- spaces in General Punctuation block or (cp == 0xFFFD) -- REPLACEMENT CHARACTER then return false end local printable, result = p.is_printable(cp) if not printable then return false end if result ~= "space-separator" then has_nonws = true end end return has_nonws end local function manual_unpack(what, from) if what[from + 1] == nil then return what[from] end local result = {} from = from or 1 for i, item in ipairs(what) do if i >= from then table.insert(result, item) end end return unpack(result) end local function compare_ranges(range1, range2) return range1[1] < range2[1] end -- Creates a function to look up data in a module that contains "singles" (a -- code point-to-data map) and "ranges" (an array containing arrays that contain -- the low and high code points of a range and the data associated with that -- range). -- "loader" loads and returns the "singles" and "ranges" tables. -- "match_func" is passed the code point and either the data or the "dots", and -- generates the final result of the function. -- The varargs ("dots") describes the default data to be returned if there wasn't -- a match. -- In case the function is used more than once, "cache" saves ranges that have -- already been found to match, or a range whose data is the default if there -- was no match. local function memo_lookup(data_module_subpage, match_func, ...) local dots = { ... } local cache = {} local singles, ranges return function (codepoint) if not singles then local data_module = loader[data_module_subpage] singles, ranges = data_module.singles, data_module.ranges end if singles[codepoint] then return match_func(codepoint, singles[codepoint]) end local range = binary_range_search(codepoint, cache) if range then return match_func(codepoint, manual_unpack(range, 3)) end local range, index = binary_range_search(codepoint, ranges) if range then table.insert(cache, range) table.sort(cache, compare_ranges) return match_func(codepoint, manual_unpack(range, 3)) end if ranges[index] then local dots_range if codepoint > ranges[index][2] then dots_range = { ranges[index][2] + 1, ranges[index + 1] and ranges[index + 1][1] - 1 or 0x10FFFF, unpack(dots) } else -- codepoint < range[index][1] dots_range = { ranges[index - 1] and ranges[index - 1][2] + 1 or 0, ranges[index][1] - 1, unpack(dots) } end table.sort(cache, compare_ranges) end return match_func(codepoint) end end -- Get a code point's combining class value in [[Module:Unicode data/combining]], -- and return whether this value is not zero. Zero is assigned as the default -- if the combining class value is not found in this data module. -- That is, return true if character is combining, or false if it is not. -- See https://www.unicode.org/reports/tr44/#Canonical_Combining_Class_Values for -- more information. p.is_combining = memo_lookup( "combining", function (codepoint, combining_class) return combining_class and combining_class ~= 0 or false end, 0) function p.add_dotted_circle(str) return (mw.ustring.gsub(str, ".", function(char) if p.is_combining(mw.ustring.codepoint(char)) then return '◌' .. char end end)) end local lookup_control = memo_lookup( "control", function (codepoint, ccc) return ccc or "assigned" end, "assigned") p.lookup_control = lookup_control function p.is_assigned(codepoint) return lookup_control(codepoint) ~= "unassigned" end function p.is_printable(codepoint) local result = lookup_control(codepoint) return (result == "assigned") or (result == "space-separator"), result end function p.is_whitespace(codepoint) local result = lookup_control(codepoint) return (result == "space-separator"), result end p.lookup_category = memo_lookup( "category", function (codepoint, category) return category end, "Cn") local lookup_script = memo_lookup( "scripts", function (codepoint, script_code) return script_code or 'Zzzz' end, "Zzzz") p.lookup_script = lookup_script function p.get_best_script(str) -- Check type of argument, because mw.text.decode coerces numbers to strings! require "libraryUtil".checkType("get_best_script", 1, str, "string") -- Convert HTML character references (including named character references, -- or character entities) to characters. str = mw.text.decode(str, true) local scripts = {} for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) -- Ignore "Inherited", "Undetermined", or "Uncoded" scripts. if not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then scripts[script] = true end end -- If scripts does not contain two or more keys, -- return first and only key (script code) in table. if not next(scripts, next(scripts)) then return next(scripts) end -- else return majority script, or else "Zzzz"? end function p.is_Latin(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0340-U+10FFFF. If they are not found and there is at least -- one Latin-script character, the string counts as Latin, because the rest -- of the characters can only be Zyyy, Zinh, and Zzzz. -- The only scripts found below U+0370 (the first code point of the Greek -- and Coptic block) are Latn, Zyyy, Zinh, and Zzzz. -- See the codepage in the [[UTF-8]] article. if not str:find "[\205-\244]" then for codepoint in mw.ustring.gcodepoint(str) do if lookup_script(codepoint) == "Latn" then return true end end end local Latn = false for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if script == "Latn" then Latn = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return Latn end -- Checks that a string contains only characters belonging to right-to-left -- scripts, or characters of ignorable scripts. function p.is_rtl(str) require "libraryUtil".checkType("get_best_script", 1, str, "string") str = mw.text.decode(str, true) -- Search for the leading bytes that introduce the UTF-8 encoding of the -- code points U+0580-U+10FFFF. If they are not found, the string can only -- have characters from a left-to-right script, because the first code point -- in a right-to-left script is U+0591, in the Hebrew block. if not str:find "[\214-\244]" then return false end local result = false local rtl = loader.scripts.rtl for codepoint in mw.ustring.gcodepoint(str) do local script = lookup_script(codepoint) if rtl[script] then result = true elseif not (script == "Zyyy" or script == "Zinh" or script == "Zzzz") then return false end end return result end --[[--------------------------< I S _ R T L _ F R A M E >------------------------------------------------------ external entry from an {{#invoke:}} to determine if a string of text is rtl. Strips html and html-like tags so that those tags don't corrupt the is-rtl-is-not-rtl determination; this added for the cases where the rtl text has <br /> tags. ]] function p.is_rtl_frame (frame) local str = frame.args[1]; -- get the string from the {{#invoke:}} frame str = str:gsub ('%b<>', ''); -- strip any html and html-like tags return p.is_rtl (str); -- return if whatever remains rtl; false else end local function get_codepoint(args, arg) local codepoint_string = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) local codepoint = tonumber(codepoint_string, 16) or errorf(2, "Parameter %s is not a code point in hexadecimal base", tostring(arg)) if not (0 <= codepoint and codepoint <= 0x10FFFF) then errorf(2, "code point in parameter %s out of range", tostring(arg)) end return codepoint end local function get_func(args, arg, prefix) local suffix = args[arg] or errorf(2, "Parameter %s is required", tostring(arg)) suffix = mw.text.trim(suffix) local func_name = prefix .. suffix local func = p[func_name] or errorf(2, "There is no function '%s'", func_name) return func end -- This function allows any of the "lookup" functions to be invoked. The first -- parameter is the word after "lookup_"; the second parameter is the code point -- in hexadecimal base. function p.lookup(frame) local func = get_func(frame.args, 1, "lookup_") local codepoint = get_codepoint(frame.args, 2) local result = func(codepoint) if func == p.lookup_name then -- Prevent code point labels such as <control-0000> from being -- interpreted as HTML tags. result = result:gsub("<", "&lt;") end return result end function p.is(frame) local func = get_func(frame.args, 1, "is_") -- is_Latin and is_valid_pagename take strings. if func == p.is_Latin or func == p.is_valid_pagename or func == p.is_rtl then return (func(frame.args[2])) else -- The rest take code points. local codepoint = get_codepoint(frame.args, 2) return (func(codepoint)) -- Adjust to one result. end end return p 444a6cd03f4361fb8aa2439f5f5f5dc1f1a4dd59 Module:Lang/data 828 362 715 714 2023-06-23T00:30:27Z Tasha04 2 1 revision imported Scribunto text/plain local lang_obj = mw.language.getContentLanguage(); local this_wiki_lang_tag = lang_obj.code; -- get this wiki's language tag --[[--------------------------< L A N G _ N A M E _ T A B L E >------------------------------------------------ primary table of tables that decode: lang -> language tags and names script -> ISO 15924 script tags region -> ISO 3166 region tags variant -> iana registered variant tags suppressed -> map of scripts tags and their associated language tags all of these data come from separate modules that are derived from the IANA language-subtag-registry file key_to_lower() avoids the metatable trap and sets all keys in the subtables to lowercase. Many language codes have multiple associated names; Module:lang is only concerned with the first name so key_to_lower() only fetches the first name. ]] local function key_to_lower (module, src_type) local out = {}; local source = (('var_sup' == src_type) and require (module)) or mw.loadData (module); -- fetch data from this module; require() avoids metatable trap for variant data if 'var_sup' == src_type then for k, v in pairs (source) do out[k:lower()] = v; -- for variant and suppressed everything is needed end elseif 'lang' == src_type and source.active then -- for ~/iana_languages (active) for k, v in pairs (source.active) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end elseif 'lang_dep' == src_type and source.deprecated then -- for ~/iana_languages (deprecated) for k, v in pairs (source.deprecated) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end else -- here for all other sources for k, v in pairs (source) do out[k:lower()] = v[1]; -- ignore multiple names; take first name only end end return out; end local lang_name_table_t = { lang = key_to_lower ('Module:Language/data/iana languages', 'lang'), lang_dep = key_to_lower ('Module:Language/data/iana languages', 'lang_dep'), script = key_to_lower ('Module:Language/data/iana scripts'), -- script keys are capitalized; set to lower region = key_to_lower ('Module:Language/data/iana regions'), -- region keys are uppercase; set to lower variant = key_to_lower ('Module:Language/data/iana variants', 'var_sup'), suppressed = key_to_lower ('Module:Language/data/iana suppressed scripts', 'var_sup'), -- script keys are capitalized; set to lower } --[[--------------------------< I 1 8 N M E D I A W I K I O V E R R I D E >-------------------------------- For internationalization; not used at en.wiki The language names taken from the IANA language-subtag-registry file are given in English. That may not be ideal. Translating ~8,000 language names is also not ideal. MediaWiki maintains (much) shorter lists of language names in most languages for which there is a Wikipedia edition. When desired, Module:Lang can use the MediaWiki language list for the local language. Caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all. When incomplete, MediaWiki's list will 'fall back' to another language (typically English). When that happens add an appropriate entry to the override table below. Caveat lector: the list of MediaWiki language names for your language may not be correct. At en.wiki, the MediaWiki language names do not agree with the IANA language names for these ISO 639-1 tags. Often it is simply spelling differences: bh: IANA: Bihari languages MW: Bhojpuri – the ISO 639-3 tag for Bhojpuri is bho bn: IANA: Bengali MW: Bangla – Bengali is the exonym, Bangla is the endonym dv: IANA: Dhivehi MW: Divehi el: IANA: Modern Greek MW: Greek ht: IANA: Haitian MW: Haitian Creole ky: IANA: Kirghiz MW: Kyrgyz li: IANA: Limburgan MW: Limburgish or: IANA: Oriya MW: Odia os: IANA: Ossetian MW: Ossetic "pa: IANA: Panjabi MW: Punjabi "ps: IANA: Pushto MW: Pashto "to: IANA: Tonga MW: Tongan "ug: IANA: Uighur MW: Uyghur use the override table to override language names that are incorrect for your project To see the list of names that MediaWiki has for your language, enter this in the Debug colsole: =mw.dumpObject (mw.language.fetchLanguageNames ('<tag>', 'all')) (replacing <tag> with the language tag for your language) Use of the MediaWiki language names lists is enabled when media_wiki_override_enable is set to boolean true. ]] local media_wiki_override_enable = false; -- set to true to override IANA names with MediaWiki names; always false at en.wiki -- caveat lector: the list of MediaWiki language names for your language may not be complete or may not exist at all if true == media_wiki_override_enable then local mw_languages_by_tag_t = mw.language.fetchLanguageNames (this_wiki_lang_tag, 'all'); -- get a table of language tag/name pairs known to MediaWiki for tag, name in pairs (mw_languages_by_tag_t) do -- loop through each tag/name pair in the MediaWiki list if lang_name_table_t.lang[tag] then -- if the tag is in the main list lang_name_table_t.lang[tag] = name; -- overwrite exisiting name with the name from MediaWiki end end end --[[--------------------------< O V E R R I D E >-------------------------------------------------------------- Language codes and names in this table override the BCP47 names in lang_name_table. indexes in this table shall always be lower case ]] local override = { ------------------------------< I S O _ 6 3 9 - 1 >------------------------------------------------------------ ["ab"] = "Abkhaz", -- to match en.wiki article name ["ca-valencia"] = "Valencian", ["cu"] = "Church Slavonic", -- 2nd IANA name; ["de-at"] = "Austrian German", -- these code-region and code-variant tags to match en.wiki article names ["de-ch"] = "Swiss Standard German", ["en-au"] = "Australian English", ["en-ca"] = "Canadian English", ["en-emodeng"] = "Early Modern English", ["en-gb"] = "British English", ["en-ie"] = "Irish English", ["en-in"] = "Indian English", ["en-nz"] = "New Zealand English", ["en-us"] = "American English", ["en-za"] = "South African English", ["fy"] = "West Frisian", -- Western Frisian ["mo"] = "Moldovan", -- Moldavian (deprecated code); to match en.wiki article title ["nl-be"] = "Flemish", -- match MediaWiki ["oc-provenc"] = "Provençal", ["ps"] = "Pashto", -- Pushto ["pt-br"] = "Brazilian Portuguese", -- match MediaWiki ["tw-asante"] = "Asante Twi", ["ug"] = "Uyghur", -- 2nd IANA name; to match en.wiki article name -- these ISO 639-1 language-name overrides imported from Module:Language/data/wp_languages --<begin do-not-edit except to comment out>-- ["av"] = "Avar", -- Avaric ["bo"] = "Standard Tibetan", -- Tibetan ["el"] = "Greek", -- Modern Greek -- ["en-SA"] = "South African English", -- English; no; SA is not South Africa it Saudi Arabia; ZA is South Africa ["ff"] = "Fula", -- Fulah ["ht"] = "Haitian Creole", -- Haitian ["hz"] = "Otjiherero", -- Herero ["ii"] = "Yi", -- Sichuan Yi ["ki"] = "Gikuyu", -- Kikuyu ["kl"] = "Greenlandic", -- Kalaallisut ["ky"] = "Kyrgyz", -- Kirghiz ["lg"] = "Luganda", -- Ganda ["li"] = "Limburgish", -- Limburgan ["mi"] = "Māori", -- Maori ["na"] = "Nauruan", -- Nauru ["nb"] = "Bokmål", -- Norwegian Bokmål ["nd"] = "Northern Ndebele", -- North Ndebele ["nn"] = "Nynorsk", -- Norwegian Nynorsk ["nr"] = "Southern Ndebele", -- South Ndebele ["ny"] = "Chichewa", -- Nyanja ["oj"] = "Ojibwe", -- Ojibwa ["or"] = "Odia", -- Oriya ["pa"] = "Punjabi", -- Panjabi ["rn"] = "Kirundi", -- Rundi ["sl"] = "Slovene", -- Slovenian ["ss"] = "Swazi", -- Swati ["st"] = "Sotho", -- Southern Sotho ["to"] = "Tongan", -- Tonga --<end do-not-edit except to comment out>-- ------------------------------< I S O _ 6 3 9 - 2, - 3, - 5 >---------------------------------------------- ["alv"] = "Atlantic–Congo languages", -- to match en.wiki article title (endash) ["arc"] = "Imperial Aramaic (700-300 BCE)", -- Official Aramaic (700-300 BCE), Imperial Aramaic (700-300 BCE); to match en.wiki article title uses ISO639-2 'preferred' name ["art"] = "constructed", -- to match en.wiki article; lowercase for category name ["bhd"] = "Bhadarwahi", -- Bhadrawahi; to match en.wiki article title ["bla"] = "Blackfoot", -- Siksika; to match en.wiki article title ["bua"] = "Buryat", -- Buriat; this is a macro language; these four use wp preferred transliteration; ["bxm"] = "Mongolian Buryat", -- Mongolia Buriat; these three all redirect to Buryat ["bxr"] = "Russian Buryat", -- Russia Buriat; ["bxu"] = "Chinese Buryat", -- China Buriat; ["byr"] = "Yipma", -- Baruya, Yipma ["egy"] = "Ancient Egyptian", -- Egyptian (Ancient); distinguish from contemporary arz: Egyptian Arabic ["ems"] = "Alutiiq", -- Pacific Gulf Yupik; to match en.wiki article title ["esx"] = "Eskimo–Aleut languages", -- to match en.wiki article title (endash) ["frr"] = "North Frisian", -- Northern Frisian ["frs"] = "East Frisian Low Saxon", -- Eastern Frisian ["gsw-fr"] = "Alsatian", -- match MediaWiki ["haa"] = "Hän", -- Han; to match en.wiki article title ["hmx"] = "Hmong–Mien languages", -- to match en.wiki article title (endash) ["ilo"] = "Ilocano", -- Iloko; to match en.wiki article title ["jam"] = "Jamaican Patois", -- Jamaican Creole English ["lij-mc"] = "Monégasque", -- Ligurian as spoken in Monaco ["luo"] = "Dholuo", -- IANA (primary) /ISO 639-3: Luo (Kenya and Tanzania); IANA (secondary): Dholuo ["mhr"] = "Meadow Mari", -- Eastern Mari ["mid"] = "Modern Mandaic", -- Mandaic ['mis'] = "uncoded", -- Uncoded languages; capitalization; special scope, not collective scope; ["mkh"] = "Mon–Khmer languages", -- to match en.wiki article title (endash) ["mla"] = "Tamambo", -- Malo ['mte'] = "Mono-Alu", -- Mono (Solomon Islands) ['mul'] = "multiple", -- Multiple languages; capitalization; special scope, not collective scope; ["nan-tw"] = "Taiwanese Hokkien", -- make room for IANA / 639-3 nan Min Nan Chinese; match en.wiki article title ["new"] = "Newar", -- Newari, Nepal Bhasa; to match en,wiki article title ["ngf"] = "Trans–New Guinea languages", -- to match en.wiki article title (endash) ["nic"] = "Niger–Congo languages", -- Niger-Kordofanian languages; to match en,wiki article title ["nrf"] = "Norman", -- not quite a collective - IANA name: Jèrriais + Guernésiais; categorizes to Norman-language text ["nrf-gg"] = "Guernésiais", -- match MediaWiki ["nrf-je"] = "Jèrriais", -- match MediaWiki ["nzi"] = "Nzema", -- Nzima; to match en.wiki article title ["oma"] = "Omaha–Ponca", -- to match en.wiki article title (endash) ["orv"] = "Old East Slavic", -- Old Russian ["pfl"] = "Palatine German", -- Pfaelzisch; to match en.wiki article ["pie"] = "Piro Pueblo", -- Piro; to match en.wiki article ["pms"] = "Piedmontese", -- Piemontese; to match en.wiki article title ["pnb"] = "Punjabi (Western)", -- Western Panjabi; dab added to override import from ~/wp languages and distinguish pnb from pa in reverse look up tag_from_name() ["rop"] = "Australian Kriol", -- Kriol; en.wiki article is a dab; point to correct en.wiki article ["sdo"] = "Bukar–Sadong", -- Bukar-Sadung Bidayuh; to match en.wiki article title ["stq"] = "Saterland Frisian", -- Saterfriesisch ["und"] = "undetermined", -- capitalization to match existing category ["wrg"] = "Warrongo", -- Warungu ["xal-ru"] = "Kalmyk", -- to match en.wiki article title ["xgf"] = "Tongva", -- ISO 639-3 is Gabrielino-Fernandeño ["yuf"] = "Havasupai–Hualapai", -- Havasupai-Walapai-Yavapai; to match en.wiki article title ["zxx"] = "no linguistic content", -- capitalization -- these ISO 639-2, -3 language-name overrides imported from Module:Language/data/wp_languages --<begin do-not-edit except to comment out>-- ["ace"] = "Acehnese", -- Achinese ["aec"] = "Sa'idi Arabic", -- Saidi Arabic ["akl"] = "Aklan", -- Aklanon ["alt"] = "Altay", -- Southern Altai ["apm"] = "Mescalero-Chiricahua", -- Mescalero-Chiricahua Apache ["bal"] = "Balochi", -- Baluchi -- ["bcl"] = "Central Bicolano", -- Central Bikol ["bin"] = "Edo", -- Bini ["bpy"] = "Bishnupriya Manipuri", -- Bishnupriya ["chg"] = "Chagatay", -- Chagatai ["ckb"] = "Sorani Kurdish", -- Central Kurdish ["cnu"] = "Shenwa", -- Chenoua ["coc"] = "Cocopah", -- Cocopa ["diq"] = "Zazaki", -- Dimli ["fit"] = "Meänkieli", -- Tornedalen Finnish ["fkv"] = "Kven", -- Kven Finnish ["frk"] = "Old Frankish", -- Frankish ["gez"] = "Ge'ez", -- Geez ["gju"] = "Gujari", -- Gujari ["gsw"] = "Alemannic German", -- Swiss German ["gul"] = "Gullah", -- Sea Island Creole English ["hak"] = "Hakka", -- Hakka Chinese ["hbo"] = "Biblical Hebrew", -- Ancient Hebrew ["hnd"] = "Hindko", -- Southern Hindko -- ["ikt"] = "Inuvialuk", -- Inuinnaqtun ["kaa"] = "Karakalpak", -- Kara-Kalpak ["khb"] = "Tai Lü", -- Lü ["kmr"] = "Kurmanji Kurdish", -- Northern Kurdish ["kpo"] = "Kposo", -- Ikposo ["krj"] = "Kinaray-a", -- Kinaray-A ["ktz"] = "Juǀ'hoan", -- Juǀʼhoan ["lez"] = "Lezgian", -- Lezghian ["liv"] = "Livonian", -- Liv ["lng"] = "Lombardic", -- Langobardic ["mia"] = "Miami-Illinois", -- Miami ["miq"] = "Miskito", -- Mískito ["mix"] = "Mixtec", -- Mixtepec Mixtec ["mni"] = "Meitei", -- Manipuri ["mrj"] = "Hill Mari", -- Western Mari ["mww"] = "White Hmong", -- Hmong Daw ["nds-nl"] = "Dutch Low Saxon", -- Low German -- ["new"] = "Nepal Bhasa", -- Newari ["nso"] = "Northern Sotho", -- Pedi -- ["nwc"] = "Classical Nepal Bhasa", -- Classical Newari, Classical Nepal Bhasa, Old Newari ["ood"] = "O'odham", -- Tohono O'odham ["otk"] = "Old Turkic", -- Old Turkish ["pal"] = "Middle Persian", -- Pahlavi ["pam"] = "Kapampangan", -- Pampanga ["phr"] = "Potwari", -- Pahari-Potwari ["pka"] = "Jain Prakrit", -- Ardhamāgadhī Prākrit -- ["pnb"] = "Punjabi", -- Western Panjabi ["psu"] = "Shauraseni", -- Sauraseni Prākrit ["rap"] = "Rapa Nui", -- Rapanui ["rar"] = "Cook Islands Māori", -- Rarotongan ["rmu"] = "Scandoromani", -- Tavringer Romani ["rom"] = "Romani", -- Romany ["rup"] = "Aromanian", -- Macedo-Romanian ["ryu"] = "Okinawan", -- Central Okinawan ["sdc"] = "Sassarese", -- Sassarese Sardinian ["sdn"] = "Gallurese", -- Gallurese Sardinian ["shp"] = "Shipibo", -- Shipibo-Conibo ["src"] = "Logudorese", -- Logudorese Sardinian ["sro"] = "Campidanese", -- Campidanese Sardinian ["tkl"] = "Tokelauan", -- Tokelau ["tvl"] = "Tuvaluan", -- Tuvalu ["tyv"] = "Tuvan", -- Tuvinian ["vls"] = "West Flemish", -- Vlaams ["wep"] = "Westphalian", -- Westphalien ["xal"] = "Oirat", -- Kalmyk ["xcl"] = "Old Armenian", -- Classical Armenian ["yua"] = "Yucatec Maya", -- Yucateco --<end do-not-edit except to comment out>-- ------------------------------< P R I V A T E _ U S E _ T A G S >---------------------------------------------- ["akk-x-latbabyl"] = "Late Babylonian", ["akk-x-midassyr"] = "Middle Assyrian Akkadian", ["akk-x-midbabyl"] = "Middle Babylonian Akkadian", ["akk-x-neoassyr"] = "Neo-Assyrian Akkadian", ["akk-x-neobabyl"] = "Neo-Babylonian Akkadian", ["akk-x-old"] = "Old Akkadian", ["akk-x-oldassyr"] = "Old Assyrian Akkadian", ["akk-x-oldbabyl"] = "Old Babylonian Akkadian", ["alg-x-proto"] = "Proto-Algonquian", -- alg in IANA is Algonquian languages ["ca-x-old"] = "Old Catalan", ["cel-x-proto"] = "Proto-Celtic", -- cel in IANA is Celtic languages ["egy-x-demotic"] = "Demotic Egyptian", ["egy-x-late"] = "Late Egyptian", ["egy-x-middle"] = "Middle Egyptian", ["egy-x-old"] = "Old Egyptian", ["gem-x-proto"] = "Proto-Germanic", -- gem in IANA is Germanic languages ["gmw-x-ecg"] = "East Central German", ["grc-x-aeolic"] = "Aeolic Greek", -- these grc-x-... codes are preferred alternates to the non-standard catchall code grc-gre ["grc-x-attic"] = "Attic Greek", ["grc-x-biblical"] = "Biblical Greek", ["grc-x-byzant"] = "Byzantine Greek", ["grc-x-classic"] = "Classical Greek", ["grc-x-doric"] = "Doric Greek", ["grc-x-hellen"] = "Hellenistic Greek", ["grc-x-ionic"] = "Ionic Greek", ["grc-x-koine"] = "Koinē Greek", ["grc-x-medieval"] = "Medieval Greek", ["grc-x-patris"] = "Patristic Greek", ["grk-x-proto"] = "Proto-Greek", -- grk in IANA is Greek languages ["iir-x-proto"] = "Proto-Indo-Iranian", -- iir in IANA is Indo-Iranian Languages ["ine-x-proto"] = "Proto-Indo-European", ["ira-x-proto"] = "Proto-Iranian", -- ira in IANA is Iranian languages ["itc-x-proto"] = "Proto-Italic", -- itc in IANA is Italic languages ["ksh-x-colog"] = "Colognian", -- en.wiki article is Colognian; ksh (Kölsch) redirects there ["la-x-medieval"] = "Medieval Latin", ["la-x-new"] = "New Latin", ["lmo-x-milanese"] = "Milanese", -- lmo in IANA is Lombard; Milanese is a dialect ["mis-x-ripuar"] = "Ripuarian", -- replaces improper use of ksh in wp_languages ["prg-x-old"] = "Old Prussian", ["sem-x-ammonite"] = "Ammonite", ["sem-x-aramaic"] = "Aramaic", ["sem-x-canaan"] = "Canaanite languages", ["sem-x-dumaitic"] = "Dumaitic", ["sem-x-egurage"] = "Eastern Gurage", ["sem-x-hatran"] = "Hatran Aramaic", ["sem-x-oldsoara"] = "Old South Arabian", ["sem-x-palmyren"] = "Palmyrene Aramaic", ["sem-x-proto"] = "Proto-Semitic", ["sem-x-taymanit"] = "Taymanitic", ["sla-x-proto"] = "Proto-Slavic", -- sla in IANA is Slavic languages ["yuf-x-hav"] = "Havasupai", -- IANA name for these three is Havasupai-Walapai-Yavapai ["yuf-x-wal"] = "Walapai", ["yuf-x-yav"] = "Yavapai", } --[[--------------------------< A R T I C L E _ L I N K >------------------------------------------------------ for those rare occasions when article titles don't fit with the normal '<language name>-language', this table maps language code to article title. Use of this table should be avoided and the use of redirects preferred as that is the long-standing method of handling article names that don't fit with the normal pattern ]] local article_name = { ['kue'] = "Kuman language (New Guinea)", -- Kuman (Papua New Guinea); to avoid Kuman dab page ["lij"] = "Ligurian (Romance language)", -- Ligurian; see Template_talk:Lang#Ligurian_dab ['mbo'] = "Mbo language (Cameroon)", -- Mbo (Cameroon) ['mnh'] = "Mono language (Congo)", -- Mono (Democratic Republic of Congo); see Template_talk:Lang#Mono_languages ['mnr'] = "Mono language (California)", -- Mono (USA) ['mru'] = "Mono language (Cameroon)", -- Mono (Cameroon) ['qwm'] = "Kuman (Russia)", -- Kuman (Russia); to avoid Kuman dab page ["snq"] = "Sangu language (Gabon)", -- Sangu (Gabon) ["xlg"] = "Ligurian (ancient language)", -- see Template_talk:Lang#Ligurian_dab ["zmw"] = "Mbo language (Congo)", -- Mbo (Democratic Republic of Congo) } --[=[-------------------------< R T L _ S C R I P T S >-------------------------------------------------------- ISO 15924 scripts that are written right-to-left. Data in this table taken from [[ISO 15924#List of codes]] last update to this list: 2017-12-24 ]=] local rtl_scripts = { 'adlm', 'arab', 'aran', 'armi', 'avst', 'cprt', 'egyd', 'egyh', 'hatr', 'hebr', 'hung', 'inds', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'palm', 'phli', 'phlp', 'phlv', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'syre', 'syrj', 'syrn', 'thaa', 'wole', }; --[[--------------------------< T R A N S L I T _ T I T L E S >------------------------------------------------ This is a table of tables of transliteration standards and the language codes or language scripts that apply to those standards. This table is used to create the tool-tip text associated with the transliterated text displayed by some of the {{lang-??}} templates. These tables are more-or-less copied directly from {{transl}}. The standard 'NO_STD' is a construct to allow for the cases when no |std= parameter value is provided. ]] local translit_title_table = { ['ahl'] = { ['default'] = 'Academy of the Hebrew Language transliteration', }, ['ala'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['ala-lc'] = { ['default'] = 'American Library Association – Library of Congress transliteration', }, ['batr'] = { ['default'] = 'Bikdash Arabic Transliteration Rules', }, ['bgn/pcgn'] = { ['default'] = 'Board on Geographic Names / Permanent Committee on Geographical Names transliteration', }, ['din'] = { ['ar'] = 'DIN 31635 Arabic', ['fa'] = 'DIN 31635 Arabic', ['ku'] = 'DIN 31635 Arabic', ['ps'] = 'DIN 31635 Arabic', ['tg'] = 'DIN 31635 Arabic', ['ug'] = 'DIN 31635 Arabic', ['ur'] = 'DIN 31635 Arabic', ['arab'] = 'DIN 31635 Arabic', ['default'] = 'DIN transliteration', }, ['eae'] = { ['default'] = 'Encyclopaedia Aethiopica transliteration', }, ['hepburn'] = { ['default'] = 'Hepburn transliteration', }, ['hunterian'] = { ['default'] = 'Hunterian transliteration', }, ['iast'] = { ['default'] = 'International Alphabet of Sanskrit transliteration', }, ['iso'] = { -- when a transliteration standard is supplied ['ab'] = 'ISO 9 Cyrillic', ['ba'] = 'ISO 9 Cyrillic', ['be'] = 'ISO 9 Cyrillic', ['bg'] = 'ISO 9 Cyrillic', ['kk'] = 'ISO 9 Cyrillic', ['ky'] = 'ISO 9 Cyrillic', ['mn'] = 'ISO 9 Cyrillic', ['ru'] = 'ISO 9 Cyrillic', ['tg'] = 'ISO 9 Cyrillic', ['uk'] = 'ISO 9 Cyrillic', ['bua'] = 'ISO 9 Cyrillic', ['sah'] = 'ISO 9 Cyrillic', ['tut'] = 'ISO 9 Cyrillic', ['xal'] = 'ISO 9 Cyrillic', ['cyrl'] = 'ISO 9 Cyrillic', ['ar'] = 'ISO 233 Arabic', ['ku'] = 'ISO 233 Arabic', ['ps'] = 'ISO 233 Arabic', ['ug'] = 'ISO 233 Arabic', ['ur'] = 'ISO 233 Arabic', ['arab'] = 'ISO 233 Arabic', ['he'] = 'ISO 259 Hebrew', ['yi'] = 'ISO 259 Hebrew', ['hebr'] = 'ISO 259 Hebrew', ['el'] = 'ISO 843 Greek', ['grc'] = 'ISO 843 Greek', ['ja'] = 'ISO 3602 Japanese', ['hira'] = 'ISO 3602 Japanese', ['hrkt'] = 'ISO 3602 Japanese', ['jpan'] = 'ISO 3602 Japanese', ['kana'] = 'ISO 3602 Japanese', ['zh'] = 'ISO 7098 Chinese', ['chi'] = 'ISO 7098 Chinese', ['pny'] = 'ISO 7098 Chinese', ['zho'] = 'ISO 7098 Chinese', -- ['han'] = 'ISO 7098 Chinese', -- unicode alias of Hani? doesn't belong here? should be Hani? ['hans'] = 'ISO 7098 Chinese', ['hant'] = 'ISO 7098 Chinese', ['ka'] = 'ISO 9984 Georgian', ['kat'] = 'ISO 9984 Georgian', ['arm'] = 'ISO 9985 Armenian', ['hy'] = 'ISO 9985 Armenian', ['th'] = 'ISO 11940 Thai', ['tha'] = 'ISO 11940 Thai', ['ko'] = 'ISO 11941 Korean', ['kor'] = 'ISO 11941 Korean', ['awa'] = 'ISO 15919 Indic', ['bho'] = 'ISO 15919 Indic', ['bn'] = 'ISO 15919 Indic', ['bra'] = 'ISO 15919 Indic', ['doi'] = 'ISO 15919 Indic', ['dra'] = 'ISO 15919 Indic', ['gon'] = 'ISO 15919 Indic', ['gu'] = 'ISO 15919 Indic', ['hi'] = 'ISO 15919 Indic', ['hno'] = 'ISO 15919 Indic', ['inc'] = 'ISO 15919 Indic', ['kn'] = 'ISO 15919 Indic', ['kok'] = 'ISO 15919 Indic', ['ks'] = 'ISO 15919 Indic', ['mag'] = 'ISO 15919 Indic', ['mai'] = 'ISO 15919 Indic', ['ml'] = 'ISO 15919 Indic', ['mr'] = 'ISO 15919 Indic', ['ne'] = 'ISO 15919 Indic', ['new'] = 'ISO 15919 Indic', ['or'] = 'ISO 15919 Indic', ['pa'] = 'ISO 15919 Indic', ['pnb'] = 'ISO 15919 Indic', ['raj'] = 'ISO 15919 Indic', ['sa'] = 'ISO 15919 Indic', ['sat'] = 'ISO 15919 Indic', ['sd'] = 'ISO 15919 Indic', ['si'] = 'ISO 15919 Indic', ['skr'] = 'ISO 15919 Indic', ['ta'] = 'ISO 15919 Indic', ['tcy'] = 'ISO 15919 Indic', ['te'] = 'ISO 15919 Indic', ['beng'] = 'ISO 15919 Indic', ['brah'] = 'ISO 15919 Indic', ['deva'] = 'ISO 15919 Indic', ['gujr'] = 'ISO 15919 Indic', ['guru'] = 'ISO 15919 Indic', ['knda'] = 'ISO 15919 Indic', ['mlym'] = 'ISO 15919 Indic', ['orya'] = 'ISO 15919 Indic', ['sinh'] = 'ISO 15919 Indic', ['taml'] = 'ISO 15919 Indic', ['telu'] = 'ISO 15919 Indic', ['default'] = 'ISO transliteration', }, ['jyutping'] = { ['default'] = 'Jyutping transliteration', }, ['mlcts'] = { ['default'] = 'Myanmar Language Commission Transcription System', }, ['mr'] = { ['default'] = 'McCune–Reischauer transliteration', }, ['nihon-shiki'] = { ['default'] = 'Nihon-shiki transliteration', }, ['no_std'] = { -- when no transliteration standard is supplied ['akk'] = 'Semitic transliteration', ['sem'] = 'Semitic transliteration', ['phnx'] = 'Semitic transliteration', ['xsux'] = 'Cuneiform transliteration', }, ['pinyin'] = { ['default'] = 'Pinyin transliteration', }, ['rr'] = { ['default'] = 'Revised Romanization of Korean transliteration', }, ['rtgs'] = { ['default'] = 'Royal Thai General System of Transcription', }, ['satts'] = { ['default'] = 'Standard Arabic Technical Transliteration System transliteration', }, ['scientific'] = { ['default'] = 'scientific transliteration', }, ['ukrainian'] = { ['default'] = 'Ukrainian National system of romanization', }, ['ungegn'] = { ['default'] = 'United Nations Group of Experts on Geographical Names transliteration', }, ['wadegile'] = { ['default'] = 'Wade–Giles transliteration', }, ['wehr'] = { ['default'] = 'Hans Wehr transliteration', }, }; return { this_wiki_lang_tag = this_wiki_lang_tag, this_wiki_lang_dir = lang_obj:getDir(), -- wiki's language direction article_name = article_name, lang_name_table = lang_name_table_t, override = override, rtl_scripts = rtl_scripts, special_tags_table = special_tags_table, translit_title_table = translit_title_table, }; 44981b3b66900e816590946e3e049c421ebecc80 Module:Language/data/iana languages 828 363 717 716 2023-06-23T00:30:27Z Tasha04 2 1 revision imported Scribunto text/plain -- File-Date: 2023-05-11 local active = { ["aa"] = {"Afar"}, ["ab"] = {"Abkhazian"}, ["ae"] = {"Avestan"}, ["af"] = {"Afrikaans"}, ["ak"] = {"Akan"}, ["am"] = {"Amharic"}, ["an"] = {"Aragonese"}, ["ar"] = {"Arabic"}, ["as"] = {"Assamese"}, ["av"] = {"Avaric"}, ["ay"] = {"Aymara"}, ["az"] = {"Azerbaijani"}, ["ba"] = {"Bashkir"}, ["be"] = {"Belarusian"}, ["bg"] = {"Bulgarian"}, ["bh"] = {"Bihari languages"}, ["bi"] = {"Bislama"}, ["bm"] = {"Bambara"}, ["bn"] = {"Bengali", "Bangla"}, ["bo"] = {"Tibetan"}, ["br"] = {"Breton"}, ["bs"] = {"Bosnian"}, ["ca"] = {"Catalan", "Valencian"}, ["ce"] = {"Chechen"}, ["ch"] = {"Chamorro"}, ["co"] = {"Corsican"}, ["cr"] = {"Cree"}, ["cs"] = {"Czech"}, ["cu"] = {"Church Slavic", "Church Slavonic", "Old Bulgarian", "Old Church Slavonic", "Old Slavonic"}, ["cv"] = {"Chuvash"}, ["cy"] = {"Welsh"}, ["da"] = {"Danish"}, ["de"] = {"German"}, ["dv"] = {"Dhivehi", "Divehi", "Maldivian"}, ["dz"] = {"Dzongkha"}, ["ee"] = {"Ewe"}, ["el"] = {"Modern Greek (1453-)"}, ["en"] = {"English"}, ["eo"] = {"Esperanto"}, ["es"] = {"Spanish", "Castilian"}, ["et"] = {"Estonian"}, ["eu"] = {"Basque"}, ["fa"] = {"Persian"}, ["ff"] = {"Fulah"}, ["fi"] = {"Finnish"}, ["fj"] = {"Fijian"}, ["fo"] = {"Faroese"}, ["fr"] = {"French"}, ["fy"] = {"Western Frisian"}, ["ga"] = {"Irish"}, ["gd"] = {"Scottish Gaelic", "Gaelic"}, ["gl"] = {"Galician"}, ["gn"] = {"Guarani"}, ["gu"] = {"Gujarati"}, ["gv"] = {"Manx"}, ["ha"] = {"Hausa"}, ["he"] = {"Hebrew"}, ["hi"] = {"Hindi"}, ["ho"] = {"Hiri Motu"}, ["hr"] = {"Croatian"}, ["ht"] = {"Haitian", "Haitian Creole"}, ["hu"] = {"Hungarian"}, ["hy"] = {"Armenian"}, ["hz"] = {"Herero"}, ["ia"] = {"Interlingua (International Auxiliary Language Association)"}, ["id"] = {"Indonesian"}, ["ie"] = {"Interlingue", "Occidental"}, ["ig"] = {"Igbo"}, ["ii"] = {"Sichuan Yi", "Nuosu"}, ["ik"] = {"Inupiaq"}, ["io"] = {"Ido"}, ["is"] = {"Icelandic"}, ["it"] = {"Italian"}, ["iu"] = {"Inuktitut"}, ["ja"] = {"Japanese"}, ["jv"] = {"Javanese"}, ["ka"] = {"Georgian"}, ["kg"] = {"Kongo"}, ["ki"] = {"Kikuyu", "Gikuyu"}, ["kj"] = {"Kuanyama", "Kwanyama"}, ["kk"] = {"Kazakh"}, ["kl"] = {"Kalaallisut", "Greenlandic"}, ["km"] = {"Khmer", "Central Khmer"}, ["kn"] = {"Kannada"}, ["ko"] = {"Korean"}, ["kr"] = {"Kanuri"}, ["ks"] = {"Kashmiri"}, ["ku"] = {"Kurdish"}, ["kv"] = {"Komi"}, ["kw"] = {"Cornish"}, ["ky"] = {"Kirghiz", "Kyrgyz"}, ["la"] = {"Latin"}, ["lb"] = {"Luxembourgish", "Letzeburgesch"}, ["lg"] = {"Ganda", "Luganda"}, ["li"] = {"Limburgan", "Limburger", "Limburgish"}, ["ln"] = {"Lingala"}, ["lo"] = {"Lao"}, ["lt"] = {"Lithuanian"}, ["lu"] = {"Luba-Katanga"}, ["lv"] = {"Latvian"}, ["mg"] = {"Malagasy"}, ["mh"] = {"Marshallese"}, ["mi"] = {"Maori"}, ["mk"] = {"Macedonian"}, ["ml"] = {"Malayalam"}, ["mn"] = {"Mongolian"}, ["mr"] = {"Marathi"}, ["ms"] = {"Malay (macrolanguage)"}, ["mt"] = {"Maltese"}, ["my"] = {"Burmese"}, ["na"] = {"Nauru"}, ["nb"] = {"Norwegian Bokmål"}, ["nd"] = {"North Ndebele"}, ["ne"] = {"Nepali (macrolanguage)"}, ["ng"] = {"Ndonga"}, ["nl"] = {"Dutch", "Flemish"}, ["nn"] = {"Norwegian Nynorsk"}, ["no"] = {"Norwegian"}, ["nr"] = {"South Ndebele"}, ["nv"] = {"Navajo", "Navaho"}, ["ny"] = {"Nyanja", "Chewa", "Chichewa"}, ["oc"] = {"Occitan (post 1500)"}, ["oj"] = {"Ojibwa"}, ["om"] = {"Oromo"}, ["or"] = {"Oriya (macrolanguage)", "Odia (macrolanguage)"}, ["os"] = {"Ossetian", "Ossetic"}, ["pa"] = {"Panjabi", "Punjabi"}, ["pi"] = {"Pali"}, ["pl"] = {"Polish"}, ["ps"] = {"Pushto", "Pashto"}, ["pt"] = {"Portuguese"}, ["qu"] = {"Quechua"}, ["rm"] = {"Romansh"}, ["rn"] = {"Rundi"}, ["ro"] = {"Romanian", "Moldavian", "Moldovan"}, ["ru"] = {"Russian"}, ["rw"] = {"Kinyarwanda"}, ["sa"] = {"Sanskrit"}, ["sc"] = {"Sardinian"}, ["sd"] = {"Sindhi"}, ["se"] = {"Northern Sami"}, ["sg"] = {"Sango"}, ["sh"] = {"Serbo-Croatian"}, ["si"] = {"Sinhala", "Sinhalese"}, ["sk"] = {"Slovak"}, ["sl"] = {"Slovenian"}, ["sm"] = {"Samoan"}, ["sn"] = {"Shona"}, ["so"] = {"Somali"}, ["sq"] = {"Albanian"}, ["sr"] = {"Serbian"}, ["ss"] = {"Swati"}, ["st"] = {"Southern Sotho"}, ["su"] = {"Sundanese"}, ["sv"] = {"Swedish"}, ["sw"] = {"Swahili (macrolanguage)"}, ["ta"] = {"Tamil"}, ["te"] = {"Telugu"}, ["tg"] = {"Tajik"}, ["th"] = {"Thai"}, ["ti"] = {"Tigrinya"}, ["tk"] = {"Turkmen"}, ["tl"] = {"Tagalog"}, ["tn"] = {"Tswana"}, ["to"] = {"Tonga (Tonga Islands)"}, ["tr"] = {"Turkish"}, ["ts"] = {"Tsonga"}, ["tt"] = {"Tatar"}, ["tw"] = {"Twi"}, ["ty"] = {"Tahitian"}, ["ug"] = {"Uighur", "Uyghur"}, ["uk"] = {"Ukrainian"}, ["ur"] = {"Urdu"}, ["uz"] = {"Uzbek"}, ["ve"] = {"Venda"}, ["vi"] = {"Vietnamese"}, ["vo"] = {"Volapük"}, ["wa"] = {"Walloon"}, ["wo"] = {"Wolof"}, ["xh"] = {"Xhosa"}, ["yi"] = {"Yiddish"}, ["yo"] = {"Yoruba"}, ["za"] = {"Zhuang", "Chuang"}, ["zh"] = {"Chinese"}, ["zu"] = {"Zulu"}, ["aaa"] = {"Ghotuo"}, ["aab"] = {"Alumu-Tesu"}, ["aac"] = {"Ari"}, ["aad"] = {"Amal"}, ["aae"] = {"Arbëreshë Albanian"}, ["aaf"] = {"Aranadan"}, ["aag"] = {"Ambrak"}, ["aah"] = {"Abu' Arapesh"}, ["aai"] = {"Arifama-Miniafia"}, ["aak"] = {"Ankave"}, ["aal"] = {"Afade"}, ["aan"] = {"Anambé"}, ["aao"] = {"Algerian Saharan Arabic"}, ["aap"] = {"Pará Arára"}, ["aaq"] = {"Eastern Abnaki"}, ["aas"] = {"Aasáx"}, ["aat"] = {"Arvanitika Albanian"}, ["aau"] = {"Abau"}, ["aav"] = {"Austro-Asiatic languages"}, ["aaw"] = {"Solong"}, ["aax"] = {"Mandobo Atas"}, ["aaz"] = {"Amarasi"}, ["aba"] = {"Abé"}, ["abb"] = {"Bankon"}, ["abc"] = {"Ambala Ayta"}, ["abd"] = {"Manide"}, ["abe"] = {"Western Abnaki"}, ["abf"] = {"Abai Sungai"}, ["abg"] = {"Abaga"}, ["abh"] = {"Tajiki Arabic"}, ["abi"] = {"Abidji"}, ["abj"] = {"Aka-Bea"}, ["abl"] = {"Lampung Nyo"}, ["abm"] = {"Abanyom"}, ["abn"] = {"Abua"}, ["abo"] = {"Abon"}, ["abp"] = {"Abellen Ayta"}, ["abq"] = {"Abaza"}, ["abr"] = {"Abron"}, ["abs"] = {"Ambonese Malay"}, ["abt"] = {"Ambulas"}, ["abu"] = {"Abure"}, ["abv"] = {"Baharna Arabic"}, ["abw"] = {"Pal"}, ["abx"] = {"Inabaknon"}, ["aby"] = {"Aneme Wake"}, ["abz"] = {"Abui"}, ["aca"] = {"Achagua"}, ["acb"] = {"Áncá"}, ["acd"] = {"Gikyode"}, ["ace"] = {"Achinese"}, ["acf"] = {"Saint Lucian Creole French"}, ["ach"] = {"Acoli"}, ["aci"] = {"Aka-Cari"}, ["ack"] = {"Aka-Kora"}, ["acl"] = {"Akar-Bale"}, ["acm"] = {"Mesopotamian Arabic"}, ["acn"] = {"Achang"}, ["acp"] = {"Eastern Acipa"}, ["acq"] = {"Ta'izzi-Adeni Arabic"}, ["acr"] = {"Achi"}, ["acs"] = {"Acroá"}, ["act"] = {"Achterhoeks"}, ["acu"] = {"Achuar-Shiwiar"}, ["acv"] = {"Achumawi"}, ["acw"] = {"Hijazi Arabic"}, ["acx"] = {"Omani Arabic"}, ["acy"] = {"Cypriot Arabic"}, ["acz"] = {"Acheron"}, ["ada"] = {"Adangme"}, ["adb"] = {"Atauran"}, ["add"] = {"Lidzonka", "Dzodinka"}, ["ade"] = {"Adele"}, ["adf"] = {"Dhofari Arabic"}, ["adg"] = {"Andegerebinha"}, ["adh"] = {"Adhola"}, ["adi"] = {"Adi"}, ["adj"] = {"Adioukrou"}, ["adl"] = {"Galo"}, ["adn"] = {"Adang"}, ["ado"] = {"Abu"}, ["adq"] = {"Adangbe"}, ["adr"] = {"Adonara"}, ["ads"] = {"Adamorobe Sign Language"}, ["adt"] = {"Adnyamathanha"}, ["adu"] = {"Aduge"}, ["adw"] = {"Amundava"}, ["adx"] = {"Amdo Tibetan"}, ["ady"] = {"Adyghe", "Adygei"}, ["adz"] = {"Adzera"}, ["aea"] = {"Areba"}, ["aeb"] = {"Tunisian Arabic"}, ["aec"] = {"Saidi Arabic"}, ["aed"] = {"Argentine Sign Language"}, ["aee"] = {"Northeast Pashai", "Northeast Pashayi"}, ["aek"] = {"Haeke"}, ["ael"] = {"Ambele"}, ["aem"] = {"Arem"}, ["aen"] = {"Armenian Sign Language"}, ["aeq"] = {"Aer"}, ["aer"] = {"Eastern Arrernte"}, ["aes"] = {"Alsea"}, ["aeu"] = {"Akeu"}, ["aew"] = {"Ambakich"}, ["aey"] = {"Amele"}, ["aez"] = {"Aeka"}, ["afa"] = {"Afro-Asiatic languages"}, ["afb"] = {"Gulf Arabic"}, ["afd"] = {"Andai"}, ["afe"] = {"Putukwam"}, ["afg"] = {"Afghan Sign Language"}, ["afh"] = {"Afrihili"}, ["afi"] = {"Akrukay", "Chini"}, ["afk"] = {"Nanubae"}, ["afn"] = {"Defaka"}, ["afo"] = {"Eloyi"}, ["afp"] = {"Tapei"}, ["afs"] = {"Afro-Seminole Creole"}, ["aft"] = {"Afitti"}, ["afu"] = {"Awutu"}, ["afz"] = {"Obokuitai"}, ["aga"] = {"Aguano"}, ["agb"] = {"Legbo"}, ["agc"] = {"Agatu"}, ["agd"] = {"Agarabi"}, ["age"] = {"Angal"}, ["agf"] = {"Arguni"}, ["agg"] = {"Angor"}, ["agh"] = {"Ngelima"}, ["agi"] = {"Agariya"}, ["agj"] = {"Argobba"}, ["agk"] = {"Isarog Agta"}, ["agl"] = {"Fembe"}, ["agm"] = {"Angaataha"}, ["agn"] = {"Agutaynen"}, ["ago"] = {"Tainae"}, ["agq"] = {"Aghem"}, ["agr"] = {"Aguaruna"}, ["ags"] = {"Esimbi"}, ["agt"] = {"Central Cagayan Agta"}, ["agu"] = {"Aguacateco"}, ["agv"] = {"Remontado Dumagat"}, ["agw"] = {"Kahua"}, ["agx"] = {"Aghul"}, ["agy"] = {"Southern Alta"}, ["agz"] = {"Mt. Iriga Agta"}, ["aha"] = {"Ahanta"}, ["ahb"] = {"Axamb"}, ["ahg"] = {"Qimant"}, ["ahh"] = {"Aghu"}, ["ahi"] = {"Tiagbamrin Aizi"}, ["ahk"] = {"Akha"}, ["ahl"] = {"Igo"}, ["ahm"] = {"Mobumrin Aizi"}, ["ahn"] = {"Àhàn"}, ["aho"] = {"Ahom"}, ["ahp"] = {"Aproumu Aizi"}, ["ahr"] = {"Ahirani"}, ["ahs"] = {"Ashe"}, ["aht"] = {"Ahtena"}, ["aia"] = {"Arosi"}, ["aib"] = {"Ainu (China)"}, ["aic"] = {"Ainbai"}, ["aid"] = {"Alngith"}, ["aie"] = {"Amara"}, ["aif"] = {"Agi"}, ["aig"] = {"Antigua and Barbuda Creole English"}, ["aih"] = {"Ai-Cham"}, ["aii"] = {"Assyrian Neo-Aramaic"}, ["aij"] = {"Lishanid Noshan"}, ["aik"] = {"Ake"}, ["ail"] = {"Aimele"}, ["aim"] = {"Aimol"}, ["ain"] = {"Ainu (Japan)"}, ["aio"] = {"Aiton"}, ["aip"] = {"Burumakok"}, ["aiq"] = {"Aimaq"}, ["air"] = {"Airoran"}, ["ait"] = {"Arikem"}, ["aiw"] = {"Aari"}, ["aix"] = {"Aighon"}, ["aiy"] = {"Ali"}, ["aja"] = {"Aja (South Sudan)"}, ["ajg"] = {"Aja (Benin)"}, ["aji"] = {"Ajië"}, ["ajn"] = {"Andajin"}, ["ajs"] = {"Algerian Jewish Sign Language"}, ["aju"] = {"Judeo-Moroccan Arabic"}, ["ajw"] = {"Ajawa"}, ["ajz"] = {"Amri Karbi"}, ["akb"] = {"Batak Angkola"}, ["akc"] = {"Mpur"}, ["akd"] = {"Ukpet-Ehom"}, ["ake"] = {"Akawaio"}, ["akf"] = {"Akpa"}, ["akg"] = {"Anakalangu"}, ["akh"] = {"Angal Heneng"}, ["aki"] = {"Aiome"}, ["akj"] = {"Aka-Jeru"}, ["akk"] = {"Akkadian"}, ["akl"] = {"Aklanon"}, ["akm"] = {"Aka-Bo"}, ["ako"] = {"Akurio"}, ["akp"] = {"Siwu"}, ["akq"] = {"Ak"}, ["akr"] = {"Araki"}, ["aks"] = {"Akaselem"}, ["akt"] = {"Akolet"}, ["aku"] = {"Akum"}, ["akv"] = {"Akhvakh"}, ["akw"] = {"Akwa"}, ["akx"] = {"Aka-Kede"}, ["aky"] = {"Aka-Kol"}, ["akz"] = {"Alabama"}, ["ala"] = {"Alago"}, ["alc"] = {"Qawasqar"}, ["ald"] = {"Alladian"}, ["ale"] = {"Aleut"}, ["alf"] = {"Alege"}, ["alg"] = {"Algonquian languages"}, ["alh"] = {"Alawa"}, ["ali"] = {"Amaimon"}, ["alj"] = {"Alangan"}, ["alk"] = {"Alak"}, ["all"] = {"Allar"}, ["alm"] = {"Amblong"}, ["aln"] = {"Gheg Albanian"}, ["alo"] = {"Larike-Wakasihu"}, ["alp"] = {"Alune"}, ["alq"] = {"Algonquin"}, ["alr"] = {"Alutor"}, ["als"] = {"Tosk Albanian"}, ["alt"] = {"Southern Altai"}, ["alu"] = {"'Are'are"}, ["alv"] = {"Atlantic-Congo languages"}, ["alw"] = {"Alaba-K’abeena", "Wanbasana"}, ["alx"] = {"Amol"}, ["aly"] = {"Alyawarr"}, ["alz"] = {"Alur"}, ["ama"] = {"Amanayé"}, ["amb"] = {"Ambo"}, ["amc"] = {"Amahuaca"}, ["ame"] = {"Yanesha'"}, ["amf"] = {"Hamer-Banna"}, ["amg"] = {"Amurdak"}, ["ami"] = {"Amis"}, ["amj"] = {"Amdang"}, ["amk"] = {"Ambai"}, ["aml"] = {"War-Jaintia"}, ["amm"] = {"Ama (Papua New Guinea)"}, ["amn"] = {"Amanab"}, ["amo"] = {"Amo"}, ["amp"] = {"Alamblak"}, ["amq"] = {"Amahai"}, ["amr"] = {"Amarakaeri"}, ["ams"] = {"Southern Amami-Oshima"}, ["amt"] = {"Amto"}, ["amu"] = {"Guerrero Amuzgo"}, ["amv"] = {"Ambelau"}, ["amw"] = {"Western Neo-Aramaic"}, ["amx"] = {"Anmatyerre"}, ["amy"] = {"Ami"}, ["amz"] = {"Atampaya"}, ["ana"] = {"Andaqui"}, ["anb"] = {"Andoa"}, ["anc"] = {"Ngas"}, ["and"] = {"Ansus"}, ["ane"] = {"Xârâcùù"}, ["anf"] = {"Animere"}, ["ang"] = {"Old English (ca. 450-1100)"}, ["anh"] = {"Nend"}, ["ani"] = {"Andi"}, ["anj"] = {"Anor"}, ["ank"] = {"Goemai"}, ["anl"] = {"Anu-Hkongso Chin"}, ["anm"] = {"Anal"}, ["ann"] = {"Obolo"}, ["ano"] = {"Andoque"}, ["anp"] = {"Angika"}, ["anq"] = {"Jarawa (India)"}, ["anr"] = {"Andh"}, ["ans"] = {"Anserma"}, ["ant"] = {"Antakarinya", "Antikarinya"}, ["anu"] = {"Anuak"}, ["anv"] = {"Denya"}, ["anw"] = {"Anaang"}, ["anx"] = {"Andra-Hus"}, ["any"] = {"Anyin"}, ["anz"] = {"Anem"}, ["aoa"] = {"Angolar"}, ["aob"] = {"Abom"}, ["aoc"] = {"Pemon"}, ["aod"] = {"Andarum"}, ["aoe"] = {"Angal Enen"}, ["aof"] = {"Bragat"}, ["aog"] = {"Angoram"}, ["aoi"] = {"Anindilyakwa"}, ["aoj"] = {"Mufian"}, ["aok"] = {"Arhö"}, ["aol"] = {"Alor"}, ["aom"] = {"Ömie"}, ["aon"] = {"Bumbita Arapesh"}, ["aor"] = {"Aore"}, ["aos"] = {"Taikat"}, ["aot"] = {"Atong (India)", "A'tong"}, ["aou"] = {"A'ou"}, ["aox"] = {"Atorada"}, ["aoz"] = {"Uab Meto"}, ["apa"] = {"Apache languages"}, ["apb"] = {"Sa'a"}, ["apc"] = {"Levantine Arabic"}, ["apd"] = {"Sudanese Arabic"}, ["ape"] = {"Bukiyip"}, ["apf"] = {"Pahanan Agta"}, ["apg"] = {"Ampanang"}, ["aph"] = {"Athpariya"}, ["api"] = {"Apiaká"}, ["apj"] = {"Jicarilla Apache"}, ["apk"] = {"Kiowa Apache"}, ["apl"] = {"Lipan Apache"}, ["apm"] = {"Mescalero-Chiricahua Apache"}, ["apn"] = {"Apinayé"}, ["apo"] = {"Ambul"}, ["app"] = {"Apma"}, ["apq"] = {"A-Pucikwar"}, ["apr"] = {"Arop-Lokep"}, ["aps"] = {"Arop-Sissano"}, ["apt"] = {"Apatani"}, ["apu"] = {"Apurinã"}, ["apv"] = {"Alapmunte"}, ["apw"] = {"Western Apache"}, ["apx"] = {"Aputai"}, ["apy"] = {"Apalaí"}, ["apz"] = {"Safeyoka"}, ["aqa"] = {"Alacalufan languages"}, ["aqc"] = {"Archi"}, ["aqd"] = {"Ampari Dogon"}, ["aqg"] = {"Arigidi"}, ["aqk"] = {"Aninka"}, ["aql"] = {"Algic languages"}, ["aqm"] = {"Atohwaim"}, ["aqn"] = {"Northern Alta"}, ["aqp"] = {"Atakapa"}, ["aqr"] = {"Arhâ"}, ["aqt"] = {"Angaité"}, ["aqz"] = {"Akuntsu"}, ["arb"] = {"Standard Arabic"}, ["arc"] = {"Official Aramaic (700-300 BCE)", "Imperial Aramaic (700-300 BCE)"}, ["ard"] = {"Arabana"}, ["are"] = {"Western Arrarnta"}, ["arh"] = {"Arhuaco"}, ["ari"] = {"Arikara"}, ["arj"] = {"Arapaso"}, ["ark"] = {"Arikapú"}, ["arl"] = {"Arabela"}, ["arn"] = {"Mapudungun", "Mapuche"}, ["aro"] = {"Araona"}, ["arp"] = {"Arapaho"}, ["arq"] = {"Algerian Arabic"}, ["arr"] = {"Karo (Brazil)"}, ["ars"] = {"Najdi Arabic"}, ["art"] = {"Artificial languages"}, ["aru"] = {"Aruá (Amazonas State)", "Arawá"}, ["arv"] = {"Arbore"}, ["arw"] = {"Arawak"}, ["arx"] = {"Aruá (Rodonia State)"}, ["ary"] = {"Moroccan Arabic"}, ["arz"] = {"Egyptian Arabic"}, ["asa"] = {"Asu (Tanzania)"}, ["asb"] = {"Assiniboine"}, ["asc"] = {"Casuarina Coast Asmat"}, ["ase"] = {"American Sign Language"}, ["asf"] = {"Auslan", "Australian Sign Language"}, ["asg"] = {"Cishingini"}, ["ash"] = {"Abishira"}, ["asi"] = {"Buruwai"}, ["asj"] = {"Sari"}, ["ask"] = {"Ashkun"}, ["asl"] = {"Asilulu"}, ["asn"] = {"Xingú Asuriní"}, ["aso"] = {"Dano"}, ["asp"] = {"Algerian Sign Language"}, ["asq"] = {"Austrian Sign Language"}, ["asr"] = {"Asuri"}, ["ass"] = {"Ipulo"}, ["ast"] = {"Asturian", "Asturleonese", "Bable", "Leonese"}, ["asu"] = {"Tocantins Asurini"}, ["asv"] = {"Asoa"}, ["asw"] = {"Australian Aborigines Sign Language"}, ["asx"] = {"Muratayak"}, ["asy"] = {"Yaosakor Asmat"}, ["asz"] = {"As"}, ["ata"] = {"Pele-Ata"}, ["atb"] = {"Zaiwa"}, ["atc"] = {"Atsahuaca"}, ["atd"] = {"Ata Manobo"}, ["ate"] = {"Atemble"}, ["atg"] = {"Ivbie North-Okpela-Arhe"}, ["ath"] = {"Athapascan languages"}, ["ati"] = {"Attié"}, ["atj"] = {"Atikamekw"}, ["atk"] = {"Ati"}, ["atl"] = {"Mt. Iraya Agta"}, ["atm"] = {"Ata"}, ["atn"] = {"Ashtiani"}, ["ato"] = {"Atong (Cameroon)"}, ["atp"] = {"Pudtol Atta"}, ["atq"] = {"Aralle-Tabulahan"}, ["atr"] = {"Waimiri-Atroari"}, ["ats"] = {"Gros Ventre"}, ["att"] = {"Pamplona Atta"}, ["atu"] = {"Reel"}, ["atv"] = {"Northern Altai"}, ["atw"] = {"Atsugewi"}, ["atx"] = {"Arutani"}, ["aty"] = {"Aneityum"}, ["atz"] = {"Arta"}, ["aua"] = {"Asumboa"}, ["aub"] = {"Alugu"}, ["auc"] = {"Waorani"}, ["aud"] = {"Anuta"}, ["auf"] = {"Arauan languages"}, ["aug"] = {"Aguna"}, ["auh"] = {"Aushi"}, ["aui"] = {"Anuki"}, ["auj"] = {"Awjilah"}, ["auk"] = {"Heyo"}, ["aul"] = {"Aulua"}, ["aum"] = {"Asu (Nigeria)"}, ["aun"] = {"Molmo One"}, ["auo"] = {"Auyokawa"}, ["aup"] = {"Makayam"}, ["auq"] = {"Anus", "Korur"}, ["aur"] = {"Aruek"}, ["aus"] = {"Australian languages"}, ["aut"] = {"Austral"}, ["auu"] = {"Auye"}, ["auw"] = {"Awyi"}, ["aux"] = {"Aurá"}, ["auy"] = {"Awiyaana"}, ["auz"] = {"Uzbeki Arabic"}, ["avb"] = {"Avau"}, ["avd"] = {"Alviri-Vidari"}, ["avi"] = {"Avikam"}, ["avk"] = {"Kotava"}, ["avl"] = {"Eastern Egyptian Bedawi Arabic"}, ["avm"] = {"Angkamuthi"}, ["avn"] = {"Avatime"}, ["avo"] = {"Agavotaguerra"}, ["avs"] = {"Aushiri"}, ["avt"] = {"Au"}, ["avu"] = {"Avokaya"}, ["avv"] = {"Avá-Canoeiro"}, ["awa"] = {"Awadhi"}, ["awb"] = {"Awa (Papua New Guinea)"}, ["awc"] = {"Cicipu"}, ["awd"] = {"Arawakan languages"}, ["awe"] = {"Awetí"}, ["awg"] = {"Anguthimri"}, ["awh"] = {"Awbono"}, ["awi"] = {"Aekyom"}, ["awk"] = {"Awabakal"}, ["awm"] = {"Arawum"}, ["awn"] = {"Awngi"}, ["awo"] = {"Awak"}, ["awr"] = {"Awera"}, ["aws"] = {"South Awyu"}, ["awt"] = {"Araweté"}, ["awu"] = {"Central Awyu"}, ["awv"] = {"Jair Awyu"}, ["aww"] = {"Awun"}, ["awx"] = {"Awara"}, ["awy"] = {"Edera Awyu"}, ["axb"] = {"Abipon"}, ["axe"] = {"Ayerrerenge"}, ["axg"] = {"Mato Grosso Arára"}, ["axk"] = {"Yaka (Central African Republic)"}, ["axl"] = {"Lower Southern Aranda"}, ["axm"] = {"Middle Armenian"}, ["axx"] = {"Xârâgurè"}, ["aya"] = {"Awar"}, ["ayb"] = {"Ayizo Gbe"}, ["ayc"] = {"Southern Aymara"}, ["ayd"] = {"Ayabadhu"}, ["aye"] = {"Ayere"}, ["ayg"] = {"Ginyanga"}, ["ayh"] = {"Hadrami Arabic"}, ["ayi"] = {"Leyigha"}, ["ayk"] = {"Akuku"}, ["ayl"] = {"Libyan Arabic"}, ["ayn"] = {"Sanaani Arabic"}, ["ayo"] = {"Ayoreo"}, ["ayp"] = {"North Mesopotamian Arabic"}, ["ayq"] = {"Ayi (Papua New Guinea)"}, ["ayr"] = {"Central Aymara"}, ["ays"] = {"Sorsogon Ayta"}, ["ayt"] = {"Magbukun Ayta"}, ["ayu"] = {"Ayu"}, ["ayz"] = {"Mai Brat"}, ["aza"] = {"Azha"}, ["azb"] = {"South Azerbaijani"}, ["azc"] = {"Uto-Aztecan languages"}, ["azd"] = {"Eastern Durango Nahuatl"}, ["azg"] = {"San Pedro Amuzgos Amuzgo"}, ["azj"] = {"North Azerbaijani"}, ["azm"] = {"Ipalapa Amuzgo"}, ["azn"] = {"Western Durango Nahuatl"}, ["azo"] = {"Awing"}, ["azt"] = {"Faire Atta"}, ["azz"] = {"Highland Puebla Nahuatl"}, ["baa"] = {"Babatana"}, ["bab"] = {"Bainouk-Gunyuño"}, ["bac"] = {"Badui"}, ["bad"] = {"Banda languages"}, ["bae"] = {"Baré"}, ["baf"] = {"Nubaca"}, ["bag"] = {"Tuki"}, ["bah"] = {"Bahamas Creole English"}, ["bai"] = {"Bamileke languages"}, ["baj"] = {"Barakai"}, ["bal"] = {"Baluchi"}, ["ban"] = {"Balinese"}, ["bao"] = {"Waimaha"}, ["bap"] = {"Bantawa"}, ["bar"] = {"Bavarian"}, ["bas"] = {"Basa (Cameroon)"}, ["bat"] = {"Baltic languages"}, ["bau"] = {"Bada (Nigeria)"}, ["bav"] = {"Vengo"}, ["baw"] = {"Bambili-Bambui"}, ["bax"] = {"Bamun"}, ["bay"] = {"Batuley"}, ["bba"] = {"Baatonum"}, ["bbb"] = {"Barai"}, ["bbc"] = {"Batak Toba"}, ["bbd"] = {"Bau"}, ["bbe"] = {"Bangba"}, ["bbf"] = {"Baibai"}, ["bbg"] = {"Barama"}, ["bbh"] = {"Bugan"}, ["bbi"] = {"Barombi"}, ["bbj"] = {"Ghomálá'"}, ["bbk"] = {"Babanki"}, ["bbl"] = {"Bats"}, ["bbm"] = {"Babango"}, ["bbn"] = {"Uneapa"}, ["bbo"] = {"Northern Bobo Madaré", "Konabéré"}, ["bbp"] = {"West Central Banda"}, ["bbq"] = {"Bamali"}, ["bbr"] = {"Girawa"}, ["bbs"] = {"Bakpinka"}, ["bbt"] = {"Mburku"}, ["bbu"] = {"Kulung (Nigeria)"}, ["bbv"] = {"Karnai"}, ["bbw"] = {"Baba"}, ["bbx"] = {"Bubia"}, ["bby"] = {"Befang"}, ["bca"] = {"Central Bai"}, ["bcb"] = {"Bainouk-Samik"}, ["bcc"] = {"Southern Balochi"}, ["bcd"] = {"North Babar"}, ["bce"] = {"Bamenyam"}, ["bcf"] = {"Bamu"}, ["bcg"] = {"Baga Pokur"}, ["bch"] = {"Bariai"}, ["bci"] = {"Baoulé"}, ["bcj"] = {"Bardi"}, ["bck"] = {"Bunuba"}, ["bcl"] = {"Central Bikol"}, ["bcm"] = {"Bannoni"}, ["bcn"] = {"Bali (Nigeria)"}, ["bco"] = {"Kaluli"}, ["bcp"] = {"Bali (Democratic Republic of Congo)"}, ["bcq"] = {"Bench"}, ["bcr"] = {"Babine"}, ["bcs"] = {"Kohumono"}, ["bct"] = {"Bendi"}, ["bcu"] = {"Awad Bing"}, ["bcv"] = {"Shoo-Minda-Nye"}, ["bcw"] = {"Bana"}, ["bcy"] = {"Bacama"}, ["bcz"] = {"Bainouk-Gunyaamolo"}, ["bda"] = {"Bayot"}, ["bdb"] = {"Basap"}, ["bdc"] = {"Emberá-Baudó"}, ["bdd"] = {"Bunama"}, ["bde"] = {"Bade"}, ["bdf"] = {"Biage"}, ["bdg"] = {"Bonggi"}, ["bdh"] = {"Baka (South Sudan)"}, ["bdi"] = {"Burun"}, ["bdj"] = {"Bai (South Sudan)", "Bai"}, ["bdk"] = {"Budukh"}, ["bdl"] = {"Indonesian Bajau"}, ["bdm"] = {"Buduma"}, ["bdn"] = {"Baldemu"}, ["bdo"] = {"Morom"}, ["bdp"] = {"Bende"}, ["bdq"] = {"Bahnar"}, ["bdr"] = {"West Coast Bajau"}, ["bds"] = {"Burunge"}, ["bdt"] = {"Bokoto"}, ["bdu"] = {"Oroko"}, ["bdv"] = {"Bodo Parja"}, ["bdw"] = {"Baham"}, ["bdx"] = {"Budong-Budong"}, ["bdy"] = {"Bandjalang"}, ["bdz"] = {"Badeshi"}, ["bea"] = {"Beaver"}, ["beb"] = {"Bebele"}, ["bec"] = {"Iceve-Maci"}, ["bed"] = {"Bedoanas"}, ["bee"] = {"Byangsi"}, ["bef"] = {"Benabena"}, ["beg"] = {"Belait"}, ["beh"] = {"Biali"}, ["bei"] = {"Bekati'"}, ["bej"] = {"Beja", "Bedawiyet"}, ["bek"] = {"Bebeli"}, ["bem"] = {"Bemba (Zambia)"}, ["beo"] = {"Beami"}, ["bep"] = {"Besoa"}, ["beq"] = {"Beembe"}, ["ber"] = {"Berber languages"}, ["bes"] = {"Besme"}, ["bet"] = {"Guiberoua Béte"}, ["beu"] = {"Blagar"}, ["bev"] = {"Daloa Bété"}, ["bew"] = {"Betawi"}, ["bex"] = {"Jur Modo"}, ["bey"] = {"Beli (Papua New Guinea)"}, ["bez"] = {"Bena (Tanzania)"}, ["bfa"] = {"Bari"}, ["bfb"] = {"Pauri Bareli"}, ["bfc"] = {"Panyi Bai", "Northern Bai"}, ["bfd"] = {"Bafut"}, ["bfe"] = {"Betaf", "Tena"}, ["bff"] = {"Bofi"}, ["bfg"] = {"Busang Kayan"}, ["bfh"] = {"Blafe"}, ["bfi"] = {"British Sign Language"}, ["bfj"] = {"Bafanji"}, ["bfk"] = {"Ban Khor Sign Language"}, ["bfl"] = {"Banda-Ndélé"}, ["bfm"] = {"Mmen"}, ["bfn"] = {"Bunak"}, ["bfo"] = {"Malba Birifor"}, ["bfp"] = {"Beba"}, ["bfq"] = {"Badaga"}, ["bfr"] = {"Bazigar"}, ["bfs"] = {"Southern Bai"}, ["bft"] = {"Balti"}, ["bfu"] = {"Gahri"}, ["bfw"] = {"Bondo"}, ["bfx"] = {"Bantayanon"}, ["bfy"] = {"Bagheli"}, ["bfz"] = {"Mahasu Pahari"}, ["bga"] = {"Gwamhi-Wuri"}, ["bgb"] = {"Bobongko"}, ["bgc"] = {"Haryanvi"}, ["bgd"] = {"Rathwi Bareli"}, ["bge"] = {"Bauria"}, ["bgf"] = {"Bangandu"}, ["bgg"] = {"Bugun"}, ["bgi"] = {"Giangan"}, ["bgj"] = {"Bangolan"}, ["bgk"] = {"Bit", "Buxinhua"}, ["bgl"] = {"Bo (Laos)"}, ["bgn"] = {"Western Balochi"}, ["bgo"] = {"Baga Koga"}, ["bgp"] = {"Eastern Balochi"}, ["bgq"] = {"Bagri"}, ["bgr"] = {"Bawm Chin"}, ["bgs"] = {"Tagabawa"}, ["bgt"] = {"Bughotu"}, ["bgu"] = {"Mbongno"}, ["bgv"] = {"Warkay-Bipim"}, ["bgw"] = {"Bhatri"}, ["bgx"] = {"Balkan Gagauz Turkish"}, ["bgy"] = {"Benggoi"}, ["bgz"] = {"Banggai"}, ["bha"] = {"Bharia"}, ["bhb"] = {"Bhili"}, ["bhc"] = {"Biga"}, ["bhd"] = {"Bhadrawahi"}, ["bhe"] = {"Bhaya"}, ["bhf"] = {"Odiai"}, ["bhg"] = {"Binandere"}, ["bhh"] = {"Bukharic"}, ["bhi"] = {"Bhilali"}, ["bhj"] = {"Bahing"}, ["bhl"] = {"Bimin"}, ["bhm"] = {"Bathari"}, ["bhn"] = {"Bohtan Neo-Aramaic"}, ["bho"] = {"Bhojpuri"}, ["bhp"] = {"Bima"}, ["bhq"] = {"Tukang Besi South"}, ["bhr"] = {"Bara Malagasy"}, ["bhs"] = {"Buwal"}, ["bht"] = {"Bhattiyali"}, ["bhu"] = {"Bhunjia"}, ["bhv"] = {"Bahau"}, ["bhw"] = {"Biak"}, ["bhx"] = {"Bhalay"}, ["bhy"] = {"Bhele"}, ["bhz"] = {"Bada (Indonesia)"}, ["bia"] = {"Badimaya"}, ["bib"] = {"Bissa", "Bisa"}, ["bid"] = {"Bidiyo"}, ["bie"] = {"Bepour"}, ["bif"] = {"Biafada"}, ["big"] = {"Biangai"}, ["bik"] = {"Bikol"}, ["bil"] = {"Bile"}, ["bim"] = {"Bimoba"}, ["bin"] = {"Bini", "Edo"}, ["bio"] = {"Nai"}, ["bip"] = {"Bila"}, ["biq"] = {"Bipi"}, ["bir"] = {"Bisorio"}, ["bit"] = {"Berinomo"}, ["biu"] = {"Biete"}, ["biv"] = {"Southern Birifor"}, ["biw"] = {"Kol (Cameroon)"}, ["bix"] = {"Bijori"}, ["biy"] = {"Birhor"}, ["biz"] = {"Baloi"}, ["bja"] = {"Budza"}, ["bjb"] = {"Banggarla"}, ["bjc"] = {"Bariji"}, ["bje"] = {"Biao-Jiao Mien"}, ["bjf"] = {"Barzani Jewish Neo-Aramaic"}, ["bjg"] = {"Bidyogo"}, ["bjh"] = {"Bahinemo"}, ["bji"] = {"Burji"}, ["bjj"] = {"Kanauji"}, ["bjk"] = {"Barok"}, ["bjl"] = {"Bulu (Papua New Guinea)"}, ["bjm"] = {"Bajelani"}, ["bjn"] = {"Banjar"}, ["bjo"] = {"Mid-Southern Banda"}, ["bjp"] = {"Fanamaket"}, ["bjr"] = {"Binumarien"}, ["bjs"] = {"Bajan"}, ["bjt"] = {"Balanta-Ganja"}, ["bju"] = {"Busuu"}, ["bjv"] = {"Bedjond"}, ["bjw"] = {"Bakwé"}, ["bjx"] = {"Banao Itneg"}, ["bjy"] = {"Bayali"}, ["bjz"] = {"Baruga"}, ["bka"] = {"Kyak"}, ["bkc"] = {"Baka (Cameroon)"}, ["bkd"] = {"Binukid", "Talaandig"}, ["bkf"] = {"Beeke"}, ["bkg"] = {"Buraka"}, ["bkh"] = {"Bakoko"}, ["bki"] = {"Baki"}, ["bkj"] = {"Pande"}, ["bkk"] = {"Brokskat"}, ["bkl"] = {"Berik"}, ["bkm"] = {"Kom (Cameroon)"}, ["bkn"] = {"Bukitan"}, ["bko"] = {"Kwa'"}, ["bkp"] = {"Boko (Democratic Republic of Congo)"}, ["bkq"] = {"Bakairí"}, ["bkr"] = {"Bakumpai"}, ["bks"] = {"Northern Sorsoganon"}, ["bkt"] = {"Boloki"}, ["bku"] = {"Buhid"}, ["bkv"] = {"Bekwarra"}, ["bkw"] = {"Bekwel"}, ["bkx"] = {"Baikeno"}, ["bky"] = {"Bokyi"}, ["bkz"] = {"Bungku"}, ["bla"] = {"Siksika"}, ["blb"] = {"Bilua"}, ["blc"] = {"Bella Coola"}, ["bld"] = {"Bolango"}, ["ble"] = {"Balanta-Kentohe"}, ["blf"] = {"Buol"}, ["blh"] = {"Kuwaa"}, ["bli"] = {"Bolia"}, ["blj"] = {"Bolongan"}, ["blk"] = {"Pa'o Karen", "Pa'O"}, ["bll"] = {"Biloxi"}, ["blm"] = {"Beli (South Sudan)"}, ["bln"] = {"Southern Catanduanes Bikol"}, ["blo"] = {"Anii"}, ["blp"] = {"Blablanga"}, ["blq"] = {"Baluan-Pam"}, ["blr"] = {"Blang"}, ["bls"] = {"Balaesang"}, ["blt"] = {"Tai Dam"}, ["blv"] = {"Kibala", "Bolo"}, ["blw"] = {"Balangao"}, ["blx"] = {"Mag-Indi Ayta"}, ["bly"] = {"Notre"}, ["blz"] = {"Balantak"}, ["bma"] = {"Lame"}, ["bmb"] = {"Bembe"}, ["bmc"] = {"Biem"}, ["bmd"] = {"Baga Manduri"}, ["bme"] = {"Limassa"}, ["bmf"] = {"Bom-Kim"}, ["bmg"] = {"Bamwe"}, ["bmh"] = {"Kein"}, ["bmi"] = {"Bagirmi"}, ["bmj"] = {"Bote-Majhi"}, ["bmk"] = {"Ghayavi"}, ["bml"] = {"Bomboli"}, ["bmm"] = {"Northern Betsimisaraka Malagasy"}, ["bmn"] = {"Bina (Papua New Guinea)"}, ["bmo"] = {"Bambalang"}, ["bmp"] = {"Bulgebi"}, ["bmq"] = {"Bomu"}, ["bmr"] = {"Muinane"}, ["bms"] = {"Bilma Kanuri"}, ["bmt"] = {"Biao Mon"}, ["bmu"] = {"Somba-Siawari"}, ["bmv"] = {"Bum"}, ["bmw"] = {"Bomwali"}, ["bmx"] = {"Baimak"}, ["bmz"] = {"Baramu"}, ["bna"] = {"Bonerate"}, ["bnb"] = {"Bookan"}, ["bnc"] = {"Bontok"}, ["bnd"] = {"Banda (Indonesia)"}, ["bne"] = {"Bintauna"}, ["bnf"] = {"Masiwang"}, ["bng"] = {"Benga"}, ["bni"] = {"Bangi"}, ["bnj"] = {"Eastern Tawbuid"}, ["bnk"] = {"Bierebo"}, ["bnl"] = {"Boon"}, ["bnm"] = {"Batanga"}, ["bnn"] = {"Bunun"}, ["bno"] = {"Bantoanon"}, ["bnp"] = {"Bola"}, ["bnq"] = {"Bantik"}, ["bnr"] = {"Butmas-Tur"}, ["bns"] = {"Bundeli"}, ["bnt"] = {"Bantu languages"}, ["bnu"] = {"Bentong"}, ["bnv"] = {"Bonerif", "Beneraf", "Edwas"}, ["bnw"] = {"Bisis"}, ["bnx"] = {"Bangubangu"}, ["bny"] = {"Bintulu"}, ["bnz"] = {"Beezen"}, ["boa"] = {"Bora"}, ["bob"] = {"Aweer"}, ["boe"] = {"Mundabli"}, ["bof"] = {"Bolon"}, ["bog"] = {"Bamako Sign Language"}, ["boh"] = {"Boma"}, ["boi"] = {"Barbareño"}, ["boj"] = {"Anjam"}, ["bok"] = {"Bonjo"}, ["bol"] = {"Bole"}, ["bom"] = {"Berom"}, ["bon"] = {"Bine"}, ["boo"] = {"Tiemacèwè Bozo"}, ["bop"] = {"Bonkiman"}, ["boq"] = {"Bogaya"}, ["bor"] = {"Borôro"}, ["bot"] = {"Bongo"}, ["bou"] = {"Bondei"}, ["bov"] = {"Tuwuli"}, ["bow"] = {"Rema"}, ["box"] = {"Buamu"}, ["boy"] = {"Bodo (Central African Republic)"}, ["boz"] = {"Tiéyaxo Bozo"}, ["bpa"] = {"Daakaka"}, ["bpc"] = {"Mbuk"}, ["bpd"] = {"Banda-Banda"}, ["bpe"] = {"Bauni"}, ["bpg"] = {"Bonggo"}, ["bph"] = {"Botlikh"}, ["bpi"] = {"Bagupi"}, ["bpj"] = {"Binji"}, ["bpk"] = {"Orowe", "'Ôrôê"}, ["bpl"] = {"Broome Pearling Lugger Pidgin"}, ["bpm"] = {"Biyom"}, ["bpn"] = {"Dzao Min"}, ["bpo"] = {"Anasi"}, ["bpp"] = {"Kaure"}, ["bpq"] = {"Banda Malay"}, ["bpr"] = {"Koronadal Blaan"}, ["bps"] = {"Sarangani Blaan"}, ["bpt"] = {"Barrow Point"}, ["bpu"] = {"Bongu"}, ["bpv"] = {"Bian Marind"}, ["bpw"] = {"Bo (Papua New Guinea)"}, ["bpx"] = {"Palya Bareli"}, ["bpy"] = {"Bishnupriya"}, ["bpz"] = {"Bilba"}, ["bqa"] = {"Tchumbuli"}, ["bqb"] = {"Bagusa"}, ["bqc"] = {"Boko (Benin)", "Boo"}, ["bqd"] = {"Bung"}, ["bqf"] = {"Baga Kaloum"}, ["bqg"] = {"Bago-Kusuntu"}, ["bqh"] = {"Baima"}, ["bqi"] = {"Bakhtiari"}, ["bqj"] = {"Bandial"}, ["bqk"] = {"Banda-Mbrès"}, ["bql"] = {"Bilakura"}, ["bqm"] = {"Wumboko"}, ["bqn"] = {"Bulgarian Sign Language"}, ["bqo"] = {"Balo"}, ["bqp"] = {"Busa"}, ["bqq"] = {"Biritai"}, ["bqr"] = {"Burusu"}, ["bqs"] = {"Bosngun"}, ["bqt"] = {"Bamukumbit"}, ["bqu"] = {"Boguru"}, ["bqv"] = {"Koro Wachi", "Begbere-Ejar"}, ["bqw"] = {"Buru (Nigeria)"}, ["bqx"] = {"Baangi"}, ["bqy"] = {"Bengkala Sign Language"}, ["bqz"] = {"Bakaka"}, ["bra"] = {"Braj"}, ["brb"] = {"Brao", "Lave"}, ["brc"] = {"Berbice Creole Dutch"}, ["brd"] = {"Baraamu"}, ["brf"] = {"Bira"}, ["brg"] = {"Baure"}, ["brh"] = {"Brahui"}, ["bri"] = {"Mokpwe"}, ["brj"] = {"Bieria"}, ["brk"] = {"Birked"}, ["brl"] = {"Birwa"}, ["brm"] = {"Barambu"}, ["brn"] = {"Boruca"}, ["bro"] = {"Brokkat"}, ["brp"] = {"Barapasi"}, ["brq"] = {"Breri"}, ["brr"] = {"Birao"}, ["brs"] = {"Baras"}, ["brt"] = {"Bitare"}, ["bru"] = {"Eastern Bru"}, ["brv"] = {"Western Bru"}, ["brw"] = {"Bellari"}, ["brx"] = {"Bodo (India)"}, ["bry"] = {"Burui"}, ["brz"] = {"Bilbil"}, ["bsa"] = {"Abinomn"}, ["bsb"] = {"Brunei Bisaya"}, ["bsc"] = {"Bassari", "Oniyan"}, ["bse"] = {"Wushi"}, ["bsf"] = {"Bauchi"}, ["bsg"] = {"Bashkardi"}, ["bsh"] = {"Kati"}, ["bsi"] = {"Bassossi"}, ["bsj"] = {"Bangwinji"}, ["bsk"] = {"Burushaski"}, ["bsl"] = {"Basa-Gumna"}, ["bsm"] = {"Busami"}, ["bsn"] = {"Barasana-Eduria"}, ["bso"] = {"Buso"}, ["bsp"] = {"Baga Sitemu"}, ["bsq"] = {"Bassa"}, ["bsr"] = {"Bassa-Kontagora"}, ["bss"] = {"Akoose"}, ["bst"] = {"Basketo"}, ["bsu"] = {"Bahonsuai"}, ["bsv"] = {"Baga Sobané"}, ["bsw"] = {"Baiso"}, ["bsx"] = {"Yangkam"}, ["bsy"] = {"Sabah Bisaya"}, ["bta"] = {"Bata"}, ["btc"] = {"Bati (Cameroon)"}, ["btd"] = {"Batak Dairi"}, ["bte"] = {"Gamo-Ningi"}, ["btf"] = {"Birgit"}, ["btg"] = {"Gagnoa Bété"}, ["bth"] = {"Biatah Bidayuh"}, ["bti"] = {"Burate"}, ["btj"] = {"Bacanese Malay"}, ["btk"] = {"Batak languages"}, ["btm"] = {"Batak Mandailing"}, ["btn"] = {"Ratagnon"}, ["bto"] = {"Rinconada Bikol"}, ["btp"] = {"Budibud"}, ["btq"] = {"Batek"}, ["btr"] = {"Baetora"}, ["bts"] = {"Batak Simalungun"}, ["btt"] = {"Bete-Bendi"}, ["btu"] = {"Batu"}, ["btv"] = {"Bateri"}, ["btw"] = {"Butuanon"}, ["btx"] = {"Batak Karo"}, ["bty"] = {"Bobot"}, ["btz"] = {"Batak Alas-Kluet"}, ["bua"] = {"Buriat"}, ["bub"] = {"Bua"}, ["buc"] = {"Bushi"}, ["bud"] = {"Ntcham"}, ["bue"] = {"Beothuk"}, ["buf"] = {"Bushoong"}, ["bug"] = {"Buginese"}, ["buh"] = {"Younuo Bunu"}, ["bui"] = {"Bongili"}, ["buj"] = {"Basa-Gurmana"}, ["buk"] = {"Bugawac"}, ["bum"] = {"Bulu (Cameroon)"}, ["bun"] = {"Sherbro"}, ["buo"] = {"Terei"}, ["bup"] = {"Busoa"}, ["buq"] = {"Brem"}, ["bus"] = {"Bokobaru"}, ["but"] = {"Bungain"}, ["buu"] = {"Budu"}, ["buv"] = {"Bun"}, ["buw"] = {"Bubi"}, ["bux"] = {"Boghom"}, ["buy"] = {"Bullom So"}, ["buz"] = {"Bukwen"}, ["bva"] = {"Barein"}, ["bvb"] = {"Bube"}, ["bvc"] = {"Baelelea"}, ["bvd"] = {"Baeggu"}, ["bve"] = {"Berau Malay"}, ["bvf"] = {"Boor"}, ["bvg"] = {"Bonkeng"}, ["bvh"] = {"Bure"}, ["bvi"] = {"Belanda Viri"}, ["bvj"] = {"Baan"}, ["bvk"] = {"Bukat"}, ["bvl"] = {"Bolivian Sign Language"}, ["bvm"] = {"Bamunka"}, ["bvn"] = {"Buna"}, ["bvo"] = {"Bolgo"}, ["bvp"] = {"Bumang"}, ["bvq"] = {"Birri"}, ["bvr"] = {"Burarra"}, ["bvt"] = {"Bati (Indonesia)"}, ["bvu"] = {"Bukit Malay"}, ["bvv"] = {"Baniva"}, ["bvw"] = {"Boga"}, ["bvx"] = {"Dibole"}, ["bvy"] = {"Baybayanon"}, ["bvz"] = {"Bauzi"}, ["bwa"] = {"Bwatoo"}, ["bwb"] = {"Namosi-Naitasiri-Serua"}, ["bwc"] = {"Bwile"}, ["bwd"] = {"Bwaidoka"}, ["bwe"] = {"Bwe Karen"}, ["bwf"] = {"Boselewa"}, ["bwg"] = {"Barwe"}, ["bwh"] = {"Bishuo"}, ["bwi"] = {"Baniwa"}, ["bwj"] = {"Láá Láá Bwamu"}, ["bwk"] = {"Bauwaki"}, ["bwl"] = {"Bwela"}, ["bwm"] = {"Biwat"}, ["bwn"] = {"Wunai Bunu"}, ["bwo"] = {"Boro (Ethiopia)", "Borna (Ethiopia)"}, ["bwp"] = {"Mandobo Bawah"}, ["bwq"] = {"Southern Bobo Madaré"}, ["bwr"] = {"Bura-Pabir"}, ["bws"] = {"Bomboma"}, ["bwt"] = {"Bafaw-Balong"}, ["bwu"] = {"Buli (Ghana)"}, ["bww"] = {"Bwa"}, ["bwx"] = {"Bu-Nao Bunu"}, ["bwy"] = {"Cwi Bwamu"}, ["bwz"] = {"Bwisi"}, ["bxa"] = {"Tairaha"}, ["bxb"] = {"Belanda Bor"}, ["bxc"] = {"Molengue"}, ["bxd"] = {"Pela"}, ["bxe"] = {"Birale"}, ["bxf"] = {"Bilur", "Minigir"}, ["bxg"] = {"Bangala"}, ["bxh"] = {"Buhutu"}, ["bxi"] = {"Pirlatapa"}, ["bxj"] = {"Bayungu"}, ["bxk"] = {"Bukusu", "Lubukusu"}, ["bxl"] = {"Jalkunan"}, ["bxm"] = {"Mongolia Buriat"}, ["bxn"] = {"Burduna"}, ["bxo"] = {"Barikanchi"}, ["bxp"] = {"Bebil"}, ["bxq"] = {"Beele"}, ["bxr"] = {"Russia Buriat"}, ["bxs"] = {"Busam"}, ["bxu"] = {"China Buriat"}, ["bxv"] = {"Berakou"}, ["bxw"] = {"Bankagooma"}, ["bxz"] = {"Binahari"}, ["bya"] = {"Batak"}, ["byb"] = {"Bikya"}, ["byc"] = {"Ubaghara"}, ["byd"] = {"Benyadu'"}, ["bye"] = {"Pouye"}, ["byf"] = {"Bete"}, ["byg"] = {"Baygo"}, ["byh"] = {"Bhujel"}, ["byi"] = {"Buyu"}, ["byj"] = {"Bina (Nigeria)"}, ["byk"] = {"Biao"}, ["byl"] = {"Bayono"}, ["bym"] = {"Bidjara"}, ["byn"] = {"Bilin", "Blin"}, ["byo"] = {"Biyo"}, ["byp"] = {"Bumaji"}, ["byq"] = {"Basay"}, ["byr"] = {"Baruya", "Yipma"}, ["bys"] = {"Burak"}, ["byt"] = {"Berti"}, ["byv"] = {"Medumba"}, ["byw"] = {"Belhariya"}, ["byx"] = {"Qaqet"}, ["byz"] = {"Banaro"}, ["bza"] = {"Bandi"}, ["bzb"] = {"Andio"}, ["bzc"] = {"Southern Betsimisaraka Malagasy"}, ["bzd"] = {"Bribri"}, ["bze"] = {"Jenaama Bozo"}, ["bzf"] = {"Boikin"}, ["bzg"] = {"Babuza"}, ["bzh"] = {"Mapos Buang"}, ["bzi"] = {"Bisu"}, ["bzj"] = {"Belize Kriol English"}, ["bzk"] = {"Nicaragua Creole English"}, ["bzl"] = {"Boano (Sulawesi)"}, ["bzm"] = {"Bolondo"}, ["bzn"] = {"Boano (Maluku)"}, ["bzo"] = {"Bozaba"}, ["bzp"] = {"Kemberano"}, ["bzq"] = {"Buli (Indonesia)"}, ["bzr"] = {"Biri"}, ["bzs"] = {"Brazilian Sign Language"}, ["bzt"] = {"Brithenig"}, ["bzu"] = {"Burmeso"}, ["bzv"] = {"Naami"}, ["bzw"] = {"Basa (Nigeria)"}, ["bzx"] = {"Kɛlɛngaxo Bozo"}, ["bzy"] = {"Obanliku"}, ["bzz"] = {"Evant"}, ["caa"] = {"Chortí"}, ["cab"] = {"Garifuna"}, ["cac"] = {"Chuj"}, ["cad"] = {"Caddo"}, ["cae"] = {"Lehar", "Laalaa"}, ["caf"] = {"Southern Carrier"}, ["cag"] = {"Nivaclé"}, ["cah"] = {"Cahuarano"}, ["cai"] = {"Central American Indian languages"}, ["caj"] = {"Chané"}, ["cak"] = {"Kaqchikel", "Cakchiquel"}, ["cal"] = {"Carolinian"}, ["cam"] = {"Cemuhî"}, ["can"] = {"Chambri"}, ["cao"] = {"Chácobo"}, ["cap"] = {"Chipaya"}, ["caq"] = {"Car Nicobarese"}, ["car"] = {"Galibi Carib"}, ["cas"] = {"Tsimané"}, ["cau"] = {"Caucasian languages"}, ["cav"] = {"Cavineña"}, ["caw"] = {"Callawalla"}, ["cax"] = {"Chiquitano"}, ["cay"] = {"Cayuga"}, ["caz"] = {"Canichana"}, ["cba"] = {"Chibchan languages"}, ["cbb"] = {"Cabiyarí"}, ["cbc"] = {"Carapana"}, ["cbd"] = {"Carijona"}, ["cbg"] = {"Chimila"}, ["cbi"] = {"Chachi"}, ["cbj"] = {"Ede Cabe"}, ["cbk"] = {"Chavacano"}, ["cbl"] = {"Bualkhaw Chin"}, ["cbn"] = {"Nyahkur"}, ["cbo"] = {"Izora"}, ["cbq"] = {"Tsucuba", "Cuba"}, ["cbr"] = {"Cashibo-Cacataibo"}, ["cbs"] = {"Cashinahua"}, ["cbt"] = {"Chayahuita"}, ["cbu"] = {"Candoshi-Shapra"}, ["cbv"] = {"Cacua"}, ["cbw"] = {"Kinabalian"}, ["cby"] = {"Carabayo"}, ["ccc"] = {"Chamicuro"}, ["ccd"] = {"Cafundo Creole"}, ["cce"] = {"Chopi"}, ["ccg"] = {"Samba Daka"}, ["cch"] = {"Atsam"}, ["ccj"] = {"Kasanga"}, ["ccl"] = {"Cutchi-Swahili"}, ["ccm"] = {"Malaccan Creole Malay"}, ["ccn"] = {"North Caucasian languages"}, ["cco"] = {"Comaltepec Chinantec"}, ["ccp"] = {"Chakma"}, ["ccr"] = {"Cacaopera"}, ["ccs"] = {"South Caucasian languages"}, ["cda"] = {"Choni"}, ["cdc"] = {"Chadic languages"}, ["cdd"] = {"Caddoan languages"}, ["cde"] = {"Chenchu"}, ["cdf"] = {"Chiru"}, ["cdh"] = {"Chambeali"}, ["cdi"] = {"Chodri"}, ["cdj"] = {"Churahi"}, ["cdm"] = {"Chepang"}, ["cdn"] = {"Chaudangsi"}, ["cdo"] = {"Min Dong Chinese"}, ["cdr"] = {"Cinda-Regi-Tiyal"}, ["cds"] = {"Chadian Sign Language"}, ["cdy"] = {"Chadong"}, ["cdz"] = {"Koda"}, ["cea"] = {"Lower Chehalis"}, ["ceb"] = {"Cebuano"}, ["ceg"] = {"Chamacoco"}, ["cek"] = {"Eastern Khumi Chin"}, ["cel"] = {"Celtic languages"}, ["cen"] = {"Cen"}, ["cet"] = {"Centúúm"}, ["cey"] = {"Ekai Chin"}, ["cfa"] = {"Dijim-Bwilim"}, ["cfd"] = {"Cara"}, ["cfg"] = {"Como Karim"}, ["cfm"] = {"Falam Chin"}, ["cga"] = {"Changriwa"}, ["cgc"] = {"Kagayanen"}, ["cgg"] = {"Chiga"}, ["cgk"] = {"Chocangacakha"}, ["chb"] = {"Chibcha"}, ["chc"] = {"Catawba"}, ["chd"] = {"Highland Oaxaca Chontal"}, ["chf"] = {"Tabasco Chontal"}, ["chg"] = {"Chagatai"}, ["chh"] = {"Chinook"}, ["chj"] = {"Ojitlán Chinantec"}, ["chk"] = {"Chuukese"}, ["chl"] = {"Cahuilla"}, ["chm"] = {"Mari (Russia)"}, ["chn"] = {"Chinook jargon"}, ["cho"] = {"Choctaw"}, ["chp"] = {"Chipewyan", "Dene Suline"}, ["chq"] = {"Quiotepec Chinantec"}, ["chr"] = {"Cherokee"}, ["cht"] = {"Cholón"}, ["chw"] = {"Chuwabu"}, ["chx"] = {"Chantyal"}, ["chy"] = {"Cheyenne"}, ["chz"] = {"Ozumacín Chinantec"}, ["cia"] = {"Cia-Cia"}, ["cib"] = {"Ci Gbe"}, ["cic"] = {"Chickasaw"}, ["cid"] = {"Chimariko"}, ["cie"] = {"Cineni"}, ["cih"] = {"Chinali"}, ["cik"] = {"Chitkuli Kinnauri"}, ["cim"] = {"Cimbrian"}, ["cin"] = {"Cinta Larga"}, ["cip"] = {"Chiapanec"}, ["cir"] = {"Tiri", "Haméa", "Méa"}, ["ciw"] = {"Chippewa"}, ["ciy"] = {"Chaima"}, ["cja"] = {"Western Cham"}, ["cje"] = {"Chru"}, ["cjh"] = {"Upper Chehalis"}, ["cji"] = {"Chamalal"}, ["cjk"] = {"Chokwe"}, ["cjm"] = {"Eastern Cham"}, ["cjn"] = {"Chenapian"}, ["cjo"] = {"Ashéninka Pajonal"}, ["cjp"] = {"Cabécar"}, ["cjs"] = {"Shor"}, ["cjv"] = {"Chuave"}, ["cjy"] = {"Jinyu Chinese"}, ["ckb"] = {"Central Kurdish"}, ["ckh"] = {"Chak"}, ["ckl"] = {"Cibak"}, ["ckm"] = {"Chakavian"}, ["ckn"] = {"Kaang Chin"}, ["cko"] = {"Anufo"}, ["ckq"] = {"Kajakse"}, ["ckr"] = {"Kairak"}, ["cks"] = {"Tayo"}, ["ckt"] = {"Chukot"}, ["cku"] = {"Koasati"}, ["ckv"] = {"Kavalan"}, ["ckx"] = {"Caka"}, ["cky"] = {"Cakfem-Mushere"}, ["ckz"] = {"Cakchiquel-Quiché Mixed Language"}, ["cla"] = {"Ron"}, ["clc"] = {"Chilcotin"}, ["cld"] = {"Chaldean Neo-Aramaic"}, ["cle"] = {"Lealao Chinantec"}, ["clh"] = {"Chilisso"}, ["cli"] = {"Chakali"}, ["clj"] = {"Laitu Chin"}, ["clk"] = {"Idu-Mishmi"}, ["cll"] = {"Chala"}, ["clm"] = {"Clallam"}, ["clo"] = {"Lowland Oaxaca Chontal"}, ["clt"] = {"Lautu Chin"}, ["clu"] = {"Caluyanun"}, ["clw"] = {"Chulym"}, ["cly"] = {"Eastern Highland Chatino"}, ["cma"] = {"Maa"}, ["cmc"] = {"Chamic languages"}, ["cme"] = {"Cerma"}, ["cmg"] = {"Classical Mongolian"}, ["cmi"] = {"Emberá-Chamí"}, ["cml"] = {"Campalagian"}, ["cmm"] = {"Michigamea"}, ["cmn"] = {"Mandarin Chinese"}, ["cmo"] = {"Central Mnong"}, ["cmr"] = {"Mro-Khimi Chin"}, ["cms"] = {"Messapic"}, ["cmt"] = {"Camtho"}, ["cna"] = {"Changthang"}, ["cnb"] = {"Chinbon Chin"}, ["cnc"] = {"Côông"}, ["cng"] = {"Northern Qiang"}, ["cnh"] = {"Hakha Chin", "Haka Chin"}, ["cni"] = {"Asháninka"}, ["cnk"] = {"Khumi Chin"}, ["cnl"] = {"Lalana Chinantec"}, ["cno"] = {"Con"}, ["cnp"] = {"Northern Ping Chinese", "Northern Pinghua"}, ["cnq"] = {"Chung"}, ["cnr"] = {"Montenegrin"}, ["cns"] = {"Central Asmat"}, ["cnt"] = {"Tepetotutla Chinantec"}, ["cnu"] = {"Chenoua"}, ["cnw"] = {"Ngawn Chin"}, ["cnx"] = {"Middle Cornish"}, ["coa"] = {"Cocos Islands Malay"}, ["cob"] = {"Chicomuceltec"}, ["coc"] = {"Cocopa"}, ["cod"] = {"Cocama-Cocamilla"}, ["coe"] = {"Koreguaje"}, ["cof"] = {"Colorado"}, ["cog"] = {"Chong"}, ["coh"] = {"Chonyi-Dzihana-Kauma", "Chichonyi-Chidzihana-Chikauma"}, ["coj"] = {"Cochimi"}, ["cok"] = {"Santa Teresa Cora"}, ["col"] = {"Columbia-Wenatchi"}, ["com"] = {"Comanche"}, ["con"] = {"Cofán"}, ["coo"] = {"Comox"}, ["cop"] = {"Coptic"}, ["coq"] = {"Coquille"}, ["cot"] = {"Caquinte"}, ["cou"] = {"Wamey"}, ["cov"] = {"Cao Miao"}, ["cow"] = {"Cowlitz"}, ["cox"] = {"Nanti"}, ["coz"] = {"Chochotec"}, ["cpa"] = {"Palantla Chinantec"}, ["cpb"] = {"Ucayali-Yurúa Ashéninka"}, ["cpc"] = {"Ajyíninka Apurucayali"}, ["cpe"] = {"English-based creoles and pidgins"}, ["cpf"] = {"French-based creoles and pidgins"}, ["cpg"] = {"Cappadocian Greek"}, ["cpi"] = {"Chinese Pidgin English"}, ["cpn"] = {"Cherepon"}, ["cpo"] = {"Kpeego"}, ["cpp"] = {"Portuguese-based creoles and pidgins"}, ["cps"] = {"Capiznon"}, ["cpu"] = {"Pichis Ashéninka"}, ["cpx"] = {"Pu-Xian Chinese"}, ["cpy"] = {"South Ucayali Ashéninka"}, ["cqd"] = {"Chuanqiandian Cluster Miao"}, ["cra"] = {"Chara"}, ["crb"] = {"Island Carib"}, ["crc"] = {"Lonwolwol"}, ["crd"] = {"Coeur d'Alene"}, ["crf"] = {"Caramanta"}, ["crg"] = {"Michif"}, ["crh"] = {"Crimean Tatar", "Crimean Turkish"}, ["cri"] = {"Sãotomense"}, ["crj"] = {"Southern East Cree"}, ["crk"] = {"Plains Cree"}, ["crl"] = {"Northern East Cree"}, ["crm"] = {"Moose Cree"}, ["crn"] = {"El Nayar Cora"}, ["cro"] = {"Crow"}, ["crp"] = {"Creoles and pidgins"}, ["crq"] = {"Iyo'wujwa Chorote"}, ["crr"] = {"Carolina Algonquian"}, ["crs"] = {"Seselwa Creole French"}, ["crt"] = {"Iyojwa'ja Chorote"}, ["crv"] = {"Chaura"}, ["crw"] = {"Chrau"}, ["crx"] = {"Carrier"}, ["cry"] = {"Cori"}, ["crz"] = {"Cruzeño"}, ["csa"] = {"Chiltepec Chinantec"}, ["csb"] = {"Kashubian"}, ["csc"] = {"Catalan Sign Language", "Lengua de señas catalana", "Llengua de Signes Catalana"}, ["csd"] = {"Chiangmai Sign Language"}, ["cse"] = {"Czech Sign Language"}, ["csf"] = {"Cuba Sign Language"}, ["csg"] = {"Chilean Sign Language"}, ["csh"] = {"Asho Chin"}, ["csi"] = {"Coast Miwok"}, ["csj"] = {"Songlai Chin"}, ["csk"] = {"Jola-Kasa"}, ["csl"] = {"Chinese Sign Language"}, ["csm"] = {"Central Sierra Miwok"}, ["csn"] = {"Colombian Sign Language"}, ["cso"] = {"Sochiapam Chinantec", "Sochiapan Chinantec"}, ["csp"] = {"Southern Ping Chinese", "Southern Pinghua"}, ["csq"] = {"Croatia Sign Language"}, ["csr"] = {"Costa Rican Sign Language"}, ["css"] = {"Southern Ohlone"}, ["cst"] = {"Northern Ohlone"}, ["csu"] = {"Central Sudanic languages"}, ["csv"] = {"Sumtu Chin"}, ["csw"] = {"Swampy Cree"}, ["csx"] = {"Cambodian Sign Language"}, ["csy"] = {"Siyin Chin"}, ["csz"] = {"Coos"}, ["cta"] = {"Tataltepec Chatino"}, ["ctc"] = {"Chetco"}, ["ctd"] = {"Tedim Chin"}, ["cte"] = {"Tepinapa Chinantec"}, ["ctg"] = {"Chittagonian"}, ["cth"] = {"Thaiphum Chin"}, ["ctl"] = {"Tlacoatzintepec Chinantec"}, ["ctm"] = {"Chitimacha"}, ["ctn"] = {"Chhintange"}, ["cto"] = {"Emberá-Catío"}, ["ctp"] = {"Western Highland Chatino"}, ["cts"] = {"Northern Catanduanes Bikol"}, ["ctt"] = {"Wayanad Chetti"}, ["ctu"] = {"Chol"}, ["cty"] = {"Moundadan Chetty"}, ["ctz"] = {"Zacatepec Chatino"}, ["cua"] = {"Cua"}, ["cub"] = {"Cubeo"}, ["cuc"] = {"Usila Chinantec"}, ["cuh"] = {"Chuka", "Gichuka"}, ["cui"] = {"Cuiba"}, ["cuj"] = {"Mashco Piro"}, ["cuk"] = {"San Blas Kuna"}, ["cul"] = {"Culina", "Kulina"}, ["cuo"] = {"Cumanagoto"}, ["cup"] = {"Cupeño"}, ["cuq"] = {"Cun"}, ["cur"] = {"Chhulung"}, ["cus"] = {"Cushitic languages"}, ["cut"] = {"Teutila Cuicatec"}, ["cuu"] = {"Tai Ya"}, ["cuv"] = {"Cuvok"}, ["cuw"] = {"Chukwa"}, ["cux"] = {"Tepeuxila Cuicatec"}, ["cuy"] = {"Cuitlatec"}, ["cvg"] = {"Chug"}, ["cvn"] = {"Valle Nacional Chinantec"}, ["cwa"] = {"Kabwa"}, ["cwb"] = {"Maindo"}, ["cwd"] = {"Woods Cree"}, ["cwe"] = {"Kwere"}, ["cwg"] = {"Chewong", "Cheq Wong"}, ["cwt"] = {"Kuwaataay"}, ["cxh"] = {"Cha'ari"}, ["cya"] = {"Nopala Chatino"}, ["cyb"] = {"Cayubaba"}, ["cyo"] = {"Cuyonon"}, ["czh"] = {"Huizhou Chinese"}, ["czk"] = {"Knaanic"}, ["czn"] = {"Zenzontepec Chatino"}, ["czo"] = {"Min Zhong Chinese"}, ["czt"] = {"Zotung Chin"}, ["daa"] = {"Dangaléat"}, ["dac"] = {"Dambi"}, ["dad"] = {"Marik"}, ["dae"] = {"Duupa"}, ["dag"] = {"Dagbani"}, ["dah"] = {"Gwahatike"}, ["dai"] = {"Day"}, ["daj"] = {"Dar Fur Daju"}, ["dak"] = {"Dakota"}, ["dal"] = {"Dahalo"}, ["dam"] = {"Damakawa"}, ["dao"] = {"Daai Chin"}, ["daq"] = {"Dandami Maria"}, ["dar"] = {"Dargwa"}, ["das"] = {"Daho-Doo"}, ["dau"] = {"Dar Sila Daju"}, ["dav"] = {"Taita", "Dawida"}, ["daw"] = {"Davawenyo"}, ["dax"] = {"Dayi"}, ["day"] = {"Land Dayak languages"}, ["daz"] = {"Dao"}, ["dba"] = {"Bangime"}, ["dbb"] = {"Deno"}, ["dbd"] = {"Dadiya"}, ["dbe"] = {"Dabe"}, ["dbf"] = {"Edopi"}, ["dbg"] = {"Dogul Dom Dogon"}, ["dbi"] = {"Doka"}, ["dbj"] = {"Ida'an"}, ["dbl"] = {"Dyirbal"}, ["dbm"] = {"Duguri"}, ["dbn"] = {"Duriankere"}, ["dbo"] = {"Dulbu"}, ["dbp"] = {"Duwai"}, ["dbq"] = {"Daba"}, ["dbr"] = {"Dabarre"}, ["dbt"] = {"Ben Tey Dogon"}, ["dbu"] = {"Bondum Dom Dogon"}, ["dbv"] = {"Dungu"}, ["dbw"] = {"Bankan Tey Dogon"}, ["dby"] = {"Dibiyaso"}, ["dcc"] = {"Deccan"}, ["dcr"] = {"Negerhollands"}, ["dda"] = {"Dadi Dadi"}, ["ddd"] = {"Dongotono"}, ["dde"] = {"Doondo"}, ["ddg"] = {"Fataluku"}, ["ddi"] = {"West Goodenough"}, ["ddj"] = {"Jaru"}, ["ddn"] = {"Dendi (Benin)"}, ["ddo"] = {"Dido"}, ["ddr"] = {"Dhudhuroa"}, ["dds"] = {"Donno So Dogon"}, ["ddw"] = {"Dawera-Daweloor"}, ["dec"] = {"Dagik"}, ["ded"] = {"Dedua"}, ["dee"] = {"Dewoin"}, ["def"] = {"Dezfuli"}, ["deg"] = {"Degema"}, ["deh"] = {"Dehwari"}, ["dei"] = {"Demisa"}, ["dek"] = {"Dek"}, ["del"] = {"Delaware"}, ["dem"] = {"Dem"}, ["den"] = {"Slave (Athapascan)"}, ["dep"] = {"Pidgin Delaware"}, ["deq"] = {"Dendi (Central African Republic)"}, ["der"] = {"Deori"}, ["des"] = {"Desano"}, ["dev"] = {"Domung"}, ["dez"] = {"Dengese"}, ["dga"] = {"Southern Dagaare"}, ["dgb"] = {"Bunoge Dogon"}, ["dgc"] = {"Casiguran Dumagat Agta"}, ["dgd"] = {"Dagaari Dioula"}, ["dge"] = {"Degenan"}, ["dgg"] = {"Doga"}, ["dgh"] = {"Dghwede"}, ["dgi"] = {"Northern Dagara"}, ["dgk"] = {"Dagba"}, ["dgl"] = {"Andaandi", "Dongolawi"}, ["dgn"] = {"Dagoman"}, ["dgo"] = {"Dogri (individual language)"}, ["dgr"] = {"Dogrib", "Tłı̨chǫ"}, ["dgs"] = {"Dogoso"}, ["dgt"] = {"Ndra'ngith"}, ["dgw"] = {"Daungwurrung"}, ["dgx"] = {"Doghoro"}, ["dgz"] = {"Daga"}, ["dhd"] = {"Dhundari"}, ["dhg"] = {"Dhangu-Djangu", "Dhangu", "Djangu"}, ["dhi"] = {"Dhimal"}, ["dhl"] = {"Dhalandji"}, ["dhm"] = {"Zemba"}, ["dhn"] = {"Dhanki"}, ["dho"] = {"Dhodia"}, ["dhr"] = {"Dhargari"}, ["dhs"] = {"Dhaiso"}, ["dhu"] = {"Dhurga"}, ["dhv"] = {"Dehu", "Drehu"}, ["dhw"] = {"Dhanwar (Nepal)"}, ["dhx"] = {"Dhungaloo"}, ["dia"] = {"Dia"}, ["dib"] = {"South Central Dinka"}, ["dic"] = {"Lakota Dida"}, ["did"] = {"Didinga"}, ["dif"] = {"Dieri", "Diyari"}, ["dig"] = {"Digo", "Chidigo"}, ["dih"] = {"Kumiai"}, ["dii"] = {"Dimbong"}, ["dij"] = {"Dai"}, ["dik"] = {"Southwestern Dinka"}, ["dil"] = {"Dilling"}, ["dim"] = {"Dime"}, ["din"] = {"Dinka"}, ["dio"] = {"Dibo"}, ["dip"] = {"Northeastern Dinka"}, ["diq"] = {"Dimli (individual language)"}, ["dir"] = {"Dirim"}, ["dis"] = {"Dimasa"}, ["diu"] = {"Diriku"}, ["diw"] = {"Northwestern Dinka"}, ["dix"] = {"Dixon Reef"}, ["diy"] = {"Diuwe"}, ["diz"] = {"Ding"}, ["dja"] = {"Djadjawurrung"}, ["djb"] = {"Djinba"}, ["djc"] = {"Dar Daju Daju"}, ["djd"] = {"Djamindjung", "Ngaliwurru"}, ["dje"] = {"Zarma"}, ["djf"] = {"Djangun"}, ["dji"] = {"Djinang"}, ["djj"] = {"Djeebbana"}, ["djk"] = {"Eastern Maroon Creole", "Businenge Tongo", "Nenge"}, ["djm"] = {"Jamsay Dogon"}, ["djn"] = {"Jawoyn", "Djauan"}, ["djo"] = {"Jangkang"}, ["djr"] = {"Djambarrpuyngu"}, ["dju"] = {"Kapriman"}, ["djw"] = {"Djawi"}, ["dka"] = {"Dakpakha"}, ["dkg"] = {"Kadung"}, ["dkk"] = {"Dakka"}, ["dkr"] = {"Kuijau"}, ["dks"] = {"Southeastern Dinka"}, ["dkx"] = {"Mazagway"}, ["dlg"] = {"Dolgan"}, ["dlk"] = {"Dahalik"}, ["dlm"] = {"Dalmatian"}, ["dln"] = {"Darlong"}, ["dma"] = {"Duma"}, ["dmb"] = {"Mombo Dogon"}, ["dmc"] = {"Gavak"}, ["dmd"] = {"Madhi Madhi"}, ["dme"] = {"Dugwor"}, ["dmf"] = {"Medefaidrin"}, ["dmg"] = {"Upper Kinabatangan"}, ["dmk"] = {"Domaaki"}, ["dml"] = {"Dameli"}, ["dmm"] = {"Dama"}, ["dmn"] = {"Mande languages"}, ["dmo"] = {"Kemedzung"}, ["dmr"] = {"East Damar"}, ["dms"] = {"Dampelas"}, ["dmu"] = {"Dubu", "Tebi"}, ["dmv"] = {"Dumpas"}, ["dmw"] = {"Mudburra"}, ["dmx"] = {"Dema"}, ["dmy"] = {"Demta", "Sowari"}, ["dna"] = {"Upper Grand Valley Dani"}, ["dnd"] = {"Daonda"}, ["dne"] = {"Ndendeule"}, ["dng"] = {"Dungan"}, ["dni"] = {"Lower Grand Valley Dani"}, ["dnj"] = {"Dan"}, ["dnk"] = {"Dengka"}, ["dnn"] = {"Dzùùngoo"}, ["dno"] = {"Ndrulo", "Northern Lendu"}, ["dnr"] = {"Danaru"}, ["dnt"] = {"Mid Grand Valley Dani"}, ["dnu"] = {"Danau"}, ["dnv"] = {"Danu"}, ["dnw"] = {"Western Dani"}, ["dny"] = {"Dení"}, ["doa"] = {"Dom"}, ["dob"] = {"Dobu"}, ["doc"] = {"Northern Dong"}, ["doe"] = {"Doe"}, ["dof"] = {"Domu"}, ["doh"] = {"Dong"}, ["doi"] = {"Dogri (macrolanguage)"}, ["dok"] = {"Dondo"}, ["dol"] = {"Doso"}, ["don"] = {"Toura (Papua New Guinea)"}, ["doo"] = {"Dongo"}, ["dop"] = {"Lukpa"}, ["doq"] = {"Dominican Sign Language"}, ["dor"] = {"Dori'o"}, ["dos"] = {"Dogosé"}, ["dot"] = {"Dass"}, ["dov"] = {"Dombe"}, ["dow"] = {"Doyayo"}, ["dox"] = {"Bussa"}, ["doy"] = {"Dompo"}, ["doz"] = {"Dorze"}, ["dpp"] = {"Papar"}, ["dra"] = {"Dravidian languages"}, ["drb"] = {"Dair"}, ["drc"] = {"Minderico"}, ["drd"] = {"Darmiya"}, ["dre"] = {"Dolpo"}, ["drg"] = {"Rungus"}, ["dri"] = {"C'Lela"}, ["drl"] = {"Paakantyi"}, ["drn"] = {"West Damar"}, ["dro"] = {"Daro-Matu Melanau"}, ["drq"] = {"Dura"}, ["drs"] = {"Gedeo"}, ["drt"] = {"Drents"}, ["dru"] = {"Rukai"}, ["dry"] = {"Darai"}, ["dsb"] = {"Lower Sorbian"}, ["dse"] = {"Dutch Sign Language"}, ["dsh"] = {"Daasanach"}, ["dsi"] = {"Disa"}, ["dsk"] = {"Dokshi"}, ["dsl"] = {"Danish Sign Language"}, ["dsn"] = {"Dusner"}, ["dso"] = {"Desiya"}, ["dsq"] = {"Tadaksahak"}, ["dsz"] = {"Mardin Sign Language"}, ["dta"] = {"Daur"}, ["dtb"] = {"Labuk-Kinabatangan Kadazan"}, ["dtd"] = {"Ditidaht"}, ["dth"] = {"Adithinngithigh"}, ["dti"] = {"Ana Tinga Dogon"}, ["dtk"] = {"Tene Kan Dogon"}, ["dtm"] = {"Tomo Kan Dogon"}, ["dtn"] = {"Daatsʼíin"}, ["dto"] = {"Tommo So Dogon"}, ["dtp"] = {"Kadazan Dusun", "Central Dusun"}, ["dtr"] = {"Lotud"}, ["dts"] = {"Toro So Dogon"}, ["dtt"] = {"Toro Tegu Dogon"}, ["dtu"] = {"Tebul Ure Dogon"}, ["dty"] = {"Dotyali"}, ["dua"] = {"Duala"}, ["dub"] = {"Dubli"}, ["duc"] = {"Duna"}, ["due"] = {"Umiray Dumaget Agta"}, ["duf"] = {"Dumbea", "Drubea"}, ["dug"] = {"Duruma", "Chiduruma"}, ["duh"] = {"Dungra Bhil"}, ["dui"] = {"Dumun"}, ["duk"] = {"Uyajitaya"}, ["dul"] = {"Alabat Island Agta"}, ["dum"] = {"Middle Dutch (ca. 1050-1350)"}, ["dun"] = {"Dusun Deyah"}, ["duo"] = {"Dupaninan Agta"}, ["dup"] = {"Duano"}, ["duq"] = {"Dusun Malang"}, ["dur"] = {"Dii"}, ["dus"] = {"Dumi"}, ["duu"] = {"Drung"}, ["duv"] = {"Duvle"}, ["duw"] = {"Dusun Witu"}, ["dux"] = {"Duungooma"}, ["duy"] = {"Dicamay Agta"}, ["duz"] = {"Duli-Gey"}, ["dva"] = {"Duau"}, ["dwa"] = {"Diri"}, ["dwk"] = {"Dawik Kui"}, ["dwr"] = {"Dawro"}, ["dws"] = {"Dutton World Speedwords"}, ["dwu"] = {"Dhuwal"}, ["dww"] = {"Dawawa"}, ["dwy"] = {"Dhuwaya"}, ["dwz"] = {"Dewas Rai"}, ["dya"] = {"Dyan"}, ["dyb"] = {"Dyaberdyaber"}, ["dyd"] = {"Dyugun"}, ["dyg"] = {"Villa Viciosa Agta"}, ["dyi"] = {"Djimini Senoufo"}, ["dym"] = {"Yanda Dom Dogon"}, ["dyn"] = {"Dyangadi", "Dhanggatti"}, ["dyo"] = {"Jola-Fonyi"}, ["dyr"] = {"Dyarim"}, ["dyu"] = {"Dyula"}, ["dyy"] = {"Djabugay", "Dyaabugay"}, ["dza"] = {"Tunzu"}, ["dzd"] = {"Daza"}, ["dze"] = {"Djiwarli"}, ["dzg"] = {"Dazaga"}, ["dzl"] = {"Dzalakha"}, ["dzn"] = {"Dzando"}, ["eaa"] = {"Karenggapa"}, ["ebc"] = {"Beginci"}, ["ebg"] = {"Ebughu"}, ["ebk"] = {"Eastern Bontok"}, ["ebo"] = {"Teke-Ebo"}, ["ebr"] = {"Ebrié"}, ["ebu"] = {"Embu", "Kiembu"}, ["ecr"] = {"Eteocretan"}, ["ecs"] = {"Ecuadorian Sign Language"}, ["ecy"] = {"Eteocypriot"}, ["eee"] = {"E"}, ["efa"] = {"Efai"}, ["efe"] = {"Efe"}, ["efi"] = {"Efik"}, ["ega"] = {"Ega"}, ["egl"] = {"Emilian"}, ["egm"] = {"Benamanga"}, ["ego"] = {"Eggon"}, ["egx"] = {"Egyptian languages"}, ["egy"] = {"Egyptian (Ancient)"}, ["ehs"] = {"Miyakubo Sign Language"}, ["ehu"] = {"Ehueun"}, ["eip"] = {"Eipomek"}, ["eit"] = {"Eitiep"}, ["eiv"] = {"Askopan"}, ["eja"] = {"Ejamat"}, ["eka"] = {"Ekajuk"}, ["eke"] = {"Ekit"}, ["ekg"] = {"Ekari"}, ["eki"] = {"Eki"}, ["ekk"] = {"Standard Estonian"}, ["ekl"] = {"Kol (Bangladesh)", "Kol"}, ["ekm"] = {"Elip"}, ["eko"] = {"Koti"}, ["ekp"] = {"Ekpeye"}, ["ekr"] = {"Yace"}, ["eky"] = {"Eastern Kayah"}, ["ele"] = {"Elepi"}, ["elh"] = {"El Hugeirat"}, ["eli"] = {"Nding"}, ["elk"] = {"Elkei"}, ["elm"] = {"Eleme"}, ["elo"] = {"El Molo"}, ["elu"] = {"Elu"}, ["elx"] = {"Elamite"}, ["ema"] = {"Emai-Iuleha-Ora"}, ["emb"] = {"Embaloh"}, ["eme"] = {"Emerillon"}, ["emg"] = {"Eastern Meohang"}, ["emi"] = {"Mussau-Emira"}, ["emk"] = {"Eastern Maninkakan"}, ["emm"] = {"Mamulique"}, ["emn"] = {"Eman"}, ["emp"] = {"Northern Emberá"}, ["emq"] = {"Eastern Minyag"}, ["ems"] = {"Pacific Gulf Yupik"}, ["emu"] = {"Eastern Muria"}, ["emw"] = {"Emplawas"}, ["emx"] = {"Erromintxela"}, ["emy"] = {"Epigraphic Mayan"}, ["emz"] = {"Mbessa"}, ["ena"] = {"Apali"}, ["enb"] = {"Markweeta"}, ["enc"] = {"En"}, ["end"] = {"Ende"}, ["enf"] = {"Forest Enets"}, ["enh"] = {"Tundra Enets"}, ["enl"] = {"Enlhet"}, ["enm"] = {"Middle English (1100-1500)"}, ["enn"] = {"Engenni"}, ["eno"] = {"Enggano"}, ["enq"] = {"Enga"}, ["enr"] = {"Emumu", "Emem"}, ["enu"] = {"Enu"}, ["env"] = {"Enwan (Edo State)"}, ["enw"] = {"Enwan (Akwa Ibom State)"}, ["enx"] = {"Enxet"}, ["eot"] = {"Beti (Côte d'Ivoire)"}, ["epi"] = {"Epie"}, ["era"] = {"Eravallan"}, ["erg"] = {"Sie"}, ["erh"] = {"Eruwa"}, ["eri"] = {"Ogea"}, ["erk"] = {"South Efate"}, ["ero"] = {"Horpa"}, ["err"] = {"Erre"}, ["ers"] = {"Ersu"}, ["ert"] = {"Eritai"}, ["erw"] = {"Erokwanas"}, ["ese"] = {"Ese Ejja"}, ["esg"] = {"Aheri Gondi"}, ["esh"] = {"Eshtehardi"}, ["esi"] = {"North Alaskan Inupiatun"}, ["esk"] = {"Northwest Alaska Inupiatun"}, ["esl"] = {"Egypt Sign Language"}, ["esm"] = {"Esuma"}, ["esn"] = {"Salvadoran Sign Language"}, ["eso"] = {"Estonian Sign Language"}, ["esq"] = {"Esselen"}, ["ess"] = {"Central Siberian Yupik"}, ["esu"] = {"Central Yupik"}, ["esx"] = {"Eskimo-Aleut languages"}, ["esy"] = {"Eskayan"}, ["etb"] = {"Etebi"}, ["etc"] = {"Etchemin"}, ["eth"] = {"Ethiopian Sign Language"}, ["etn"] = {"Eton (Vanuatu)"}, ["eto"] = {"Eton (Cameroon)"}, ["etr"] = {"Edolo"}, ["ets"] = {"Yekhee"}, ["ett"] = {"Etruscan"}, ["etu"] = {"Ejagham"}, ["etx"] = {"Eten"}, ["etz"] = {"Semimi"}, ["eud"] = {"Eudeve"}, ["euq"] = {"Basque (family)"}, ["eve"] = {"Even"}, ["evh"] = {"Uvbie"}, ["evn"] = {"Evenki"}, ["ewo"] = {"Ewondo"}, ["ext"] = {"Extremaduran"}, ["eya"] = {"Eyak"}, ["eyo"] = {"Keiyo"}, ["eza"] = {"Ezaa"}, ["eze"] = {"Uzekwe"}, ["faa"] = {"Fasu"}, ["fab"] = {"Fa d'Ambu"}, ["fad"] = {"Wagi"}, ["faf"] = {"Fagani"}, ["fag"] = {"Finongan"}, ["fah"] = {"Baissa Fali"}, ["fai"] = {"Faiwol"}, ["faj"] = {"Faita"}, ["fak"] = {"Fang (Cameroon)"}, ["fal"] = {"South Fali"}, ["fam"] = {"Fam"}, ["fan"] = {"Fang (Equatorial Guinea)"}, ["fap"] = {"Paloor"}, ["far"] = {"Fataleka"}, ["fat"] = {"Fanti"}, ["fau"] = {"Fayu"}, ["fax"] = {"Fala"}, ["fay"] = {"Southwestern Fars"}, ["faz"] = {"Northwestern Fars"}, ["fbl"] = {"West Albay Bikol"}, ["fcs"] = {"Quebec Sign Language"}, ["fer"] = {"Feroge"}, ["ffi"] = {"Foia Foia"}, ["ffm"] = {"Maasina Fulfulde"}, ["fgr"] = {"Fongoro"}, ["fia"] = {"Nobiin"}, ["fie"] = {"Fyer"}, ["fif"] = {"Faifi"}, ["fil"] = {"Filipino", "Pilipino"}, ["fip"] = {"Fipa"}, ["fir"] = {"Firan"}, ["fit"] = {"Tornedalen Finnish", "Meänkieli"}, ["fiu"] = {"Finno-Ugrian languages"}, ["fiw"] = {"Fiwaga"}, ["fkk"] = {"Kirya-Konzəl"}, ["fkv"] = {"Kven Finnish"}, ["fla"] = {"Kalispel-Pend d'Oreille"}, ["flh"] = {"Foau"}, ["fli"] = {"Fali"}, ["fll"] = {"North Fali"}, ["fln"] = {"Flinders Island"}, ["flr"] = {"Fuliiru"}, ["fly"] = {"Flaaitaal", "Tsotsitaal"}, ["fmp"] = {"Fe'fe'"}, ["fmu"] = {"Far Western Muria"}, ["fnb"] = {"Fanbak"}, ["fng"] = {"Fanagalo"}, ["fni"] = {"Fania"}, ["fod"] = {"Foodo"}, ["foi"] = {"Foi"}, ["fom"] = {"Foma"}, ["fon"] = {"Fon"}, ["for"] = {"Fore"}, ["fos"] = {"Siraya"}, ["fox"] = {"Formosan languages"}, ["fpe"] = {"Fernando Po Creole English"}, ["fqs"] = {"Fas"}, ["frc"] = {"Cajun French"}, ["frd"] = {"Fordata"}, ["frk"] = {"Frankish"}, ["frm"] = {"Middle French (ca. 1400-1600)"}, ["fro"] = {"Old French (842-ca. 1400)"}, ["frp"] = {"Arpitan", "Francoprovençal"}, ["frq"] = {"Forak"}, ["frr"] = {"Northern Frisian"}, ["frs"] = {"Eastern Frisian"}, ["frt"] = {"Fortsenal"}, ["fse"] = {"Finnish Sign Language"}, ["fsl"] = {"French Sign Language"}, ["fss"] = {"Finland-Swedish Sign Language", "finlandssvenskt teckenspråk", "suomenruotsalainen viittomakieli"}, ["fub"] = {"Adamawa Fulfulde"}, ["fuc"] = {"Pulaar"}, ["fud"] = {"East Futuna"}, ["fue"] = {"Borgu Fulfulde"}, ["fuf"] = {"Pular"}, ["fuh"] = {"Western Niger Fulfulde"}, ["fui"] = {"Bagirmi Fulfulde"}, ["fuj"] = {"Ko"}, ["fum"] = {"Fum"}, ["fun"] = {"Fulniô"}, ["fuq"] = {"Central-Eastern Niger Fulfulde"}, ["fur"] = {"Friulian"}, ["fut"] = {"Futuna-Aniwa"}, ["fuu"] = {"Furu"}, ["fuv"] = {"Nigerian Fulfulde"}, ["fuy"] = {"Fuyug"}, ["fvr"] = {"Fur"}, ["fwa"] = {"Fwâi"}, ["fwe"] = {"Fwe"}, ["gaa"] = {"Ga"}, ["gab"] = {"Gabri"}, ["gac"] = {"Mixed Great Andamanese"}, ["gad"] = {"Gaddang"}, ["gae"] = {"Guarequena"}, ["gaf"] = {"Gende"}, ["gag"] = {"Gagauz"}, ["gah"] = {"Alekano"}, ["gai"] = {"Borei"}, ["gaj"] = {"Gadsup"}, ["gak"] = {"Gamkonora"}, ["gal"] = {"Galolen"}, ["gam"] = {"Kandawo"}, ["gan"] = {"Gan Chinese"}, ["gao"] = {"Gants"}, ["gap"] = {"Gal"}, ["gaq"] = {"Gata'"}, ["gar"] = {"Galeya"}, ["gas"] = {"Adiwasi Garasia"}, ["gat"] = {"Kenati"}, ["gau"] = {"Mudhili Gadaba"}, ["gaw"] = {"Nobonob"}, ["gax"] = {"Borana-Arsi-Guji Oromo"}, ["gay"] = {"Gayo"}, ["gaz"] = {"West Central Oromo"}, ["gba"] = {"Gbaya (Central African Republic)"}, ["gbb"] = {"Kaytetye"}, ["gbd"] = {"Karajarri"}, ["gbe"] = {"Niksek"}, ["gbf"] = {"Gaikundi"}, ["gbg"] = {"Gbanziri"}, ["gbh"] = {"Defi Gbe"}, ["gbi"] = {"Galela"}, ["gbj"] = {"Bodo Gadaba"}, ["gbk"] = {"Gaddi"}, ["gbl"] = {"Gamit"}, ["gbm"] = {"Garhwali"}, ["gbn"] = {"Mo'da"}, ["gbo"] = {"Northern Grebo"}, ["gbp"] = {"Gbaya-Bossangoa"}, ["gbq"] = {"Gbaya-Bozoum"}, ["gbr"] = {"Gbagyi"}, ["gbs"] = {"Gbesi Gbe"}, ["gbu"] = {"Gagadu"}, ["gbv"] = {"Gbanu"}, ["gbw"] = {"Gabi-Gabi"}, ["gbx"] = {"Eastern Xwla Gbe"}, ["gby"] = {"Gbari"}, ["gbz"] = {"Zoroastrian Dari"}, ["gcc"] = {"Mali"}, ["gcd"] = {"Ganggalida"}, ["gce"] = {"Galice"}, ["gcf"] = {"Guadeloupean Creole French"}, ["gcl"] = {"Grenadian Creole English"}, ["gcn"] = {"Gaina"}, ["gcr"] = {"Guianese Creole French"}, ["gct"] = {"Colonia Tovar German"}, ["gda"] = {"Gade Lohar"}, ["gdb"] = {"Pottangi Ollar Gadaba"}, ["gdc"] = {"Gugu Badhun"}, ["gdd"] = {"Gedaged"}, ["gde"] = {"Gude"}, ["gdf"] = {"Guduf-Gava"}, ["gdg"] = {"Ga'dang"}, ["gdh"] = {"Gadjerawang", "Gajirrabeng"}, ["gdi"] = {"Gundi"}, ["gdj"] = {"Gurdjar"}, ["gdk"] = {"Gadang"}, ["gdl"] = {"Dirasha"}, ["gdm"] = {"Laal"}, ["gdn"] = {"Umanakaina"}, ["gdo"] = {"Ghodoberi"}, ["gdq"] = {"Mehri"}, ["gdr"] = {"Wipi"}, ["gds"] = {"Ghandruk Sign Language"}, ["gdt"] = {"Kungardutyi"}, ["gdu"] = {"Gudu"}, ["gdx"] = {"Godwari"}, ["gea"] = {"Geruma"}, ["geb"] = {"Kire"}, ["gec"] = {"Gboloo Grebo"}, ["ged"] = {"Gade"}, ["gef"] = {"Gerai"}, ["geg"] = {"Gengle"}, ["geh"] = {"Hutterite German", "Hutterisch"}, ["gei"] = {"Gebe"}, ["gej"] = {"Gen"}, ["gek"] = {"Ywom"}, ["gel"] = {"ut-Ma'in"}, ["gem"] = {"Germanic languages"}, ["geq"] = {"Geme"}, ["ges"] = {"Geser-Gorom"}, ["gev"] = {"Eviya"}, ["gew"] = {"Gera"}, ["gex"] = {"Garre"}, ["gey"] = {"Enya"}, ["gez"] = {"Geez"}, ["gfk"] = {"Patpatar"}, ["gft"] = {"Gafat"}, ["gga"] = {"Gao"}, ["ggb"] = {"Gbii"}, ["ggd"] = {"Gugadj"}, ["gge"] = {"Gurr-goni"}, ["ggg"] = {"Gurgula"}, ["ggk"] = {"Kungarakany"}, ["ggl"] = {"Ganglau"}, ["ggt"] = {"Gitua"}, ["ggu"] = {"Gagu", "Gban"}, ["ggw"] = {"Gogodala"}, ["gha"] = {"Ghadamès"}, ["ghc"] = {"Hiberno-Scottish Gaelic"}, ["ghe"] = {"Southern Ghale"}, ["ghh"] = {"Northern Ghale"}, ["ghk"] = {"Geko Karen"}, ["ghl"] = {"Ghulfan"}, ["ghn"] = {"Ghanongga"}, ["gho"] = {"Ghomara"}, ["ghr"] = {"Ghera"}, ["ghs"] = {"Guhu-Samane"}, ["ght"] = {"Kuke", "Kutang Ghale"}, ["gia"] = {"Kija"}, ["gib"] = {"Gibanawa"}, ["gic"] = {"Gail"}, ["gid"] = {"Gidar"}, ["gie"] = {"Gaɓogbo", "Guébie"}, ["gig"] = {"Goaria"}, ["gih"] = {"Githabul"}, ["gii"] = {"Girirra"}, ["gil"] = {"Gilbertese"}, ["gim"] = {"Gimi (Eastern Highlands)"}, ["gin"] = {"Hinukh"}, ["gip"] = {"Gimi (West New Britain)"}, ["giq"] = {"Green Gelao"}, ["gir"] = {"Red Gelao"}, ["gis"] = {"North Giziga"}, ["git"] = {"Gitxsan"}, ["giu"] = {"Mulao"}, ["giw"] = {"White Gelao"}, ["gix"] = {"Gilima"}, ["giy"] = {"Giyug"}, ["giz"] = {"South Giziga"}, ["gjk"] = {"Kachi Koli"}, ["gjm"] = {"Gunditjmara"}, ["gjn"] = {"Gonja"}, ["gjr"] = {"Gurindji Kriol"}, ["gju"] = {"Gujari"}, ["gka"] = {"Guya"}, ["gkd"] = {"Magɨ (Madang Province)"}, ["gke"] = {"Ndai"}, ["gkn"] = {"Gokana"}, ["gko"] = {"Kok-Nar"}, ["gkp"] = {"Guinea Kpelle"}, ["gku"] = {"ǂUngkue"}, ["glb"] = {"Belning"}, ["glc"] = {"Bon Gula"}, ["gld"] = {"Nanai"}, ["glh"] = {"Northwest Pashai", "Northwest Pashayi"}, ["glj"] = {"Gula Iro"}, ["glk"] = {"Gilaki"}, ["gll"] = {"Garlali"}, ["glo"] = {"Galambu"}, ["glr"] = {"Glaro-Twabo"}, ["glu"] = {"Gula (Chad)"}, ["glw"] = {"Glavda"}, ["gly"] = {"Gule"}, ["gma"] = {"Gambera"}, ["gmb"] = {"Gula'alaa"}, ["gmd"] = {"Mághdì"}, ["gme"] = {"East Germanic languages"}, ["gmg"] = {"Magɨyi"}, ["gmh"] = {"Middle High German (ca. 1050-1500)"}, ["gml"] = {"Middle Low German"}, ["gmm"] = {"Gbaya-Mbodomo"}, ["gmn"] = {"Gimnime"}, ["gmq"] = {"North Germanic languages"}, ["gmr"] = {"Mirning", "Mirniny"}, ["gmu"] = {"Gumalu"}, ["gmv"] = {"Gamo"}, ["gmw"] = {"West Germanic languages"}, ["gmx"] = {"Magoma"}, ["gmy"] = {"Mycenaean Greek"}, ["gmz"] = {"Mgbolizhia"}, ["gna"] = {"Kaansa"}, ["gnb"] = {"Gangte"}, ["gnc"] = {"Guanche"}, ["gnd"] = {"Zulgo-Gemzek"}, ["gne"] = {"Ganang"}, ["gng"] = {"Ngangam"}, ["gnh"] = {"Lere"}, ["gni"] = {"Gooniyandi"}, ["gnj"] = {"Ngen"}, ["gnk"] = {"ǁGana"}, ["gnl"] = {"Gangulu"}, ["gnm"] = {"Ginuman"}, ["gnn"] = {"Gumatj"}, ["gno"] = {"Northern Gondi"}, ["gnq"] = {"Gana"}, ["gnr"] = {"Gureng Gureng"}, ["gnt"] = {"Guntai"}, ["gnu"] = {"Gnau"}, ["gnw"] = {"Western Bolivian Guaraní"}, ["gnz"] = {"Ganzi"}, ["goa"] = {"Guro"}, ["gob"] = {"Playero"}, ["goc"] = {"Gorakor"}, ["god"] = {"Godié"}, ["goe"] = {"Gongduk"}, ["gof"] = {"Gofa"}, ["gog"] = {"Gogo"}, ["goh"] = {"Old High German (ca. 750-1050)"}, ["goi"] = {"Gobasi"}, ["goj"] = {"Gowlan"}, ["gok"] = {"Gowli"}, ["gol"] = {"Gola"}, ["gom"] = {"Goan Konkani"}, ["gon"] = {"Gondi"}, ["goo"] = {"Gone Dau"}, ["gop"] = {"Yeretuar"}, ["goq"] = {"Gorap"}, ["gor"] = {"Gorontalo"}, ["gos"] = {"Gronings"}, ["got"] = {"Gothic"}, ["gou"] = {"Gavar"}, ["gov"] = {"Goo"}, ["gow"] = {"Gorowa"}, ["gox"] = {"Gobu"}, ["goy"] = {"Goundo"}, ["goz"] = {"Gozarkhani"}, ["gpa"] = {"Gupa-Abawa"}, ["gpe"] = {"Ghanaian Pidgin English"}, ["gpn"] = {"Taiap"}, ["gqa"] = {"Ga'anda"}, ["gqi"] = {"Guiqiong"}, ["gqn"] = {"Guana (Brazil)"}, ["gqr"] = {"Gor"}, ["gqu"] = {"Qau"}, ["gra"] = {"Rajput Garasia"}, ["grb"] = {"Grebo"}, ["grc"] = {"Ancient Greek (to 1453)"}, ["grd"] = {"Guruntum-Mbaaru"}, ["grg"] = {"Madi"}, ["grh"] = {"Gbiri-Niragu"}, ["gri"] = {"Ghari"}, ["grj"] = {"Southern Grebo"}, ["grk"] = {"Greek languages"}, ["grm"] = {"Kota Marudu Talantang"}, ["gro"] = {"Groma"}, ["grq"] = {"Gorovu"}, ["grr"] = {"Taznatit"}, ["grs"] = {"Gresi"}, ["grt"] = {"Garo"}, ["gru"] = {"Kistane"}, ["grv"] = {"Central Grebo"}, ["grw"] = {"Gweda"}, ["grx"] = {"Guriaso"}, ["gry"] = {"Barclayville Grebo"}, ["grz"] = {"Guramalum"}, ["gse"] = {"Ghanaian Sign Language"}, ["gsg"] = {"German Sign Language"}, ["gsl"] = {"Gusilay"}, ["gsm"] = {"Guatemalan Sign Language"}, ["gsn"] = {"Nema", "Gusan"}, ["gso"] = {"Southwest Gbaya"}, ["gsp"] = {"Wasembo"}, ["gss"] = {"Greek Sign Language"}, ["gsw"] = {"Swiss German", "Alemannic", "Alsatian"}, ["gta"] = {"Guató"}, ["gtu"] = {"Aghu-Tharnggala"}, ["gua"] = {"Shiki"}, ["gub"] = {"Guajajára"}, ["guc"] = {"Wayuu"}, ["gud"] = {"Yocoboué Dida"}, ["gue"] = {"Gurindji"}, ["guf"] = {"Gupapuyngu"}, ["gug"] = {"Paraguayan Guaraní"}, ["guh"] = {"Guahibo"}, ["gui"] = {"Eastern Bolivian Guaraní"}, ["guk"] = {"Gumuz"}, ["gul"] = {"Sea Island Creole English"}, ["gum"] = {"Guambiano"}, ["gun"] = {"Mbyá Guaraní"}, ["guo"] = {"Guayabero"}, ["gup"] = {"Gunwinggu"}, ["guq"] = {"Aché"}, ["gur"] = {"Farefare"}, ["gus"] = {"Guinean Sign Language"}, ["gut"] = {"Maléku Jaíka"}, ["guu"] = {"Yanomamö"}, ["guw"] = {"Gun"}, ["gux"] = {"Gourmanchéma"}, ["guz"] = {"Gusii", "Ekegusii"}, ["gva"] = {"Guana (Paraguay)"}, ["gvc"] = {"Guanano"}, ["gve"] = {"Duwet"}, ["gvf"] = {"Golin"}, ["gvj"] = {"Guajá"}, ["gvl"] = {"Gulay"}, ["gvm"] = {"Gurmana"}, ["gvn"] = {"Kuku-Yalanji"}, ["gvo"] = {"Gavião Do Jiparaná"}, ["gvp"] = {"Pará Gavião"}, ["gvr"] = {"Gurung"}, ["gvs"] = {"Gumawana"}, ["gvy"] = {"Guyani"}, ["gwa"] = {"Mbato"}, ["gwb"] = {"Gwa"}, ["gwc"] = {"Gawri", "Kalami"}, ["gwd"] = {"Gawwada"}, ["gwe"] = {"Gweno"}, ["gwf"] = {"Gowro"}, ["gwg"] = {"Moo"}, ["gwi"] = {"Gwichʼin"}, ["gwj"] = {"ǀGwi"}, ["gwm"] = {"Awngthim"}, ["gwn"] = {"Gwandara"}, ["gwr"] = {"Gwere"}, ["gwt"] = {"Gawar-Bati"}, ["gwu"] = {"Guwamu"}, ["gww"] = {"Kwini"}, ["gwx"] = {"Gua"}, ["gxx"] = {"Wè Southern"}, ["gya"] = {"Northwest Gbaya"}, ["gyb"] = {"Garus"}, ["gyd"] = {"Kayardild"}, ["gye"] = {"Gyem"}, ["gyf"] = {"Gungabula"}, ["gyg"] = {"Gbayi"}, ["gyi"] = {"Gyele"}, ["gyl"] = {"Gayil"}, ["gym"] = {"Ngäbere"}, ["gyn"] = {"Guyanese Creole English"}, ["gyo"] = {"Gyalsumdo"}, ["gyr"] = {"Guarayu"}, ["gyy"] = {"Gunya"}, ["gyz"] = {"Geji", "Gyaazi"}, ["gza"] = {"Ganza"}, ["gzi"] = {"Gazi"}, ["gzn"] = {"Gane"}, ["haa"] = {"Han"}, ["hab"] = {"Hanoi Sign Language"}, ["hac"] = {"Gurani"}, ["had"] = {"Hatam"}, ["hae"] = {"Eastern Oromo"}, ["haf"] = {"Haiphong Sign Language"}, ["hag"] = {"Hanga"}, ["hah"] = {"Hahon"}, ["hai"] = {"Haida"}, ["haj"] = {"Hajong"}, ["hak"] = {"Hakka Chinese"}, ["hal"] = {"Halang"}, ["ham"] = {"Hewa"}, ["han"] = {"Hangaza"}, ["hao"] = {"Hakö"}, ["hap"] = {"Hupla"}, ["haq"] = {"Ha"}, ["har"] = {"Harari"}, ["has"] = {"Haisla"}, ["hav"] = {"Havu"}, ["haw"] = {"Hawaiian"}, ["hax"] = {"Southern Haida"}, ["hay"] = {"Haya"}, ["haz"] = {"Hazaragi"}, ["hba"] = {"Hamba"}, ["hbb"] = {"Huba"}, ["hbn"] = {"Heiban"}, ["hbo"] = {"Ancient Hebrew"}, ["hbu"] = {"Habu"}, ["hca"] = {"Andaman Creole Hindi"}, ["hch"] = {"Huichol"}, ["hdn"] = {"Northern Haida"}, ["hds"] = {"Honduras Sign Language"}, ["hdy"] = {"Hadiyya"}, ["hea"] = {"Northern Qiandong Miao"}, ["hed"] = {"Herdé"}, ["heg"] = {"Helong"}, ["heh"] = {"Hehe"}, ["hei"] = {"Heiltsuk"}, ["hem"] = {"Hemba"}, ["hgm"] = {"Haiǁom"}, ["hgw"] = {"Haigwai"}, ["hhi"] = {"Hoia Hoia"}, ["hhr"] = {"Kerak"}, ["hhy"] = {"Hoyahoya"}, ["hia"] = {"Lamang"}, ["hib"] = {"Hibito"}, ["hid"] = {"Hidatsa"}, ["hif"] = {"Fiji Hindi"}, ["hig"] = {"Kamwe"}, ["hih"] = {"Pamosu"}, ["hii"] = {"Hinduri"}, ["hij"] = {"Hijuk"}, ["hik"] = {"Seit-Kaitetu"}, ["hil"] = {"Hiligaynon"}, ["him"] = {"Himachali languages", "Western Pahari languages"}, ["hio"] = {"Tsoa"}, ["hir"] = {"Himarimã"}, ["hit"] = {"Hittite"}, ["hiw"] = {"Hiw"}, ["hix"] = {"Hixkaryána"}, ["hji"] = {"Haji"}, ["hka"] = {"Kahe"}, ["hke"] = {"Hunde"}, ["hkh"] = {"Khah", "Poguli"}, ["hkk"] = {"Hunjara-Kaina Ke"}, ["hkn"] = {"Mel-Khaonh"}, ["hks"] = {"Hong Kong Sign Language", "Heung Kong Sau Yue"}, ["hla"] = {"Halia"}, ["hlb"] = {"Halbi"}, ["hld"] = {"Halang Doan"}, ["hle"] = {"Hlersu"}, ["hlt"] = {"Matu Chin"}, ["hlu"] = {"Hieroglyphic Luwian"}, ["hma"] = {"Southern Mashan Hmong", "Southern Mashan Miao"}, ["hmb"] = {"Humburi Senni Songhay"}, ["hmc"] = {"Central Huishui Hmong", "Central Huishui Miao"}, ["hmd"] = {"Large Flowery Miao", "A-hmaos", "Da-Hua Miao"}, ["hme"] = {"Eastern Huishui Hmong", "Eastern Huishui Miao"}, ["hmf"] = {"Hmong Don"}, ["hmg"] = {"Southwestern Guiyang Hmong"}, ["hmh"] = {"Southwestern Huishui Hmong", "Southwestern Huishui Miao"}, ["hmi"] = {"Northern Huishui Hmong", "Northern Huishui Miao"}, ["hmj"] = {"Ge", "Gejia"}, ["hmk"] = {"Maek"}, ["hml"] = {"Luopohe Hmong", "Luopohe Miao"}, ["hmm"] = {"Central Mashan Hmong", "Central Mashan Miao"}, ["hmn"] = {"Hmong", "Mong"}, ["hmp"] = {"Northern Mashan Hmong", "Northern Mashan Miao"}, ["hmq"] = {"Eastern Qiandong Miao"}, ["hmr"] = {"Hmar"}, ["hms"] = {"Southern Qiandong Miao"}, ["hmt"] = {"Hamtai"}, ["hmu"] = {"Hamap"}, ["hmv"] = {"Hmong Dô"}, ["hmw"] = {"Western Mashan Hmong", "Western Mashan Miao"}, ["hmx"] = {"Hmong-Mien languages"}, ["hmy"] = {"Southern Guiyang Hmong", "Southern Guiyang Miao"}, ["hmz"] = {"Hmong Shua", "Sinicized Miao"}, ["hna"] = {"Mina (Cameroon)"}, ["hnd"] = {"Southern Hindko"}, ["hne"] = {"Chhattisgarhi"}, ["hng"] = {"Hungu"}, ["hnh"] = {"ǁAni"}, ["hni"] = {"Hani"}, ["hnj"] = {"Hmong Njua", "Mong Leng", "Mong Njua"}, ["hnn"] = {"Hanunoo"}, ["hno"] = {"Northern Hindko"}, ["hns"] = {"Caribbean Hindustani"}, ["hnu"] = {"Hung"}, ["hoa"] = {"Hoava"}, ["hob"] = {"Mari (Madang Province)"}, ["hoc"] = {"Ho"}, ["hod"] = {"Holma"}, ["hoe"] = {"Horom"}, ["hoh"] = {"Hobyót"}, ["hoi"] = {"Holikachuk"}, ["hoj"] = {"Hadothi", "Haroti"}, ["hok"] = {"Hokan languages"}, ["hol"] = {"Holu"}, ["hom"] = {"Homa"}, ["hoo"] = {"Holoholo"}, ["hop"] = {"Hopi"}, ["hor"] = {"Horo"}, ["hos"] = {"Ho Chi Minh City Sign Language"}, ["hot"] = {"Hote", "Malê"}, ["hov"] = {"Hovongan"}, ["how"] = {"Honi"}, ["hoy"] = {"Holiya"}, ["hoz"] = {"Hozo"}, ["hpo"] = {"Hpon"}, ["hps"] = {"Hawai'i Sign Language (HSL)", "Hawai'i Pidgin Sign Language"}, ["hra"] = {"Hrangkhol"}, ["hrc"] = {"Niwer Mil"}, ["hre"] = {"Hre"}, ["hrk"] = {"Haruku"}, ["hrm"] = {"Horned Miao"}, ["hro"] = {"Haroi"}, ["hrp"] = {"Nhirrpi"}, ["hrt"] = {"Hértevin"}, ["hru"] = {"Hruso"}, ["hrw"] = {"Warwar Feni"}, ["hrx"] = {"Hunsrik"}, ["hrz"] = {"Harzani"}, ["hsb"] = {"Upper Sorbian"}, ["hsh"] = {"Hungarian Sign Language"}, ["hsl"] = {"Hausa Sign Language"}, ["hsn"] = {"Xiang Chinese"}, ["hss"] = {"Harsusi"}, ["hti"] = {"Hoti"}, ["hto"] = {"Minica Huitoto"}, ["hts"] = {"Hadza"}, ["htu"] = {"Hitu"}, ["htx"] = {"Middle Hittite"}, ["hub"] = {"Huambisa"}, ["huc"] = {"ǂHua", "ǂʼAmkhoe"}, ["hud"] = {"Huaulu"}, ["hue"] = {"San Francisco Del Mar Huave"}, ["huf"] = {"Humene"}, ["hug"] = {"Huachipaeri"}, ["huh"] = {"Huilliche"}, ["hui"] = {"Huli"}, ["huj"] = {"Northern Guiyang Hmong", "Northern Guiyang Miao"}, ["huk"] = {"Hulung"}, ["hul"] = {"Hula"}, ["hum"] = {"Hungana"}, ["huo"] = {"Hu"}, ["hup"] = {"Hupa"}, ["huq"] = {"Tsat"}, ["hur"] = {"Halkomelem"}, ["hus"] = {"Huastec"}, ["hut"] = {"Humla"}, ["huu"] = {"Murui Huitoto"}, ["huv"] = {"San Mateo Del Mar Huave"}, ["huw"] = {"Hukumina"}, ["hux"] = {"Nüpode Huitoto"}, ["huy"] = {"Hulaulá"}, ["huz"] = {"Hunzib"}, ["hvc"] = {"Haitian Vodoun Culture Language"}, ["hve"] = {"San Dionisio Del Mar Huave"}, ["hvk"] = {"Haveke"}, ["hvn"] = {"Sabu"}, ["hvv"] = {"Santa María Del Mar Huave"}, ["hwa"] = {"Wané"}, ["hwc"] = {"Hawai'i Creole English", "Hawai'i Pidgin"}, ["hwo"] = {"Hwana"}, ["hya"] = {"Hya"}, ["hyw"] = {"Western Armenian"}, ["hyx"] = {"Armenian (family)"}, ["iai"] = {"Iaai"}, ["ian"] = {"Iatmul"}, ["iar"] = {"Purari"}, ["iba"] = {"Iban"}, ["ibb"] = {"Ibibio"}, ["ibd"] = {"Iwaidja"}, ["ibe"] = {"Akpes"}, ["ibg"] = {"Ibanag"}, ["ibh"] = {"Bih"}, ["ibl"] = {"Ibaloi"}, ["ibm"] = {"Agoi"}, ["ibn"] = {"Ibino"}, ["ibr"] = {"Ibuoro"}, ["ibu"] = {"Ibu"}, ["iby"] = {"Ibani"}, ["ica"] = {"Ede Ica"}, ["ich"] = {"Etkywan"}, ["icl"] = {"Icelandic Sign Language"}, ["icr"] = {"Islander Creole English"}, ["ida"] = {"Idakho-Isukha-Tiriki", "Luidakho-Luisukha-Lutirichi"}, ["idb"] = {"Indo-Portuguese"}, ["idc"] = {"Idon", "Ajiya"}, ["idd"] = {"Ede Idaca"}, ["ide"] = {"Idere"}, ["idi"] = {"Idi"}, ["idr"] = {"Indri"}, ["ids"] = {"Idesa"}, ["idt"] = {"Idaté"}, ["idu"] = {"Idoma"}, ["ifa"] = {"Amganad Ifugao"}, ["ifb"] = {"Batad Ifugao", "Ayangan Ifugao"}, ["ife"] = {"Ifè"}, ["iff"] = {"Ifo"}, ["ifk"] = {"Tuwali Ifugao"}, ["ifm"] = {"Teke-Fuumu"}, ["ifu"] = {"Mayoyao Ifugao"}, ["ify"] = {"Keley-I Kallahan"}, ["igb"] = {"Ebira"}, ["ige"] = {"Igede"}, ["igg"] = {"Igana"}, ["igl"] = {"Igala"}, ["igm"] = {"Kanggape"}, ["ign"] = {"Ignaciano"}, ["igo"] = {"Isebe"}, ["igs"] = {"Interglossa"}, ["igw"] = {"Igwe"}, ["ihb"] = {"Iha Based Pidgin"}, ["ihi"] = {"Ihievbe"}, ["ihp"] = {"Iha"}, ["ihw"] = {"Bidhawal"}, ["iin"] = {"Thiin"}, ["iir"] = {"Indo-Iranian languages"}, ["ijc"] = {"Izon"}, ["ije"] = {"Biseni"}, ["ijj"] = {"Ede Ije"}, ["ijn"] = {"Kalabari"}, ["ijo"] = {"Ijo languages"}, ["ijs"] = {"Southeast Ijo"}, ["ike"] = {"Eastern Canadian Inuktitut"}, ["ikh"] = {"Ikhin-Arokho"}, ["iki"] = {"Iko"}, ["ikk"] = {"Ika"}, ["ikl"] = {"Ikulu"}, ["iko"] = {"Olulumo-Ikom"}, ["ikp"] = {"Ikpeshi"}, ["ikr"] = {"Ikaranggal"}, ["iks"] = {"Inuit Sign Language"}, ["ikt"] = {"Inuinnaqtun", "Western Canadian Inuktitut"}, ["ikv"] = {"Iku-Gora-Ankwa"}, ["ikw"] = {"Ikwere"}, ["ikx"] = {"Ik"}, ["ikz"] = {"Ikizu"}, ["ila"] = {"Ile Ape"}, ["ilb"] = {"Ila"}, ["ilg"] = {"Garig-Ilgar"}, ["ili"] = {"Ili Turki"}, ["ilk"] = {"Ilongot"}, ["ilm"] = {"Iranun (Malaysia)"}, ["ilo"] = {"Iloko"}, ["ilp"] = {"Iranun (Philippines)"}, ["ils"] = {"International Sign"}, ["ilu"] = {"Ili'uun"}, ["ilv"] = {"Ilue"}, ["ima"] = {"Mala Malasar"}, ["imi"] = {"Anamgura"}, ["iml"] = {"Miluk"}, ["imn"] = {"Imonda"}, ["imo"] = {"Imbongu"}, ["imr"] = {"Imroing"}, ["ims"] = {"Marsian"}, ["imt"] = {"Imotong"}, ["imy"] = {"Milyan"}, ["inb"] = {"Inga"}, ["inc"] = {"Indic languages"}, ["ine"] = {"Indo-European languages"}, ["ing"] = {"Degexit'an"}, ["inh"] = {"Ingush"}, ["inj"] = {"Jungle Inga"}, ["inl"] = {"Indonesian Sign Language"}, ["inm"] = {"Minaean"}, ["inn"] = {"Isinai"}, ["ino"] = {"Inoke-Yate"}, ["inp"] = {"Iñapari"}, ["ins"] = {"Indian Sign Language"}, ["int"] = {"Intha"}, ["inz"] = {"Ineseño"}, ["ior"] = {"Inor"}, ["iou"] = {"Tuma-Irumu"}, ["iow"] = {"Iowa-Oto"}, ["ipi"] = {"Ipili"}, ["ipo"] = {"Ipiko"}, ["iqu"] = {"Iquito"}, ["iqw"] = {"Ikwo"}, ["ira"] = {"Iranian languages"}, ["ire"] = {"Iresim"}, ["irh"] = {"Irarutu"}, ["iri"] = {"Rigwe", "Irigwe"}, ["irk"] = {"Iraqw"}, ["irn"] = {"Irántxe"}, ["iro"] = {"Iroquoian languages"}, ["irr"] = {"Ir"}, ["iru"] = {"Irula"}, ["irx"] = {"Kamberau"}, ["iry"] = {"Iraya"}, ["isa"] = {"Isabi"}, ["isc"] = {"Isconahua"}, ["isd"] = {"Isnag"}, ["ise"] = {"Italian Sign Language"}, ["isg"] = {"Irish Sign Language"}, ["ish"] = {"Esan"}, ["isi"] = {"Nkem-Nkum"}, ["isk"] = {"Ishkashimi"}, ["ism"] = {"Masimasi"}, ["isn"] = {"Isanzu"}, ["iso"] = {"Isoko"}, ["isr"] = {"Israeli Sign Language"}, ["ist"] = {"Istriot"}, ["isu"] = {"Isu (Menchum Division)"}, ["itb"] = {"Binongan Itneg"}, ["itc"] = {"Italic languages"}, ["itd"] = {"Southern Tidung"}, ["ite"] = {"Itene"}, ["iti"] = {"Inlaod Itneg"}, ["itk"] = {"Judeo-Italian"}, ["itl"] = {"Itelmen"}, ["itm"] = {"Itu Mbon Uzo"}, ["ito"] = {"Itonama"}, ["itr"] = {"Iteri"}, ["its"] = {"Isekiri"}, ["itt"] = {"Maeng Itneg"}, ["itv"] = {"Itawit"}, ["itw"] = {"Ito"}, ["itx"] = {"Itik"}, ["ity"] = {"Moyadan Itneg"}, ["itz"] = {"Itzá"}, ["ium"] = {"Iu Mien"}, ["ivb"] = {"Ibatan"}, ["ivv"] = {"Ivatan"}, ["iwk"] = {"I-Wak"}, ["iwm"] = {"Iwam"}, ["iwo"] = {"Iwur"}, ["iws"] = {"Sepik Iwam"}, ["ixc"] = {"Ixcatec"}, ["ixl"] = {"Ixil"}, ["iya"] = {"Iyayu"}, ["iyo"] = {"Mesaka"}, ["iyx"] = {"Yaka (Congo)"}, ["izh"] = {"Ingrian"}, ["izm"] = {"Kizamani"}, ["izr"] = {"Izere"}, ["izz"] = {"Izii"}, ["jaa"] = {"Jamamadí"}, ["jab"] = {"Hyam"}, ["jac"] = {"Popti'", "Jakalteko"}, ["jad"] = {"Jahanka"}, ["jae"] = {"Yabem"}, ["jaf"] = {"Jara"}, ["jah"] = {"Jah Hut"}, ["jaj"] = {"Zazao"}, ["jak"] = {"Jakun"}, ["jal"] = {"Yalahatan"}, ["jam"] = {"Jamaican Creole English"}, ["jan"] = {"Jandai"}, ["jao"] = {"Yanyuwa"}, ["jaq"] = {"Yaqay"}, ["jas"] = {"New Caledonian Javanese"}, ["jat"] = {"Jakati"}, ["jau"] = {"Yaur"}, ["jax"] = {"Jambi Malay"}, ["jay"] = {"Yan-nhangu", "Nhangu"}, ["jaz"] = {"Jawe"}, ["jbe"] = {"Judeo-Berber"}, ["jbi"] = {"Badjiri"}, ["jbj"] = {"Arandai"}, ["jbk"] = {"Barikewa"}, ["jbm"] = {"Bijim"}, ["jbn"] = {"Nafusi"}, ["jbo"] = {"Lojban"}, ["jbr"] = {"Jofotek-Bromnya"}, ["jbt"] = {"Jabutí"}, ["jbu"] = {"Jukun Takum"}, ["jbw"] = {"Yawijibaya"}, ["jcs"] = {"Jamaican Country Sign Language"}, ["jct"] = {"Krymchak"}, ["jda"] = {"Jad"}, ["jdg"] = {"Jadgali"}, ["jdt"] = {"Judeo-Tat"}, ["jeb"] = {"Jebero"}, ["jee"] = {"Jerung"}, ["jeh"] = {"Jeh"}, ["jei"] = {"Yei"}, ["jek"] = {"Jeri Kuo"}, ["jel"] = {"Yelmek"}, ["jen"] = {"Dza"}, ["jer"] = {"Jere"}, ["jet"] = {"Manem"}, ["jeu"] = {"Jonkor Bourmataguil"}, ["jgb"] = {"Ngbee"}, ["jge"] = {"Judeo-Georgian"}, ["jgk"] = {"Gwak"}, ["jgo"] = {"Ngomba"}, ["jhi"] = {"Jehai"}, ["jhs"] = {"Jhankot Sign Language"}, ["jia"] = {"Jina"}, ["jib"] = {"Jibu"}, ["jic"] = {"Tol"}, ["jid"] = {"Bu (Kaduna State)"}, ["jie"] = {"Jilbe"}, ["jig"] = {"Jingulu", "Djingili"}, ["jih"] = {"sTodsde", "Shangzhai"}, ["jii"] = {"Jiiddu"}, ["jil"] = {"Jilim"}, ["jim"] = {"Jimi (Cameroon)"}, ["jio"] = {"Jiamao"}, ["jiq"] = {"Guanyinqiao", "Lavrung"}, ["jit"] = {"Jita"}, ["jiu"] = {"Youle Jinuo"}, ["jiv"] = {"Shuar"}, ["jiy"] = {"Buyuan Jinuo"}, ["jje"] = {"Jejueo"}, ["jjr"] = {"Bankal"}, ["jka"] = {"Kaera"}, ["jkm"] = {"Mobwa Karen"}, ["jko"] = {"Kubo"}, ["jkp"] = {"Paku Karen"}, ["jkr"] = {"Koro (India)"}, ["jks"] = {"Amami Koniya Sign Language"}, ["jku"] = {"Labir"}, ["jle"] = {"Ngile"}, ["jls"] = {"Jamaican Sign Language"}, ["jma"] = {"Dima"}, ["jmb"] = {"Zumbun"}, ["jmc"] = {"Machame"}, ["jmd"] = {"Yamdena"}, ["jmi"] = {"Jimi (Nigeria)"}, ["jml"] = {"Jumli"}, ["jmn"] = {"Makuri Naga"}, ["jmr"] = {"Kamara"}, ["jms"] = {"Mashi (Nigeria)"}, ["jmw"] = {"Mouwase"}, ["jmx"] = {"Western Juxtlahuaca Mixtec"}, ["jna"] = {"Jangshung"}, ["jnd"] = {"Jandavra"}, ["jng"] = {"Yangman"}, ["jni"] = {"Janji"}, ["jnj"] = {"Yemsa"}, ["jnl"] = {"Rawat"}, ["jns"] = {"Jaunsari"}, ["job"] = {"Joba"}, ["jod"] = {"Wojenaka"}, ["jog"] = {"Jogi"}, ["jor"] = {"Jorá"}, ["jos"] = {"Jordanian Sign Language"}, ["jow"] = {"Jowulu"}, ["jpa"] = {"Jewish Palestinian Aramaic"}, ["jpr"] = {"Judeo-Persian"}, ["jpx"] = {"Japanese (family)"}, ["jqr"] = {"Jaqaru"}, ["jra"] = {"Jarai"}, ["jrb"] = {"Judeo-Arabic"}, ["jrr"] = {"Jiru"}, ["jrt"] = {"Jakattoe"}, ["jru"] = {"Japrería"}, ["jsl"] = {"Japanese Sign Language"}, ["jua"] = {"Júma"}, ["jub"] = {"Wannu"}, ["juc"] = {"Jurchen"}, ["jud"] = {"Worodougou"}, ["juh"] = {"Hõne"}, ["jui"] = {"Ngadjuri"}, ["juk"] = {"Wapan"}, ["jul"] = {"Jirel"}, ["jum"] = {"Jumjum"}, ["jun"] = {"Juang"}, ["juo"] = {"Jiba"}, ["jup"] = {"Hupdë"}, ["jur"] = {"Jurúna"}, ["jus"] = {"Jumla Sign Language"}, ["jut"] = {"Jutish"}, ["juu"] = {"Ju"}, ["juw"] = {"Wãpha"}, ["juy"] = {"Juray"}, ["jvd"] = {"Javindo"}, ["jvn"] = {"Caribbean Javanese"}, ["jwi"] = {"Jwira-Pepesa"}, ["jya"] = {"Jiarong"}, ["jye"] = {"Judeo-Yemeni Arabic"}, ["jyy"] = {"Jaya"}, ["kaa"] = {"Kara-Kalpak", "Karakalpak"}, ["kab"] = {"Kabyle"}, ["kac"] = {"Kachin", "Jingpho"}, ["kad"] = {"Adara"}, ["kae"] = {"Ketangalan"}, ["kaf"] = {"Katso"}, ["kag"] = {"Kajaman"}, ["kah"] = {"Kara (Central African Republic)"}, ["kai"] = {"Karekare"}, ["kaj"] = {"Jju"}, ["kak"] = {"Kalanguya", "Kayapa Kallahan"}, ["kam"] = {"Kamba (Kenya)"}, ["kao"] = {"Xaasongaxango"}, ["kap"] = {"Bezhta"}, ["kaq"] = {"Capanahua"}, ["kar"] = {"Karen languages"}, ["kav"] = {"Katukína"}, ["kaw"] = {"Kawi"}, ["kax"] = {"Kao"}, ["kay"] = {"Kamayurá"}, ["kba"] = {"Kalarko"}, ["kbb"] = {"Kaxuiâna"}, ["kbc"] = {"Kadiwéu"}, ["kbd"] = {"Kabardian"}, ["kbe"] = {"Kanju"}, ["kbg"] = {"Khamba"}, ["kbh"] = {"Camsá"}, ["kbi"] = {"Kaptiau"}, ["kbj"] = {"Kari"}, ["kbk"] = {"Grass Koiari"}, ["kbl"] = {"Kanembu"}, ["kbm"] = {"Iwal"}, ["kbn"] = {"Kare (Central African Republic)"}, ["kbo"] = {"Keliko"}, ["kbp"] = {"Kabiyè"}, ["kbq"] = {"Kamano"}, ["kbr"] = {"Kafa"}, ["kbs"] = {"Kande"}, ["kbt"] = {"Abadi"}, ["kbu"] = {"Kabutra"}, ["kbv"] = {"Dera (Indonesia)"}, ["kbw"] = {"Kaiep"}, ["kbx"] = {"Ap Ma"}, ["kby"] = {"Manga Kanuri"}, ["kbz"] = {"Duhwa"}, ["kca"] = {"Khanty"}, ["kcb"] = {"Kawacha"}, ["kcc"] = {"Lubila"}, ["kcd"] = {"Ngkâlmpw Kanum"}, ["kce"] = {"Kaivi"}, ["kcf"] = {"Ukaan"}, ["kcg"] = {"Tyap"}, ["kch"] = {"Vono"}, ["kci"] = {"Kamantan"}, ["kcj"] = {"Kobiana"}, ["kck"] = {"Kalanga"}, ["kcl"] = {"Kela (Papua New Guinea)", "Kala"}, ["kcm"] = {"Gula (Central African Republic)"}, ["kcn"] = {"Nubi"}, ["kco"] = {"Kinalakna"}, ["kcp"] = {"Kanga"}, ["kcq"] = {"Kamo"}, ["kcr"] = {"Katla"}, ["kcs"] = {"Koenoem"}, ["kct"] = {"Kaian"}, ["kcu"] = {"Kami (Tanzania)"}, ["kcv"] = {"Kete"}, ["kcw"] = {"Kabwari"}, ["kcx"] = {"Kachama-Ganjule"}, ["kcy"] = {"Korandje"}, ["kcz"] = {"Konongo"}, ["kda"] = {"Worimi"}, ["kdc"] = {"Kutu"}, ["kdd"] = {"Yankunytjatjara"}, ["kde"] = {"Makonde"}, ["kdf"] = {"Mamusi"}, ["kdg"] = {"Seba"}, ["kdh"] = {"Tem"}, ["kdi"] = {"Kumam"}, ["kdj"] = {"Karamojong"}, ["kdk"] = {"Numèè", "Kwényi"}, ["kdl"] = {"Tsikimba"}, ["kdm"] = {"Kagoma"}, ["kdn"] = {"Kunda"}, ["kdo"] = {"Kordofanian languages"}, ["kdp"] = {"Kaningdon-Nindem"}, ["kdq"] = {"Koch"}, ["kdr"] = {"Karaim"}, ["kdt"] = {"Kuy"}, ["kdu"] = {"Kadaru"}, ["kdw"] = {"Koneraw"}, ["kdx"] = {"Kam"}, ["kdy"] = {"Keder", "Keijar"}, ["kdz"] = {"Kwaja"}, ["kea"] = {"Kabuverdianu"}, ["keb"] = {"Kélé"}, ["kec"] = {"Keiga"}, ["ked"] = {"Kerewe"}, ["kee"] = {"Eastern Keres"}, ["kef"] = {"Kpessi"}, ["keg"] = {"Tese"}, ["keh"] = {"Keak"}, ["kei"] = {"Kei"}, ["kej"] = {"Kadar"}, ["kek"] = {"Kekchí"}, ["kel"] = {"Kela (Democratic Republic of Congo)"}, ["kem"] = {"Kemak"}, ["ken"] = {"Kenyang"}, ["keo"] = {"Kakwa"}, ["kep"] = {"Kaikadi"}, ["keq"] = {"Kamar"}, ["ker"] = {"Kera"}, ["kes"] = {"Kugbo"}, ["ket"] = {"Ket"}, ["keu"] = {"Akebu"}, ["kev"] = {"Kanikkaran"}, ["kew"] = {"West Kewa"}, ["kex"] = {"Kukna"}, ["key"] = {"Kupia"}, ["kez"] = {"Kukele"}, ["kfa"] = {"Kodava"}, ["kfb"] = {"Northwestern Kolami"}, ["kfc"] = {"Konda-Dora"}, ["kfd"] = {"Korra Koraga"}, ["kfe"] = {"Kota (India)"}, ["kff"] = {"Koya"}, ["kfg"] = {"Kudiya"}, ["kfh"] = {"Kurichiya"}, ["kfi"] = {"Kannada Kurumba"}, ["kfj"] = {"Kemiehua"}, ["kfk"] = {"Kinnauri"}, ["kfl"] = {"Kung"}, ["kfm"] = {"Khunsari"}, ["kfn"] = {"Kuk"}, ["kfo"] = {"Koro (Côte d'Ivoire)"}, ["kfp"] = {"Korwa"}, ["kfq"] = {"Korku"}, ["kfr"] = {"Kachhi", "Kutchi"}, ["kfs"] = {"Bilaspuri"}, ["kft"] = {"Kanjari"}, ["kfu"] = {"Katkari"}, ["kfv"] = {"Kurmukar"}, ["kfw"] = {"Kharam Naga"}, ["kfx"] = {"Kullu Pahari"}, ["kfy"] = {"Kumaoni"}, ["kfz"] = {"Koromfé"}, ["kga"] = {"Koyaga"}, ["kgb"] = {"Kawe"}, ["kge"] = {"Komering"}, ["kgf"] = {"Kube"}, ["kgg"] = {"Kusunda"}, ["kgi"] = {"Selangor Sign Language"}, ["kgj"] = {"Gamale Kham"}, ["kgk"] = {"Kaiwá"}, ["kgl"] = {"Kunggari"}, ["kgn"] = {"Karingani"}, ["kgo"] = {"Krongo"}, ["kgp"] = {"Kaingang"}, ["kgq"] = {"Kamoro"}, ["kgr"] = {"Abun"}, ["kgs"] = {"Kumbainggar"}, ["kgt"] = {"Somyev"}, ["kgu"] = {"Kobol"}, ["kgv"] = {"Karas"}, ["kgw"] = {"Karon Dori"}, ["kgx"] = {"Kamaru"}, ["kgy"] = {"Kyerung"}, ["kha"] = {"Khasi"}, ["khb"] = {"Lü"}, ["khc"] = {"Tukang Besi North"}, ["khd"] = {"Bädi Kanum"}, ["khe"] = {"Korowai"}, ["khf"] = {"Khuen"}, ["khg"] = {"Khams Tibetan"}, ["khh"] = {"Kehu"}, ["khi"] = {"Khoisan languages"}, ["khj"] = {"Kuturmi"}, ["khk"] = {"Halh Mongolian"}, ["khl"] = {"Lusi"}, ["khn"] = {"Khandesi"}, ["kho"] = {"Khotanese", "Sakan"}, ["khp"] = {"Kapori", "Kapauri"}, ["khq"] = {"Koyra Chiini Songhay"}, ["khr"] = {"Kharia"}, ["khs"] = {"Kasua"}, ["kht"] = {"Khamti"}, ["khu"] = {"Nkhumbi"}, ["khv"] = {"Khvarshi"}, ["khw"] = {"Khowar"}, ["khx"] = {"Kanu"}, ["khy"] = {"Kele (Democratic Republic of Congo)"}, ["khz"] = {"Keapara"}, ["kia"] = {"Kim"}, ["kib"] = {"Koalib"}, ["kic"] = {"Kickapoo"}, ["kid"] = {"Koshin"}, ["kie"] = {"Kibet"}, ["kif"] = {"Eastern Parbate Kham"}, ["kig"] = {"Kimaama", "Kimaghima"}, ["kih"] = {"Kilmeri"}, ["kii"] = {"Kitsai"}, ["kij"] = {"Kilivila"}, ["kil"] = {"Kariya"}, ["kim"] = {"Karagas"}, ["kio"] = {"Kiowa"}, ["kip"] = {"Sheshi Kham"}, ["kiq"] = {"Kosadle", "Kosare"}, ["kis"] = {"Kis"}, ["kit"] = {"Agob"}, ["kiu"] = {"Kirmanjki (individual language)"}, ["kiv"] = {"Kimbu"}, ["kiw"] = {"Northeast Kiwai"}, ["kix"] = {"Khiamniungan Naga"}, ["kiy"] = {"Kirikiri"}, ["kiz"] = {"Kisi"}, ["kja"] = {"Mlap"}, ["kjb"] = {"Q'anjob'al", "Kanjobal"}, ["kjc"] = {"Coastal Konjo"}, ["kjd"] = {"Southern Kiwai"}, ["kje"] = {"Kisar"}, ["kjg"] = {"Khmu"}, ["kjh"] = {"Khakas"}, ["kji"] = {"Zabana"}, ["kjj"] = {"Khinalugh"}, ["kjk"] = {"Highland Konjo"}, ["kjl"] = {"Western Parbate Kham"}, ["kjm"] = {"Kháng"}, ["kjn"] = {"Kunjen"}, ["kjo"] = {"Harijan Kinnauri"}, ["kjp"] = {"Pwo Eastern Karen"}, ["kjq"] = {"Western Keres"}, ["kjr"] = {"Kurudu"}, ["kjs"] = {"East Kewa"}, ["kjt"] = {"Phrae Pwo Karen"}, ["kju"] = {"Kashaya"}, ["kjv"] = {"Kaikavian Literary Language"}, ["kjx"] = {"Ramopa"}, ["kjy"] = {"Erave"}, ["kjz"] = {"Bumthangkha"}, ["kka"] = {"Kakanda"}, ["kkb"] = {"Kwerisa"}, ["kkc"] = {"Odoodee"}, ["kkd"] = {"Kinuku"}, ["kke"] = {"Kakabe"}, ["kkf"] = {"Kalaktang Monpa"}, ["kkg"] = {"Mabaka Valley Kalinga"}, ["kkh"] = {"Khün"}, ["kki"] = {"Kagulu"}, ["kkj"] = {"Kako"}, ["kkk"] = {"Kokota"}, ["kkl"] = {"Kosarek Yale"}, ["kkm"] = {"Kiong"}, ["kkn"] = {"Kon Keu"}, ["kko"] = {"Karko"}, ["kkp"] = {"Gugubera", "Koko-Bera"}, ["kkq"] = {"Kaeku"}, ["kkr"] = {"Kir-Balar"}, ["kks"] = {"Giiwo"}, ["kkt"] = {"Koi"}, ["kku"] = {"Tumi"}, ["kkv"] = {"Kangean"}, ["kkw"] = {"Teke-Kukuya"}, ["kkx"] = {"Kohin"}, ["kky"] = {"Guugu Yimidhirr", "Guguyimidjir"}, ["kkz"] = {"Kaska"}, ["kla"] = {"Klamath-Modoc"}, ["klb"] = {"Kiliwa"}, ["klc"] = {"Kolbila"}, ["kld"] = {"Gamilaraay"}, ["kle"] = {"Kulung (Nepal)"}, ["klf"] = {"Kendeje"}, ["klg"] = {"Tagakaulo"}, ["klh"] = {"Weliki"}, ["kli"] = {"Kalumpang"}, ["klj"] = {"Khalaj"}, ["klk"] = {"Kono (Nigeria)"}, ["kll"] = {"Kagan Kalagan"}, ["klm"] = {"Migum"}, ["kln"] = {"Kalenjin"}, ["klo"] = {"Kapya"}, ["klp"] = {"Kamasa"}, ["klq"] = {"Rumu"}, ["klr"] = {"Khaling"}, ["kls"] = {"Kalasha"}, ["klt"] = {"Nukna"}, ["klu"] = {"Klao"}, ["klv"] = {"Maskelynes"}, ["klw"] = {"Tado", "Lindu"}, ["klx"] = {"Koluwawa"}, ["kly"] = {"Kalao"}, ["klz"] = {"Kabola"}, ["kma"] = {"Konni"}, ["kmb"] = {"Kimbundu"}, ["kmc"] = {"Southern Dong"}, ["kmd"] = {"Majukayang Kalinga"}, ["kme"] = {"Bakole"}, ["kmf"] = {"Kare (Papua New Guinea)"}, ["kmg"] = {"Kâte"}, ["kmh"] = {"Kalam"}, ["kmi"] = {"Kami (Nigeria)"}, ["kmj"] = {"Kumarbhag Paharia"}, ["kmk"] = {"Limos Kalinga"}, ["kml"] = {"Tanudan Kalinga"}, ["kmm"] = {"Kom (India)"}, ["kmn"] = {"Awtuw"}, ["kmo"] = {"Kwoma"}, ["kmp"] = {"Gimme"}, ["kmq"] = {"Kwama"}, ["kmr"] = {"Northern Kurdish"}, ["kms"] = {"Kamasau"}, ["kmt"] = {"Kemtuik"}, ["kmu"] = {"Kanite"}, ["kmv"] = {"Karipúna Creole French"}, ["kmw"] = {"Komo (Democratic Republic of Congo)"}, ["kmx"] = {"Waboda"}, ["kmy"] = {"Koma"}, ["kmz"] = {"Khorasani Turkish"}, ["kna"] = {"Dera (Nigeria)"}, ["knb"] = {"Lubuagan Kalinga"}, ["knc"] = {"Central Kanuri"}, ["knd"] = {"Konda"}, ["kne"] = {"Kankanaey"}, ["knf"] = {"Mankanya"}, ["kng"] = {"Koongo"}, ["kni"] = {"Kanufi"}, ["knj"] = {"Western Kanjobal"}, ["knk"] = {"Kuranko"}, ["knl"] = {"Keninjal"}, ["knm"] = {"Kanamarí"}, ["knn"] = {"Konkani (individual language)"}, ["kno"] = {"Kono (Sierra Leone)"}, ["knp"] = {"Kwanja"}, ["knq"] = {"Kintaq"}, ["knr"] = {"Kaningra"}, ["kns"] = {"Kensiu"}, ["knt"] = {"Panoan Katukína"}, ["knu"] = {"Kono (Guinea)"}, ["knv"] = {"Tabo"}, ["knw"] = {"Kung-Ekoka"}, ["knx"] = {"Kendayan", "Salako"}, ["kny"] = {"Kanyok"}, ["knz"] = {"Kalamsé"}, ["koa"] = {"Konomala"}, ["koc"] = {"Kpati"}, ["kod"] = {"Kodi"}, ["koe"] = {"Kacipo-Bale Suri"}, ["kof"] = {"Kubi"}, ["kog"] = {"Cogui", "Kogi"}, ["koh"] = {"Koyo"}, ["koi"] = {"Komi-Permyak"}, ["kok"] = {"Konkani (macrolanguage)"}, ["kol"] = {"Kol (Papua New Guinea)"}, ["koo"] = {"Konzo"}, ["kop"] = {"Waube"}, ["koq"] = {"Kota (Gabon)"}, ["kos"] = {"Kosraean"}, ["kot"] = {"Lagwan"}, ["kou"] = {"Koke"}, ["kov"] = {"Kudu-Camo"}, ["kow"] = {"Kugama"}, ["koy"] = {"Koyukon"}, ["koz"] = {"Korak"}, ["kpa"] = {"Kutto"}, ["kpb"] = {"Mullu Kurumba"}, ["kpc"] = {"Curripaco"}, ["kpd"] = {"Koba"}, ["kpe"] = {"Kpelle"}, ["kpf"] = {"Komba"}, ["kpg"] = {"Kapingamarangi"}, ["kph"] = {"Kplang"}, ["kpi"] = {"Kofei"}, ["kpj"] = {"Karajá"}, ["kpk"] = {"Kpan"}, ["kpl"] = {"Kpala"}, ["kpm"] = {"Koho"}, ["kpn"] = {"Kepkiriwát"}, ["kpo"] = {"Ikposo"}, ["kpq"] = {"Korupun-Sela"}, ["kpr"] = {"Korafe-Yegha"}, ["kps"] = {"Tehit"}, ["kpt"] = {"Karata"}, ["kpu"] = {"Kafoa"}, ["kpv"] = {"Komi-Zyrian"}, ["kpw"] = {"Kobon"}, ["kpx"] = {"Mountain Koiali"}, ["kpy"] = {"Koryak"}, ["kpz"] = {"Kupsabiny"}, ["kqa"] = {"Mum"}, ["kqb"] = {"Kovai"}, ["kqc"] = {"Doromu-Koki"}, ["kqd"] = {"Koy Sanjaq Surat"}, ["kqe"] = {"Kalagan"}, ["kqf"] = {"Kakabai"}, ["kqg"] = {"Khe"}, ["kqh"] = {"Kisankasa"}, ["kqi"] = {"Koitabu"}, ["kqj"] = {"Koromira"}, ["kqk"] = {"Kotafon Gbe"}, ["kql"] = {"Kyenele"}, ["kqm"] = {"Khisa"}, ["kqn"] = {"Kaonde"}, ["kqo"] = {"Eastern Krahn"}, ["kqp"] = {"Kimré"}, ["kqq"] = {"Krenak"}, ["kqr"] = {"Kimaragang"}, ["kqs"] = {"Northern Kissi"}, ["kqt"] = {"Klias River Kadazan"}, ["kqu"] = {"Seroa"}, ["kqv"] = {"Okolod"}, ["kqw"] = {"Kandas"}, ["kqx"] = {"Mser"}, ["kqy"] = {"Koorete"}, ["kqz"] = {"Korana"}, ["kra"] = {"Kumhali"}, ["krb"] = {"Karkin"}, ["krc"] = {"Karachay-Balkar"}, ["krd"] = {"Kairui-Midiki"}, ["kre"] = {"Panará"}, ["krf"] = {"Koro (Vanuatu)"}, ["krh"] = {"Kurama"}, ["kri"] = {"Krio"}, ["krj"] = {"Kinaray-A"}, ["krk"] = {"Kerek"}, ["krl"] = {"Karelian"}, ["krn"] = {"Sapo"}, ["kro"] = {"Kru languages"}, ["krp"] = {"Durop"}, ["krr"] = {"Krung"}, ["krs"] = {"Gbaya (Sudan)"}, ["krt"] = {"Tumari Kanuri"}, ["kru"] = {"Kurukh"}, ["krv"] = {"Kavet"}, ["krw"] = {"Western Krahn"}, ["krx"] = {"Karon"}, ["kry"] = {"Kryts"}, ["krz"] = {"Sota Kanum"}, ["ksb"] = {"Shambala"}, ["ksc"] = {"Southern Kalinga"}, ["ksd"] = {"Kuanua"}, ["kse"] = {"Kuni"}, ["ksf"] = {"Bafia"}, ["ksg"] = {"Kusaghe"}, ["ksh"] = {"Kölsch"}, ["ksi"] = {"Krisa", "I'saka"}, ["ksj"] = {"Uare"}, ["ksk"] = {"Kansa"}, ["ksl"] = {"Kumalu"}, ["ksm"] = {"Kumba"}, ["ksn"] = {"Kasiguranin"}, ["kso"] = {"Kofa"}, ["ksp"] = {"Kaba"}, ["ksq"] = {"Kwaami"}, ["ksr"] = {"Borong"}, ["kss"] = {"Southern Kisi"}, ["kst"] = {"Winyé"}, ["ksu"] = {"Khamyang"}, ["ksv"] = {"Kusu"}, ["ksw"] = {"S'gaw Karen"}, ["ksx"] = {"Kedang"}, ["ksy"] = {"Kharia Thar"}, ["ksz"] = {"Kodaku"}, ["kta"] = {"Katua"}, ["ktb"] = {"Kambaata"}, ["ktc"] = {"Kholok"}, ["ktd"] = {"Kokata", "Kukatha"}, ["kte"] = {"Nubri"}, ["ktf"] = {"Kwami"}, ["ktg"] = {"Kalkutung"}, ["kth"] = {"Karanga"}, ["kti"] = {"North Muyu"}, ["ktj"] = {"Plapo Krumen"}, ["ktk"] = {"Kaniet"}, ["ktl"] = {"Koroshi"}, ["ktm"] = {"Kurti"}, ["ktn"] = {"Karitiâna"}, ["kto"] = {"Kuot"}, ["ktp"] = {"Kaduo"}, ["ktq"] = {"Katabaga"}, ["kts"] = {"South Muyu"}, ["ktt"] = {"Ketum"}, ["ktu"] = {"Kituba (Democratic Republic of Congo)"}, ["ktv"] = {"Eastern Katu"}, ["ktw"] = {"Kato"}, ["ktx"] = {"Kaxararí"}, ["kty"] = {"Kango (Bas-Uélé District)"}, ["ktz"] = {"Juǀʼhoan", "Juǀʼhoansi"}, ["kub"] = {"Kutep"}, ["kuc"] = {"Kwinsu"}, ["kud"] = {"'Auhelawa"}, ["kue"] = {"Kuman (Papua New Guinea)"}, ["kuf"] = {"Western Katu"}, ["kug"] = {"Kupa"}, ["kuh"] = {"Kushi"}, ["kui"] = {"Kuikúro-Kalapálo", "Kalapalo"}, ["kuj"] = {"Kuria"}, ["kuk"] = {"Kepo'"}, ["kul"] = {"Kulere"}, ["kum"] = {"Kumyk"}, ["kun"] = {"Kunama"}, ["kuo"] = {"Kumukio"}, ["kup"] = {"Kunimaipa"}, ["kuq"] = {"Karipuna"}, ["kus"] = {"Kusaal"}, ["kut"] = {"Kutenai"}, ["kuu"] = {"Upper Kuskokwim"}, ["kuv"] = {"Kur"}, ["kuw"] = {"Kpagua"}, ["kux"] = {"Kukatja"}, ["kuy"] = {"Kuuku-Ya'u"}, ["kuz"] = {"Kunza"}, ["kva"] = {"Bagvalal"}, ["kvb"] = {"Kubu"}, ["kvc"] = {"Kove"}, ["kvd"] = {"Kui (Indonesia)"}, ["kve"] = {"Kalabakan"}, ["kvf"] = {"Kabalai"}, ["kvg"] = {"Kuni-Boazi"}, ["kvh"] = {"Komodo"}, ["kvi"] = {"Kwang"}, ["kvj"] = {"Psikye"}, ["kvk"] = {"Korean Sign Language"}, ["kvl"] = {"Kayaw"}, ["kvm"] = {"Kendem"}, ["kvn"] = {"Border Kuna"}, ["kvo"] = {"Dobel"}, ["kvp"] = {"Kompane"}, ["kvq"] = {"Geba Karen"}, ["kvr"] = {"Kerinci"}, ["kvt"] = {"Lahta Karen", "Lahta"}, ["kvu"] = {"Yinbaw Karen"}, ["kvv"] = {"Kola"}, ["kvw"] = {"Wersing"}, ["kvx"] = {"Parkari Koli"}, ["kvy"] = {"Yintale Karen", "Yintale"}, ["kvz"] = {"Tsakwambo", "Tsaukambo"}, ["kwa"] = {"Dâw"}, ["kwb"] = {"Kwa"}, ["kwc"] = {"Likwala"}, ["kwd"] = {"Kwaio"}, ["kwe"] = {"Kwerba"}, ["kwf"] = {"Kwara'ae"}, ["kwg"] = {"Sara Kaba Deme"}, ["kwh"] = {"Kowiai"}, ["kwi"] = {"Awa-Cuaiquer"}, ["kwj"] = {"Kwanga"}, ["kwk"] = {"Kwakiutl"}, ["kwl"] = {"Kofyar"}, ["kwm"] = {"Kwambi"}, ["kwn"] = {"Kwangali"}, ["kwo"] = {"Kwomtari"}, ["kwp"] = {"Kodia"}, ["kwr"] = {"Kwer"}, ["kws"] = {"Kwese"}, ["kwt"] = {"Kwesten"}, ["kwu"] = {"Kwakum"}, ["kwv"] = {"Sara Kaba Náà"}, ["kww"] = {"Kwinti"}, ["kwx"] = {"Khirwar"}, ["kwy"] = {"San Salvador Kongo"}, ["kwz"] = {"Kwadi"}, ["kxa"] = {"Kairiru"}, ["kxb"] = {"Krobu"}, ["kxc"] = {"Konso", "Khonso"}, ["kxd"] = {"Brunei"}, ["kxf"] = {"Manumanaw Karen", "Manumanaw"}, ["kxh"] = {"Karo (Ethiopia)"}, ["kxi"] = {"Keningau Murut"}, ["kxj"] = {"Kulfa"}, ["kxk"] = {"Zayein Karen"}, ["kxm"] = {"Northern Khmer"}, ["kxn"] = {"Kanowit-Tanjong Melanau"}, ["kxo"] = {"Kanoé"}, ["kxp"] = {"Wadiyara Koli"}, ["kxq"] = {"Smärky Kanum"}, ["kxr"] = {"Koro (Papua New Guinea)"}, ["kxs"] = {"Kangjia"}, ["kxt"] = {"Koiwat"}, ["kxv"] = {"Kuvi"}, ["kxw"] = {"Konai"}, ["kxx"] = {"Likuba"}, ["kxy"] = {"Kayong"}, ["kxz"] = {"Kerewo"}, ["kya"] = {"Kwaya"}, ["kyb"] = {"Butbut Kalinga"}, ["kyc"] = {"Kyaka"}, ["kyd"] = {"Karey"}, ["kye"] = {"Krache"}, ["kyf"] = {"Kouya"}, ["kyg"] = {"Keyagana"}, ["kyh"] = {"Karok"}, ["kyi"] = {"Kiput"}, ["kyj"] = {"Karao"}, ["kyk"] = {"Kamayo"}, ["kyl"] = {"Kalapuya"}, ["kym"] = {"Kpatili"}, ["kyn"] = {"Northern Binukidnon"}, ["kyo"] = {"Kelon"}, ["kyp"] = {"Kang"}, ["kyq"] = {"Kenga"}, ["kyr"] = {"Kuruáya"}, ["kys"] = {"Baram Kayan"}, ["kyt"] = {"Kayagar"}, ["kyu"] = {"Western Kayah"}, ["kyv"] = {"Kayort"}, ["kyw"] = {"Kudmali"}, ["kyx"] = {"Rapoisi"}, ["kyy"] = {"Kambaira"}, ["kyz"] = {"Kayabí"}, ["kza"] = {"Western Karaboro"}, ["kzb"] = {"Kaibobo"}, ["kzc"] = {"Bondoukou Kulango"}, ["kzd"] = {"Kadai"}, ["kze"] = {"Kosena"}, ["kzf"] = {"Da'a Kaili"}, ["kzg"] = {"Kikai"}, ["kzi"] = {"Kelabit"}, ["kzk"] = {"Kazukuru"}, ["kzl"] = {"Kayeli"}, ["kzm"] = {"Kais"}, ["kzn"] = {"Kokola"}, ["kzo"] = {"Kaningi"}, ["kzp"] = {"Kaidipang"}, ["kzq"] = {"Kaike"}, ["kzr"] = {"Karang"}, ["kzs"] = {"Sugut Dusun"}, ["kzu"] = {"Kayupulau"}, ["kzv"] = {"Komyandaret"}, ["kzw"] = {"Karirí-Xocó"}, ["kzx"] = {"Kamarian"}, ["kzy"] = {"Kango (Tshopo District)"}, ["kzz"] = {"Kalabra"}, ["laa"] = {"Southern Subanen"}, ["lab"] = {"Linear A"}, ["lac"] = {"Lacandon"}, ["lad"] = {"Ladino"}, ["lae"] = {"Pattani"}, ["laf"] = {"Lafofa"}, ["lag"] = {"Rangi"}, ["lah"] = {"Lahnda"}, ["lai"] = {"Lambya"}, ["laj"] = {"Lango (Uganda)"}, ["lal"] = {"Lalia"}, ["lam"] = {"Lamba"}, ["lan"] = {"Laru"}, ["lap"] = {"Laka (Chad)"}, ["laq"] = {"Qabiao"}, ["lar"] = {"Larteh"}, ["las"] = {"Lama (Togo)"}, ["lau"] = {"Laba"}, ["law"] = {"Lauje"}, ["lax"] = {"Tiwa"}, ["lay"] = {"Lama Bai"}, ["laz"] = {"Aribwatsa"}, ["lbb"] = {"Label"}, ["lbc"] = {"Lakkia"}, ["lbe"] = {"Lak"}, ["lbf"] = {"Tinani"}, ["lbg"] = {"Laopang"}, ["lbi"] = {"La'bi"}, ["lbj"] = {"Ladakhi"}, ["lbk"] = {"Central Bontok"}, ["lbl"] = {"Libon Bikol"}, ["lbm"] = {"Lodhi"}, ["lbn"] = {"Rmeet"}, ["lbo"] = {"Laven"}, ["lbq"] = {"Wampar"}, ["lbr"] = {"Lohorung"}, ["lbs"] = {"Libyan Sign Language"}, ["lbt"] = {"Lachi"}, ["lbu"] = {"Labu"}, ["lbv"] = {"Lavatbura-Lamusong"}, ["lbw"] = {"Tolaki"}, ["lbx"] = {"Lawangan"}, ["lby"] = {"Lamalama", "Lamu-Lamu"}, ["lbz"] = {"Lardil"}, ["lcc"] = {"Legenyem"}, ["lcd"] = {"Lola"}, ["lce"] = {"Loncong", "Sekak"}, ["lcf"] = {"Lubu"}, ["lch"] = {"Luchazi"}, ["lcl"] = {"Lisela"}, ["lcm"] = {"Tungag"}, ["lcp"] = {"Western Lawa"}, ["lcq"] = {"Luhu"}, ["lcs"] = {"Lisabata-Nuniali"}, ["lda"] = {"Kla-Dan"}, ["ldb"] = {"Dũya"}, ["ldd"] = {"Luri"}, ["ldg"] = {"Lenyima"}, ["ldh"] = {"Lamja-Dengsa-Tola"}, ["ldi"] = {"Laari"}, ["ldj"] = {"Lemoro"}, ["ldk"] = {"Leelau"}, ["ldl"] = {"Kaan"}, ["ldm"] = {"Landoma"}, ["ldn"] = {"Láadan"}, ["ldo"] = {"Loo"}, ["ldp"] = {"Tso"}, ["ldq"] = {"Lufu"}, ["lea"] = {"Lega-Shabunda"}, ["leb"] = {"Lala-Bisa"}, ["lec"] = {"Leco"}, ["led"] = {"Lendu"}, ["lee"] = {"Lyélé"}, ["lef"] = {"Lelemi"}, ["leh"] = {"Lenje"}, ["lei"] = {"Lemio"}, ["lej"] = {"Lengola"}, ["lek"] = {"Leipon"}, ["lel"] = {"Lele (Democratic Republic of Congo)"}, ["lem"] = {"Nomaande"}, ["len"] = {"Lenca"}, ["leo"] = {"Leti (Cameroon)"}, ["lep"] = {"Lepcha"}, ["leq"] = {"Lembena"}, ["ler"] = {"Lenkau"}, ["les"] = {"Lese"}, ["let"] = {"Lesing-Gelimi", "Amio-Gelimi"}, ["leu"] = {"Kara (Papua New Guinea)"}, ["lev"] = {"Lamma"}, ["lew"] = {"Ledo Kaili"}, ["lex"] = {"Luang"}, ["ley"] = {"Lemolang"}, ["lez"] = {"Lezghian"}, ["lfa"] = {"Lefa"}, ["lfn"] = {"Lingua Franca Nova"}, ["lga"] = {"Lungga"}, ["lgb"] = {"Laghu"}, ["lgg"] = {"Lugbara"}, ["lgh"] = {"Laghuu"}, ["lgi"] = {"Lengilu"}, ["lgk"] = {"Lingarak", "Neverver"}, ["lgl"] = {"Wala"}, ["lgm"] = {"Lega-Mwenga"}, ["lgn"] = {"T'apo", "Opuuo"}, ["lgo"] = {"Lango (South Sudan)"}, ["lgq"] = {"Logba"}, ["lgr"] = {"Lengo"}, ["lgs"] = {"Guinea-Bissau Sign Language", "Língua Gestual Guineense"}, ["lgt"] = {"Pahi"}, ["lgu"] = {"Longgu"}, ["lgz"] = {"Ligenza"}, ["lha"] = {"Laha (Viet Nam)"}, ["lhh"] = {"Laha (Indonesia)"}, ["lhi"] = {"Lahu Shi"}, ["lhl"] = {"Lahul Lohar"}, ["lhm"] = {"Lhomi"}, ["lhn"] = {"Lahanan"}, ["lhp"] = {"Lhokpu"}, ["lhs"] = {"Mlahsö"}, ["lht"] = {"Lo-Toga"}, ["lhu"] = {"Lahu"}, ["lia"] = {"West-Central Limba"}, ["lib"] = {"Likum"}, ["lic"] = {"Hlai"}, ["lid"] = {"Nyindrou"}, ["lie"] = {"Likila"}, ["lif"] = {"Limbu"}, ["lig"] = {"Ligbi"}, ["lih"] = {"Lihir"}, ["lij"] = {"Ligurian"}, ["lik"] = {"Lika"}, ["lil"] = {"Lillooet"}, ["lio"] = {"Liki"}, ["lip"] = {"Sekpele"}, ["liq"] = {"Libido"}, ["lir"] = {"Liberian English"}, ["lis"] = {"Lisu"}, ["liu"] = {"Logorik"}, ["liv"] = {"Liv"}, ["liw"] = {"Col"}, ["lix"] = {"Liabuku"}, ["liy"] = {"Banda-Bambari"}, ["liz"] = {"Libinza"}, ["lja"] = {"Golpa"}, ["lje"] = {"Rampi"}, ["lji"] = {"Laiyolo"}, ["ljl"] = {"Li'o"}, ["ljp"] = {"Lampung Api"}, ["ljw"] = {"Yirandali"}, ["ljx"] = {"Yuru"}, ["lka"] = {"Lakalei"}, ["lkb"] = {"Kabras", "Lukabaras"}, ["lkc"] = {"Kucong"}, ["lkd"] = {"Lakondê"}, ["lke"] = {"Kenyi"}, ["lkh"] = {"Lakha"}, ["lki"] = {"Laki"}, ["lkj"] = {"Remun"}, ["lkl"] = {"Laeko-Libuat"}, ["lkm"] = {"Kalaamaya"}, ["lkn"] = {"Lakon", "Vure"}, ["lko"] = {"Khayo", "Olukhayo"}, ["lkr"] = {"Päri"}, ["lks"] = {"Kisa", "Olushisa"}, ["lkt"] = {"Lakota"}, ["lku"] = {"Kungkari"}, ["lky"] = {"Lokoya"}, ["lla"] = {"Lala-Roba"}, ["llb"] = {"Lolo"}, ["llc"] = {"Lele (Guinea)"}, ["lld"] = {"Ladin"}, ["lle"] = {"Lele (Papua New Guinea)"}, ["llf"] = {"Hermit"}, ["llg"] = {"Lole"}, ["llh"] = {"Lamu"}, ["lli"] = {"Teke-Laali"}, ["llj"] = {"Ladji Ladji"}, ["llk"] = {"Lelak"}, ["lll"] = {"Lilau"}, ["llm"] = {"Lasalimu"}, ["lln"] = {"Lele (Chad)"}, ["llp"] = {"North Efate"}, ["llq"] = {"Lolak"}, ["lls"] = {"Lithuanian Sign Language"}, ["llu"] = {"Lau"}, ["llx"] = {"Lauan"}, ["lma"] = {"East Limba"}, ["lmb"] = {"Merei"}, ["lmc"] = {"Limilngan"}, ["lmd"] = {"Lumun"}, ["lme"] = {"Pévé"}, ["lmf"] = {"South Lembata"}, ["lmg"] = {"Lamogai"}, ["lmh"] = {"Lambichhong"}, ["lmi"] = {"Lombi"}, ["lmj"] = {"West Lembata"}, ["lmk"] = {"Lamkang"}, ["lml"] = {"Hano"}, ["lmn"] = {"Lambadi"}, ["lmo"] = {"Lombard"}, ["lmp"] = {"Limbum"}, ["lmq"] = {"Lamatuka"}, ["lmr"] = {"Lamalera"}, ["lmu"] = {"Lamenu"}, ["lmv"] = {"Lomaiviti"}, ["lmw"] = {"Lake Miwok"}, ["lmx"] = {"Laimbue"}, ["lmy"] = {"Lamboya"}, ["lna"] = {"Langbashe"}, ["lnb"] = {"Mbalanhu"}, ["lnd"] = {"Lundayeh", "Lun Bawang"}, ["lng"] = {"Langobardic"}, ["lnh"] = {"Lanoh"}, ["lni"] = {"Daantanai'"}, ["lnj"] = {"Leningitij"}, ["lnl"] = {"South Central Banda"}, ["lnm"] = {"Langam"}, ["lnn"] = {"Lorediakarkar"}, ["lns"] = {"Lamnso'"}, ["lnu"] = {"Longuda"}, ["lnw"] = {"Lanima"}, ["lnz"] = {"Lonzo"}, ["loa"] = {"Loloda"}, ["lob"] = {"Lobi"}, ["loc"] = {"Inonhan"}, ["loe"] = {"Saluan"}, ["lof"] = {"Logol"}, ["log"] = {"Logo"}, ["loh"] = {"Laarim", "Narim"}, ["loi"] = {"Loma (Côte d'Ivoire)"}, ["loj"] = {"Lou"}, ["lok"] = {"Loko"}, ["lol"] = {"Mongo"}, ["lom"] = {"Loma (Liberia)"}, ["lon"] = {"Malawi Lomwe"}, ["loo"] = {"Lombo"}, ["lop"] = {"Lopa"}, ["loq"] = {"Lobala"}, ["lor"] = {"Téén"}, ["los"] = {"Loniu"}, ["lot"] = {"Otuho"}, ["lou"] = {"Louisiana Creole"}, ["lov"] = {"Lopi"}, ["low"] = {"Tampias Lobu"}, ["lox"] = {"Loun"}, ["loy"] = {"Loke"}, ["loz"] = {"Lozi"}, ["lpa"] = {"Lelepa"}, ["lpe"] = {"Lepki"}, ["lpn"] = {"Long Phuri Naga"}, ["lpo"] = {"Lipo"}, ["lpx"] = {"Lopit"}, ["lqr"] = {"Logir"}, ["lra"] = {"Rara Bakati'"}, ["lrc"] = {"Northern Luri"}, ["lre"] = {"Laurentian"}, ["lrg"] = {"Laragia"}, ["lri"] = {"Marachi", "Olumarachi"}, ["lrk"] = {"Loarki"}, ["lrl"] = {"Lari"}, ["lrm"] = {"Marama", "Olumarama"}, ["lrn"] = {"Lorang"}, ["lro"] = {"Laro"}, ["lrr"] = {"Southern Yamphu"}, ["lrt"] = {"Larantuka Malay"}, ["lrv"] = {"Larevat"}, ["lrz"] = {"Lemerig"}, ["lsa"] = {"Lasgerdi"}, ["lsb"] = {"Burundian Sign Language", "Langue des Signes Burundaise"}, ["lsc"] = {"Albarradas Sign Language", "Lengua de señas Albarradas"}, ["lsd"] = {"Lishana Deni"}, ["lse"] = {"Lusengo"}, ["lsh"] = {"Lish"}, ["lsi"] = {"Lashi"}, ["lsl"] = {"Latvian Sign Language"}, ["lsm"] = {"Saamia", "Olusamia"}, ["lsn"] = {"Tibetan Sign Language"}, ["lso"] = {"Laos Sign Language"}, ["lsp"] = {"Panamanian Sign Language", "Lengua de Señas Panameñas"}, ["lsr"] = {"Aruop"}, ["lss"] = {"Lasi"}, ["lst"] = {"Trinidad and Tobago Sign Language"}, ["lsv"] = {"Sivia Sign Language"}, ["lsw"] = {"Seychelles Sign Language", "Lalang Siny Seselwa", "Langue des Signes Seychelloise"}, ["lsy"] = {"Mauritian Sign Language"}, ["ltc"] = {"Late Middle Chinese"}, ["ltg"] = {"Latgalian"}, ["lth"] = {"Thur"}, ["lti"] = {"Leti (Indonesia)"}, ["ltn"] = {"Latundê"}, ["lto"] = {"Tsotso", "Olutsotso"}, ["lts"] = {"Tachoni", "Lutachoni"}, ["ltu"] = {"Latu"}, ["lua"] = {"Luba-Lulua"}, ["luc"] = {"Aringa"}, ["lud"] = {"Ludian"}, ["lue"] = {"Luvale"}, ["luf"] = {"Laua"}, ["lui"] = {"Luiseno"}, ["luj"] = {"Luna"}, ["luk"] = {"Lunanakha"}, ["lul"] = {"Olu'bo"}, ["lum"] = {"Luimbi"}, ["lun"] = {"Lunda"}, ["luo"] = {"Luo (Kenya and Tanzania)", "Dholuo"}, ["lup"] = {"Lumbu"}, ["luq"] = {"Lucumi"}, ["lur"] = {"Laura"}, ["lus"] = {"Lushai"}, ["lut"] = {"Lushootseed"}, ["luu"] = {"Lumba-Yakkha"}, ["luv"] = {"Luwati"}, ["luw"] = {"Luo (Cameroon)"}, ["luy"] = {"Luyia", "Oluluyia"}, ["luz"] = {"Southern Luri"}, ["lva"] = {"Maku'a"}, ["lvi"] = {"Lavi"}, ["lvk"] = {"Lavukaleve"}, ["lvl"] = {"Lwel"}, ["lvs"] = {"Standard Latvian"}, ["lvu"] = {"Levuka"}, ["lwa"] = {"Lwalu"}, ["lwe"] = {"Lewo Eleng"}, ["lwg"] = {"Wanga", "Oluwanga"}, ["lwh"] = {"White Lachi"}, ["lwl"] = {"Eastern Lawa"}, ["lwm"] = {"Laomian"}, ["lwo"] = {"Luwo"}, ["lws"] = {"Malawian Sign Language"}, ["lwt"] = {"Lewotobi"}, ["lwu"] = {"Lawu"}, ["lww"] = {"Lewo"}, ["lxm"] = {"Lakurumau"}, ["lya"] = {"Layakha"}, ["lyg"] = {"Lyngngam"}, ["lyn"] = {"Luyana"}, ["lzh"] = {"Literary Chinese"}, ["lzl"] = {"Litzlitz"}, ["lzn"] = {"Leinong Naga"}, ["lzz"] = {"Laz"}, ["maa"] = {"San Jerónimo Tecóatl Mazatec"}, ["mab"] = {"Yutanduchi Mixtec"}, ["mad"] = {"Madurese"}, ["mae"] = {"Bo-Rukul"}, ["maf"] = {"Mafa"}, ["mag"] = {"Magahi"}, ["mai"] = {"Maithili"}, ["maj"] = {"Jalapa De Díaz Mazatec"}, ["mak"] = {"Makasar"}, ["mam"] = {"Mam"}, ["man"] = {"Mandingo", "Manding"}, ["map"] = {"Austronesian languages"}, ["maq"] = {"Chiquihuitlán Mazatec"}, ["mas"] = {"Masai"}, ["mat"] = {"San Francisco Matlatzinca"}, ["mau"] = {"Huautla Mazatec"}, ["mav"] = {"Sateré-Mawé"}, ["maw"] = {"Mampruli"}, ["max"] = {"North Moluccan Malay"}, ["maz"] = {"Central Mazahua"}, ["mba"] = {"Higaonon"}, ["mbb"] = {"Western Bukidnon Manobo"}, ["mbc"] = {"Macushi"}, ["mbd"] = {"Dibabawon Manobo"}, ["mbe"] = {"Molale"}, ["mbf"] = {"Baba Malay"}, ["mbh"] = {"Mangseng"}, ["mbi"] = {"Ilianen Manobo"}, ["mbj"] = {"Nadëb"}, ["mbk"] = {"Malol"}, ["mbl"] = {"Maxakalí"}, ["mbm"] = {"Ombamba"}, ["mbn"] = {"Macaguán"}, ["mbo"] = {"Mbo (Cameroon)"}, ["mbp"] = {"Malayo"}, ["mbq"] = {"Maisin"}, ["mbr"] = {"Nukak Makú"}, ["mbs"] = {"Sarangani Manobo"}, ["mbt"] = {"Matigsalug Manobo"}, ["mbu"] = {"Mbula-Bwazza"}, ["mbv"] = {"Mbulungish"}, ["mbw"] = {"Maring"}, ["mbx"] = {"Mari (East Sepik Province)"}, ["mby"] = {"Memoni"}, ["mbz"] = {"Amoltepec Mixtec"}, ["mca"] = {"Maca"}, ["mcb"] = {"Machiguenga"}, ["mcc"] = {"Bitur"}, ["mcd"] = {"Sharanahua"}, ["mce"] = {"Itundujia Mixtec"}, ["mcf"] = {"Matsés"}, ["mcg"] = {"Mapoyo"}, ["mch"] = {"Maquiritari"}, ["mci"] = {"Mese"}, ["mcj"] = {"Mvanip"}, ["mck"] = {"Mbunda"}, ["mcl"] = {"Macaguaje"}, ["mcm"] = {"Malaccan Creole Portuguese"}, ["mcn"] = {"Masana"}, ["mco"] = {"Coatlán Mixe"}, ["mcp"] = {"Makaa"}, ["mcq"] = {"Ese"}, ["mcr"] = {"Menya"}, ["mcs"] = {"Mambai"}, ["mct"] = {"Mengisa"}, ["mcu"] = {"Cameroon Mambila"}, ["mcv"] = {"Minanibai"}, ["mcw"] = {"Mawa (Chad)"}, ["mcx"] = {"Mpiemo"}, ["mcy"] = {"South Watut"}, ["mcz"] = {"Mawan"}, ["mda"] = {"Mada (Nigeria)"}, ["mdb"] = {"Morigi"}, ["mdc"] = {"Male (Papua New Guinea)"}, ["mdd"] = {"Mbum"}, ["mde"] = {"Maba (Chad)"}, ["mdf"] = {"Moksha"}, ["mdg"] = {"Massalat"}, ["mdh"] = {"Maguindanaon"}, ["mdi"] = {"Mamvu"}, ["mdj"] = {"Mangbetu"}, ["mdk"] = {"Mangbutu"}, ["mdl"] = {"Maltese Sign Language"}, ["mdm"] = {"Mayogo"}, ["mdn"] = {"Mbati"}, ["mdp"] = {"Mbala"}, ["mdq"] = {"Mbole"}, ["mdr"] = {"Mandar"}, ["mds"] = {"Maria (Papua New Guinea)"}, ["mdt"] = {"Mbere"}, ["mdu"] = {"Mboko"}, ["mdv"] = {"Santa Lucía Monteverde Mixtec"}, ["mdw"] = {"Mbosi"}, ["mdx"] = {"Dizin"}, ["mdy"] = {"Male (Ethiopia)"}, ["mdz"] = {"Suruí Do Pará"}, ["mea"] = {"Menka"}, ["meb"] = {"Ikobi"}, ["mec"] = {"Marra"}, ["med"] = {"Melpa"}, ["mee"] = {"Mengen"}, ["mef"] = {"Megam"}, ["meh"] = {"Southwestern Tlaxiaco Mixtec"}, ["mei"] = {"Midob"}, ["mej"] = {"Meyah"}, ["mek"] = {"Mekeo"}, ["mel"] = {"Central Melanau"}, ["mem"] = {"Mangala"}, ["men"] = {"Mende (Sierra Leone)"}, ["meo"] = {"Kedah Malay"}, ["mep"] = {"Miriwoong"}, ["meq"] = {"Merey"}, ["mer"] = {"Meru"}, ["mes"] = {"Masmaje"}, ["met"] = {"Mato"}, ["meu"] = {"Motu"}, ["mev"] = {"Mano"}, ["mew"] = {"Maaka"}, ["mey"] = {"Hassaniyya"}, ["mez"] = {"Menominee"}, ["mfa"] = {"Pattani Malay"}, ["mfb"] = {"Bangka"}, ["mfc"] = {"Mba"}, ["mfd"] = {"Mendankwe-Nkwen"}, ["mfe"] = {"Morisyen"}, ["mff"] = {"Naki"}, ["mfg"] = {"Mogofin"}, ["mfh"] = {"Matal"}, ["mfi"] = {"Wandala"}, ["mfj"] = {"Mefele"}, ["mfk"] = {"North Mofu"}, ["mfl"] = {"Putai"}, ["mfm"] = {"Marghi South"}, ["mfn"] = {"Cross River Mbembe"}, ["mfo"] = {"Mbe"}, ["mfp"] = {"Makassar Malay"}, ["mfq"] = {"Moba"}, ["mfr"] = {"Marrithiyel"}, ["mfs"] = {"Mexican Sign Language"}, ["mft"] = {"Mokerang"}, ["mfu"] = {"Mbwela"}, ["mfv"] = {"Mandjak"}, ["mfw"] = {"Mulaha"}, ["mfx"] = {"Melo"}, ["mfy"] = {"Mayo"}, ["mfz"] = {"Mabaan"}, ["mga"] = {"Middle Irish (900-1200)"}, ["mgb"] = {"Mararit"}, ["mgc"] = {"Morokodo"}, ["mgd"] = {"Moru"}, ["mge"] = {"Mango"}, ["mgf"] = {"Maklew"}, ["mgg"] = {"Mpumpong"}, ["mgh"] = {"Makhuwa-Meetto"}, ["mgi"] = {"Lijili"}, ["mgj"] = {"Abureni"}, ["mgk"] = {"Mawes"}, ["mgl"] = {"Maleu-Kilenge"}, ["mgm"] = {"Mambae"}, ["mgn"] = {"Mbangi"}, ["mgo"] = {"Meta'"}, ["mgp"] = {"Eastern Magar"}, ["mgq"] = {"Malila"}, ["mgr"] = {"Mambwe-Lungu"}, ["mgs"] = {"Manda (Tanzania)"}, ["mgt"] = {"Mongol"}, ["mgu"] = {"Mailu"}, ["mgv"] = {"Matengo"}, ["mgw"] = {"Matumbi"}, ["mgy"] = {"Mbunga"}, ["mgz"] = {"Mbugwe"}, ["mha"] = {"Manda (India)"}, ["mhb"] = {"Mahongwe"}, ["mhc"] = {"Mocho"}, ["mhd"] = {"Mbugu"}, ["mhe"] = {"Besisi", "Mah Meri"}, ["mhf"] = {"Mamaa"}, ["mhg"] = {"Margu"}, ["mhi"] = {"Ma'di"}, ["mhj"] = {"Mogholi"}, ["mhk"] = {"Mungaka"}, ["mhl"] = {"Mauwake"}, ["mhm"] = {"Makhuwa-Moniga"}, ["mhn"] = {"Mócheno"}, ["mho"] = {"Mashi (Zambia)"}, ["mhp"] = {"Balinese Malay"}, ["mhq"] = {"Mandan"}, ["mhr"] = {"Eastern Mari"}, ["mhs"] = {"Buru (Indonesia)"}, ["mht"] = {"Mandahuaca"}, ["mhu"] = {"Digaro-Mishmi", "Darang Deng"}, ["mhw"] = {"Mbukushu"}, ["mhx"] = {"Maru", "Lhaovo"}, ["mhy"] = {"Ma'anyan"}, ["mhz"] = {"Mor (Mor Islands)"}, ["mia"] = {"Miami"}, ["mib"] = {"Atatláhuca Mixtec"}, ["mic"] = {"Mi'kmaq", "Micmac"}, ["mid"] = {"Mandaic"}, ["mie"] = {"Ocotepec Mixtec"}, ["mif"] = {"Mofu-Gudur"}, ["mig"] = {"San Miguel El Grande Mixtec"}, ["mih"] = {"Chayuco Mixtec"}, ["mii"] = {"Chigmecatitlán Mixtec"}, ["mij"] = {"Abar", "Mungbam"}, ["mik"] = {"Mikasuki"}, ["mil"] = {"Peñoles Mixtec"}, ["mim"] = {"Alacatlatzala Mixtec"}, ["min"] = {"Minangkabau"}, ["mio"] = {"Pinotepa Nacional Mixtec"}, ["mip"] = {"Apasco-Apoala Mixtec"}, ["miq"] = {"Mískito"}, ["mir"] = {"Isthmus Mixe"}, ["mis"] = {"Uncoded languages"}, ["mit"] = {"Southern Puebla Mixtec"}, ["miu"] = {"Cacaloxtepec Mixtec"}, ["miw"] = {"Akoye"}, ["mix"] = {"Mixtepec Mixtec"}, ["miy"] = {"Ayutla Mixtec"}, ["miz"] = {"Coatzospan Mixtec"}, ["mjb"] = {"Makalero"}, ["mjc"] = {"San Juan Colorado Mixtec"}, ["mjd"] = {"Northwest Maidu"}, ["mje"] = {"Muskum"}, ["mjg"] = {"Tu"}, ["mjh"] = {"Mwera (Nyasa)"}, ["mji"] = {"Kim Mun"}, ["mjj"] = {"Mawak"}, ["mjk"] = {"Matukar"}, ["mjl"] = {"Mandeali"}, ["mjm"] = {"Medebur"}, ["mjn"] = {"Ma (Papua New Guinea)"}, ["mjo"] = {"Malankuravan"}, ["mjp"] = {"Malapandaram"}, ["mjq"] = {"Malaryan"}, ["mjr"] = {"Malavedan"}, ["mjs"] = {"Miship"}, ["mjt"] = {"Sauria Paharia"}, ["mju"] = {"Manna-Dora"}, ["mjv"] = {"Mannan"}, ["mjw"] = {"Karbi"}, ["mjx"] = {"Mahali"}, ["mjy"] = {"Mahican"}, ["mjz"] = {"Majhi"}, ["mka"] = {"Mbre"}, ["mkb"] = {"Mal Paharia"}, ["mkc"] = {"Siliput"}, ["mke"] = {"Mawchi"}, ["mkf"] = {"Miya"}, ["mkg"] = {"Mak (China)"}, ["mkh"] = {"Mon-Khmer languages"}, ["mki"] = {"Dhatki"}, ["mkj"] = {"Mokilese"}, ["mkk"] = {"Byep"}, ["mkl"] = {"Mokole"}, ["mkm"] = {"Moklen"}, ["mkn"] = {"Kupang Malay"}, ["mko"] = {"Mingang Doso"}, ["mkp"] = {"Moikodi"}, ["mkq"] = {"Bay Miwok"}, ["mkr"] = {"Malas"}, ["mks"] = {"Silacayoapan Mixtec"}, ["mkt"] = {"Vamale"}, ["mku"] = {"Konyanka Maninka"}, ["mkv"] = {"Mafea"}, ["mkw"] = {"Kituba (Congo)"}, ["mkx"] = {"Kinamiging Manobo"}, ["mky"] = {"East Makian"}, ["mkz"] = {"Makasae"}, ["mla"] = {"Malo"}, ["mlb"] = {"Mbule"}, ["mlc"] = {"Cao Lan"}, ["mle"] = {"Manambu"}, ["mlf"] = {"Mal"}, ["mlh"] = {"Mape"}, ["mli"] = {"Malimpung"}, ["mlj"] = {"Miltu"}, ["mlk"] = {"Ilwana", "Kiwilwana"}, ["mll"] = {"Malua Bay"}, ["mlm"] = {"Mulam"}, ["mln"] = {"Malango"}, ["mlo"] = {"Mlomp"}, ["mlp"] = {"Bargam"}, ["mlq"] = {"Western Maninkakan"}, ["mlr"] = {"Vame"}, ["mls"] = {"Masalit"}, ["mlu"] = {"To'abaita"}, ["mlv"] = {"Motlav", "Mwotlap"}, ["mlw"] = {"Moloko"}, ["mlx"] = {"Malfaxal", "Naha'ai"}, ["mlz"] = {"Malaynon"}, ["mma"] = {"Mama"}, ["mmb"] = {"Momina"}, ["mmc"] = {"Michoacán Mazahua"}, ["mmd"] = {"Maonan"}, ["mme"] = {"Mae"}, ["mmf"] = {"Mundat"}, ["mmg"] = {"North Ambrym"}, ["mmh"] = {"Mehináku"}, ["mmi"] = {"Musar"}, ["mmj"] = {"Majhwar"}, ["mmk"] = {"Mukha-Dora"}, ["mml"] = {"Man Met"}, ["mmm"] = {"Maii"}, ["mmn"] = {"Mamanwa"}, ["mmo"] = {"Mangga Buang"}, ["mmp"] = {"Siawi"}, ["mmq"] = {"Musak"}, ["mmr"] = {"Western Xiangxi Miao"}, ["mmt"] = {"Malalamai"}, ["mmu"] = {"Mmaala"}, ["mmv"] = {"Miriti"}, ["mmw"] = {"Emae"}, ["mmx"] = {"Madak"}, ["mmy"] = {"Migaama"}, ["mmz"] = {"Mabaale"}, ["mna"] = {"Mbula"}, ["mnb"] = {"Muna"}, ["mnc"] = {"Manchu"}, ["mnd"] = {"Mondé"}, ["mne"] = {"Naba"}, ["mnf"] = {"Mundani"}, ["mng"] = {"Eastern Mnong"}, ["mnh"] = {"Mono (Democratic Republic of Congo)"}, ["mni"] = {"Manipuri"}, ["mnj"] = {"Munji"}, ["mnk"] = {"Mandinka"}, ["mnl"] = {"Tiale"}, ["mnm"] = {"Mapena"}, ["mnn"] = {"Southern Mnong"}, ["mno"] = {"Manobo languages"}, ["mnp"] = {"Min Bei Chinese"}, ["mnq"] = {"Minriq"}, ["mnr"] = {"Mono (USA)"}, ["mns"] = {"Mansi"}, ["mnu"] = {"Mer"}, ["mnv"] = {"Rennell-Bellona"}, ["mnw"] = {"Mon"}, ["mnx"] = {"Manikion"}, ["mny"] = {"Manyawa"}, ["mnz"] = {"Moni"}, ["moa"] = {"Mwan"}, ["moc"] = {"Mocoví"}, ["mod"] = {"Mobilian"}, ["moe"] = {"Innu", "Montagnais"}, ["mog"] = {"Mongondow"}, ["moh"] = {"Mohawk"}, ["moi"] = {"Mboi"}, ["moj"] = {"Monzombo"}, ["mok"] = {"Morori"}, ["mom"] = {"Mangue"}, ["moo"] = {"Monom"}, ["mop"] = {"Mopán Maya"}, ["moq"] = {"Mor (Bomberai Peninsula)"}, ["mor"] = {"Moro"}, ["mos"] = {"Mossi"}, ["mot"] = {"Barí"}, ["mou"] = {"Mogum"}, ["mov"] = {"Mohave"}, ["mow"] = {"Moi (Congo)"}, ["mox"] = {"Molima"}, ["moy"] = {"Shekkacho"}, ["moz"] = {"Mukulu", "Gergiko"}, ["mpa"] = {"Mpoto"}, ["mpb"] = {"Malak Malak", "Mullukmulluk"}, ["mpc"] = {"Mangarrayi"}, ["mpd"] = {"Machinere"}, ["mpe"] = {"Majang"}, ["mpg"] = {"Marba"}, ["mph"] = {"Maung"}, ["mpi"] = {"Mpade"}, ["mpj"] = {"Martu Wangka", "Wangkajunga"}, ["mpk"] = {"Mbara (Chad)"}, ["mpl"] = {"Middle Watut"}, ["mpm"] = {"Yosondúa Mixtec"}, ["mpn"] = {"Mindiri"}, ["mpo"] = {"Miu"}, ["mpp"] = {"Migabac"}, ["mpq"] = {"Matís"}, ["mpr"] = {"Vangunu"}, ["mps"] = {"Dadibi"}, ["mpt"] = {"Mian"}, ["mpu"] = {"Makuráp"}, ["mpv"] = {"Mungkip"}, ["mpw"] = {"Mapidian"}, ["mpx"] = {"Misima-Panaeati"}, ["mpy"] = {"Mapia"}, ["mpz"] = {"Mpi"}, ["mqa"] = {"Maba (Indonesia)"}, ["mqb"] = {"Mbuko"}, ["mqc"] = {"Mangole"}, ["mqe"] = {"Matepi"}, ["mqf"] = {"Momuna"}, ["mqg"] = {"Kota Bangun Kutai Malay"}, ["mqh"] = {"Tlazoyaltepec Mixtec"}, ["mqi"] = {"Mariri"}, ["mqj"] = {"Mamasa"}, ["mqk"] = {"Rajah Kabunsuwan Manobo"}, ["mql"] = {"Mbelime"}, ["mqm"] = {"South Marquesan"}, ["mqn"] = {"Moronene"}, ["mqo"] = {"Modole"}, ["mqp"] = {"Manipa"}, ["mqq"] = {"Minokok"}, ["mqr"] = {"Mander"}, ["mqs"] = {"West Makian"}, ["mqt"] = {"Mok"}, ["mqu"] = {"Mandari"}, ["mqv"] = {"Mosimo"}, ["mqw"] = {"Murupi"}, ["mqx"] = {"Mamuju"}, ["mqy"] = {"Manggarai"}, ["mqz"] = {"Pano"}, ["mra"] = {"Mlabri"}, ["mrb"] = {"Marino"}, ["mrc"] = {"Maricopa"}, ["mrd"] = {"Western Magar"}, ["mre"] = {"Martha's Vineyard Sign Language"}, ["mrf"] = {"Elseng"}, ["mrg"] = {"Mising"}, ["mrh"] = {"Mara Chin"}, ["mrj"] = {"Western Mari"}, ["mrk"] = {"Hmwaveke"}, ["mrl"] = {"Mortlockese"}, ["mrm"] = {"Merlav", "Mwerlap"}, ["mrn"] = {"Cheke Holo"}, ["mro"] = {"Mru"}, ["mrp"] = {"Morouas"}, ["mrq"] = {"North Marquesan"}, ["mrr"] = {"Maria (India)"}, ["mrs"] = {"Maragus"}, ["mrt"] = {"Marghi Central"}, ["mru"] = {"Mono (Cameroon)"}, ["mrv"] = {"Mangareva"}, ["mrw"] = {"Maranao"}, ["mrx"] = {"Maremgi", "Dineor"}, ["mry"] = {"Mandaya"}, ["mrz"] = {"Marind"}, ["msb"] = {"Masbatenyo"}, ["msc"] = {"Sankaran Maninka"}, ["msd"] = {"Yucatec Maya Sign Language"}, ["mse"] = {"Musey"}, ["msf"] = {"Mekwei"}, ["msg"] = {"Moraid"}, ["msh"] = {"Masikoro Malagasy"}, ["msi"] = {"Sabah Malay"}, ["msj"] = {"Ma (Democratic Republic of Congo)"}, ["msk"] = {"Mansaka"}, ["msl"] = {"Molof", "Poule"}, ["msm"] = {"Agusan Manobo"}, ["msn"] = {"Vurës"}, ["mso"] = {"Mombum"}, ["msp"] = {"Maritsauá"}, ["msq"] = {"Caac"}, ["msr"] = {"Mongolian Sign Language"}, ["mss"] = {"West Masela"}, ["msu"] = {"Musom"}, ["msv"] = {"Maslam"}, ["msw"] = {"Mansoanka"}, ["msx"] = {"Moresada"}, ["msy"] = {"Aruamu"}, ["msz"] = {"Momare"}, ["mta"] = {"Cotabato Manobo"}, ["mtb"] = {"Anyin Morofo"}, ["mtc"] = {"Munit"}, ["mtd"] = {"Mualang"}, ["mte"] = {"Mono (Solomon Islands)"}, ["mtf"] = {"Murik (Papua New Guinea)"}, ["mtg"] = {"Una"}, ["mth"] = {"Munggui"}, ["mti"] = {"Maiwa (Papua New Guinea)"}, ["mtj"] = {"Moskona"}, ["mtk"] = {"Mbe'"}, ["mtl"] = {"Montol"}, ["mtm"] = {"Mator"}, ["mtn"] = {"Matagalpa"}, ["mto"] = {"Totontepec Mixe"}, ["mtp"] = {"Wichí Lhamtés Nocten"}, ["mtq"] = {"Muong"}, ["mtr"] = {"Mewari"}, ["mts"] = {"Yora"}, ["mtt"] = {"Mota"}, ["mtu"] = {"Tututepec Mixtec"}, ["mtv"] = {"Asaro'o"}, ["mtw"] = {"Southern Binukidnon"}, ["mtx"] = {"Tidaá Mixtec"}, ["mty"] = {"Nabi"}, ["mua"] = {"Mundang"}, ["mub"] = {"Mubi"}, ["muc"] = {"Ajumbu"}, ["mud"] = {"Mednyj Aleut"}, ["mue"] = {"Media Lengua"}, ["mug"] = {"Musgu"}, ["muh"] = {"Mündü"}, ["mui"] = {"Musi"}, ["muj"] = {"Mabire"}, ["muk"] = {"Mugom"}, ["mul"] = {"Multiple languages"}, ["mum"] = {"Maiwala"}, ["mun"] = {"Munda languages"}, ["muo"] = {"Nyong"}, ["mup"] = {"Malvi"}, ["muq"] = {"Eastern Xiangxi Miao"}, ["mur"] = {"Murle"}, ["mus"] = {"Creek"}, ["mut"] = {"Western Muria"}, ["muu"] = {"Yaaku"}, ["muv"] = {"Muthuvan"}, ["mux"] = {"Bo-Ung"}, ["muy"] = {"Muyang"}, ["muz"] = {"Mursi"}, ["mva"] = {"Manam"}, ["mvb"] = {"Mattole"}, ["mvd"] = {"Mamboru"}, ["mve"] = {"Marwari (Pakistan)"}, ["mvf"] = {"Peripheral Mongolian"}, ["mvg"] = {"Yucuañe Mixtec"}, ["mvh"] = {"Mulgi"}, ["mvi"] = {"Miyako"}, ["mvk"] = {"Mekmek"}, ["mvl"] = {"Mbara (Australia)"}, ["mvn"] = {"Minaveha"}, ["mvo"] = {"Marovo"}, ["mvp"] = {"Duri"}, ["mvq"] = {"Moere"}, ["mvr"] = {"Marau"}, ["mvs"] = {"Massep"}, ["mvt"] = {"Mpotovoro"}, ["mvu"] = {"Marfa"}, ["mvv"] = {"Tagal Murut"}, ["mvw"] = {"Machinga"}, ["mvx"] = {"Meoswar"}, ["mvy"] = {"Indus Kohistani"}, ["mvz"] = {"Mesqan"}, ["mwa"] = {"Mwatebu"}, ["mwb"] = {"Juwal"}, ["mwc"] = {"Are"}, ["mwe"] = {"Mwera (Chimwera)"}, ["mwf"] = {"Murrinh-Patha"}, ["mwg"] = {"Aiklep"}, ["mwh"] = {"Mouk-Aria"}, ["mwi"] = {"Labo", "Ninde"}, ["mwk"] = {"Kita Maninkakan"}, ["mwl"] = {"Mirandese"}, ["mwm"] = {"Sar"}, ["mwn"] = {"Nyamwanga"}, ["mwo"] = {"Central Maewo"}, ["mwp"] = {"Kala Lagaw Ya"}, ["mwq"] = {"Mün Chin"}, ["mwr"] = {"Marwari"}, ["mws"] = {"Mwimbi-Muthambi"}, ["mwt"] = {"Moken"}, ["mwu"] = {"Mittu"}, ["mwv"] = {"Mentawai"}, ["mww"] = {"Hmong Daw"}, ["mwz"] = {"Moingi"}, ["mxa"] = {"Northwest Oaxaca Mixtec"}, ["mxb"] = {"Tezoatlán Mixtec"}, ["mxc"] = {"Manyika"}, ["mxd"] = {"Modang"}, ["mxe"] = {"Mele-Fila"}, ["mxf"] = {"Malgbe"}, ["mxg"] = {"Mbangala"}, ["mxh"] = {"Mvuba"}, ["mxi"] = {"Mozarabic"}, ["mxj"] = {"Miju-Mishmi", "Geman Deng"}, ["mxk"] = {"Monumbo"}, ["mxl"] = {"Maxi Gbe"}, ["mxm"] = {"Meramera"}, ["mxn"] = {"Moi (Indonesia)"}, ["mxo"] = {"Mbowe"}, ["mxp"] = {"Tlahuitoltepec Mixe"}, ["mxq"] = {"Juquila Mixe"}, ["mxr"] = {"Murik (Malaysia)"}, ["mxs"] = {"Huitepec Mixtec"}, ["mxt"] = {"Jamiltepec Mixtec"}, ["mxu"] = {"Mada (Cameroon)"}, ["mxv"] = {"Metlatónoc Mixtec"}, ["mxw"] = {"Namo"}, ["mxx"] = {"Mahou", "Mawukakan"}, ["mxy"] = {"Southeastern Nochixtlán Mixtec"}, ["mxz"] = {"Central Masela"}, ["myb"] = {"Mbay"}, ["myc"] = {"Mayeka"}, ["mye"] = {"Myene"}, ["myf"] = {"Bambassi"}, ["myg"] = {"Manta"}, ["myh"] = {"Makah"}, ["myj"] = {"Mangayat"}, ["myk"] = {"Mamara Senoufo"}, ["myl"] = {"Moma"}, ["mym"] = {"Me'en"}, ["myn"] = {"Mayan languages"}, ["myo"] = {"Anfillo"}, ["myp"] = {"Pirahã"}, ["myr"] = {"Muniche"}, ["mys"] = {"Mesmes"}, ["myu"] = {"Mundurukú"}, ["myv"] = {"Erzya"}, ["myw"] = {"Muyuw"}, ["myx"] = {"Masaaba"}, ["myy"] = {"Macuna"}, ["myz"] = {"Classical Mandaic"}, ["mza"] = {"Santa María Zacatepec Mixtec"}, ["mzb"] = {"Tumzabt"}, ["mzc"] = {"Madagascar Sign Language"}, ["mzd"] = {"Malimba"}, ["mze"] = {"Morawa"}, ["mzg"] = {"Monastic Sign Language"}, ["mzh"] = {"Wichí Lhamtés Güisnay"}, ["mzi"] = {"Ixcatlán Mazatec"}, ["mzj"] = {"Manya"}, ["mzk"] = {"Nigeria Mambila"}, ["mzl"] = {"Mazatlán Mixe"}, ["mzm"] = {"Mumuye"}, ["mzn"] = {"Mazanderani"}, ["mzo"] = {"Matipuhy"}, ["mzp"] = {"Movima"}, ["mzq"] = {"Mori Atas"}, ["mzr"] = {"Marúbo"}, ["mzs"] = {"Macanese"}, ["mzt"] = {"Mintil"}, ["mzu"] = {"Inapang"}, ["mzv"] = {"Manza"}, ["mzw"] = {"Deg"}, ["mzx"] = {"Mawayana"}, ["mzy"] = {"Mozambican Sign Language"}, ["mzz"] = {"Maiadomu"}, ["naa"] = {"Namla"}, ["nab"] = {"Southern Nambikuára"}, ["nac"] = {"Narak"}, ["nae"] = {"Naka'ela"}, ["naf"] = {"Nabak"}, ["nag"] = {"Naga Pidgin"}, ["nah"] = {"Nahuatl languages"}, ["nai"] = {"North American Indian languages"}, ["naj"] = {"Nalu"}, ["nak"] = {"Nakanai"}, ["nal"] = {"Nalik"}, ["nam"] = {"Ngan'gityemerri"}, ["nan"] = {"Min Nan Chinese"}, ["nao"] = {"Naaba"}, ["nap"] = {"Neapolitan"}, ["naq"] = {"Khoekhoe", "Nama (Namibia)"}, ["nar"] = {"Iguta"}, ["nas"] = {"Naasioi"}, ["nat"] = {"Ca̱hungwa̱rya̱", "Hungworo"}, ["naw"] = {"Nawuri"}, ["nax"] = {"Nakwi"}, ["nay"] = {"Ngarrindjeri"}, ["naz"] = {"Coatepec Nahuatl"}, ["nba"] = {"Nyemba"}, ["nbb"] = {"Ndoe"}, ["nbc"] = {"Chang Naga"}, ["nbd"] = {"Ngbinda"}, ["nbe"] = {"Konyak Naga"}, ["nbg"] = {"Nagarchal"}, ["nbh"] = {"Ngamo"}, ["nbi"] = {"Mao Naga"}, ["nbj"] = {"Ngarinyman"}, ["nbk"] = {"Nake"}, ["nbm"] = {"Ngbaka Ma'bo"}, ["nbn"] = {"Kuri"}, ["nbo"] = {"Nkukoli"}, ["nbp"] = {"Nnam"}, ["nbq"] = {"Nggem"}, ["nbr"] = {"Numana"}, ["nbs"] = {"Namibian Sign Language"}, ["nbt"] = {"Na"}, ["nbu"] = {"Rongmei Naga"}, ["nbv"] = {"Ngamambo"}, ["nbw"] = {"Southern Ngbandi"}, ["nby"] = {"Ningera"}, ["nca"] = {"Iyo"}, ["ncb"] = {"Central Nicobarese"}, ["ncc"] = {"Ponam"}, ["ncd"] = {"Nachering"}, ["nce"] = {"Yale"}, ["ncf"] = {"Notsi"}, ["ncg"] = {"Nisga'a"}, ["nch"] = {"Central Huasteca Nahuatl"}, ["nci"] = {"Classical Nahuatl"}, ["ncj"] = {"Northern Puebla Nahuatl"}, ["nck"] = {"Na-kara"}, ["ncl"] = {"Michoacán Nahuatl"}, ["ncm"] = {"Nambo"}, ["ncn"] = {"Nauna"}, ["nco"] = {"Sibe"}, ["ncq"] = {"Northern Katang"}, ["ncr"] = {"Ncane"}, ["ncs"] = {"Nicaraguan Sign Language"}, ["nct"] = {"Chothe Naga"}, ["ncu"] = {"Chumburung"}, ["ncx"] = {"Central Puebla Nahuatl"}, ["ncz"] = {"Natchez"}, ["nda"] = {"Ndasa"}, ["ndb"] = {"Kenswei Nsei"}, ["ndc"] = {"Ndau"}, ["ndd"] = {"Nde-Nsele-Nta"}, ["ndf"] = {"Nadruvian"}, ["ndg"] = {"Ndengereko"}, ["ndh"] = {"Ndali"}, ["ndi"] = {"Samba Leko"}, ["ndj"] = {"Ndamba"}, ["ndk"] = {"Ndaka"}, ["ndl"] = {"Ndolo"}, ["ndm"] = {"Ndam"}, ["ndn"] = {"Ngundi"}, ["ndp"] = {"Ndo"}, ["ndq"] = {"Ndombe"}, ["ndr"] = {"Ndoola"}, ["nds"] = {"Low German", "Low Saxon"}, ["ndt"] = {"Ndunga"}, ["ndu"] = {"Dugun"}, ["ndv"] = {"Ndut"}, ["ndw"] = {"Ndobo"}, ["ndx"] = {"Nduga"}, ["ndy"] = {"Lutos"}, ["ndz"] = {"Ndogo"}, ["nea"] = {"Eastern Ngad'a"}, ["neb"] = {"Toura (Côte d'Ivoire)"}, ["nec"] = {"Nedebang"}, ["ned"] = {"Nde-Gbite"}, ["nee"] = {"Nêlêmwa-Nixumwak"}, ["nef"] = {"Nefamese"}, ["neg"] = {"Negidal"}, ["neh"] = {"Nyenkha"}, ["nei"] = {"Neo-Hittite"}, ["nej"] = {"Neko"}, ["nek"] = {"Neku"}, ["nem"] = {"Nemi"}, ["nen"] = {"Nengone"}, ["neo"] = {"Ná-Meo"}, ["neq"] = {"North Central Mixe"}, ["ner"] = {"Yahadian"}, ["nes"] = {"Bhoti Kinnauri"}, ["net"] = {"Nete"}, ["neu"] = {"Neo"}, ["nev"] = {"Nyaheun"}, ["new"] = {"Newari", "Nepal Bhasa"}, ["nex"] = {"Neme"}, ["ney"] = {"Neyo"}, ["nez"] = {"Nez Perce"}, ["nfa"] = {"Dhao"}, ["nfd"] = {"Ahwai"}, ["nfl"] = {"Ayiwo", "Äiwoo"}, ["nfr"] = {"Nafaanra"}, ["nfu"] = {"Mfumte"}, ["nga"] = {"Ngbaka"}, ["ngb"] = {"Northern Ngbandi"}, ["ngc"] = {"Ngombe (Democratic Republic of Congo)"}, ["ngd"] = {"Ngando (Central African Republic)"}, ["nge"] = {"Ngemba"}, ["ngf"] = {"Trans-New Guinea languages"}, ["ngg"] = {"Ngbaka Manza"}, ["ngh"] = {"Nǁng"}, ["ngi"] = {"Ngizim"}, ["ngj"] = {"Ngie"}, ["ngk"] = {"Dalabon"}, ["ngl"] = {"Lomwe"}, ["ngm"] = {"Ngatik Men's Creole"}, ["ngn"] = {"Ngwo"}, ["ngp"] = {"Ngulu"}, ["ngq"] = {"Ngurimi", "Ngoreme"}, ["ngr"] = {"Engdewu"}, ["ngs"] = {"Gvoko"}, ["ngt"] = {"Kriang", "Ngeq"}, ["ngu"] = {"Guerrero Nahuatl"}, ["ngv"] = {"Nagumi"}, ["ngw"] = {"Ngwaba"}, ["ngx"] = {"Nggwahyi"}, ["ngy"] = {"Tibea"}, ["ngz"] = {"Ngungwel"}, ["nha"] = {"Nhanda"}, ["nhb"] = {"Beng"}, ["nhc"] = {"Tabasco Nahuatl"}, ["nhd"] = {"Chiripá", "Ava Guaraní"}, ["nhe"] = {"Eastern Huasteca Nahuatl"}, ["nhf"] = {"Nhuwala"}, ["nhg"] = {"Tetelcingo Nahuatl"}, ["nhh"] = {"Nahari"}, ["nhi"] = {"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"}, ["nhk"] = {"Isthmus-Cosoleacaque Nahuatl"}, ["nhm"] = {"Morelos Nahuatl"}, ["nhn"] = {"Central Nahuatl"}, ["nho"] = {"Takuu"}, ["nhp"] = {"Isthmus-Pajapan Nahuatl"}, ["nhq"] = {"Huaxcaleca Nahuatl"}, ["nhr"] = {"Naro"}, ["nht"] = {"Ometepec Nahuatl"}, ["nhu"] = {"Noone"}, ["nhv"] = {"Temascaltepec Nahuatl"}, ["nhw"] = {"Western Huasteca Nahuatl"}, ["nhx"] = {"Isthmus-Mecayapan Nahuatl"}, ["nhy"] = {"Northern Oaxaca Nahuatl"}, ["nhz"] = {"Santa María La Alta Nahuatl"}, ["nia"] = {"Nias"}, ["nib"] = {"Nakame"}, ["nic"] = {"Niger-Kordofanian languages"}, ["nid"] = {"Ngandi"}, ["nie"] = {"Niellim"}, ["nif"] = {"Nek"}, ["nig"] = {"Ngalakgan"}, ["nih"] = {"Nyiha (Tanzania)"}, ["nii"] = {"Nii"}, ["nij"] = {"Ngaju"}, ["nik"] = {"Southern Nicobarese"}, ["nil"] = {"Nila"}, ["nim"] = {"Nilamba"}, ["nin"] = {"Ninzo"}, ["nio"] = {"Nganasan"}, ["niq"] = {"Nandi"}, ["nir"] = {"Nimboran"}, ["nis"] = {"Nimi"}, ["nit"] = {"Southeastern Kolami"}, ["niu"] = {"Niuean"}, ["niv"] = {"Gilyak"}, ["niw"] = {"Nimo"}, ["nix"] = {"Hema"}, ["niy"] = {"Ngiti"}, ["niz"] = {"Ningil"}, ["nja"] = {"Nzanyi"}, ["njb"] = {"Nocte Naga"}, ["njd"] = {"Ndonde Hamba"}, ["njh"] = {"Lotha Naga"}, ["nji"] = {"Gudanji"}, ["njj"] = {"Njen"}, ["njl"] = {"Njalgulgule"}, ["njm"] = {"Angami Naga"}, ["njn"] = {"Liangmai Naga"}, ["njo"] = {"Ao Naga"}, ["njr"] = {"Njerep"}, ["njs"] = {"Nisa"}, ["njt"] = {"Ndyuka-Trio Pidgin"}, ["nju"] = {"Ngadjunmaya"}, ["njx"] = {"Kunyi"}, ["njy"] = {"Njyem"}, ["njz"] = {"Nyishi"}, ["nka"] = {"Nkoya"}, ["nkb"] = {"Khoibu Naga"}, ["nkc"] = {"Nkongho"}, ["nkd"] = {"Koireng"}, ["nke"] = {"Duke"}, ["nkf"] = {"Inpui Naga"}, ["nkg"] = {"Nekgini"}, ["nkh"] = {"Khezha Naga"}, ["nki"] = {"Thangal Naga"}, ["nkj"] = {"Nakai"}, ["nkk"] = {"Nokuku"}, ["nkm"] = {"Namat"}, ["nkn"] = {"Nkangala"}, ["nko"] = {"Nkonya"}, ["nkp"] = {"Niuatoputapu"}, ["nkq"] = {"Nkami"}, ["nkr"] = {"Nukuoro"}, ["nks"] = {"North Asmat"}, ["nkt"] = {"Nyika (Tanzania)"}, ["nku"] = {"Bouna Kulango"}, ["nkv"] = {"Nyika (Malawi and Zambia)"}, ["nkw"] = {"Nkutu"}, ["nkx"] = {"Nkoroo"}, ["nkz"] = {"Nkari"}, ["nla"] = {"Ngombale"}, ["nlc"] = {"Nalca"}, ["nle"] = {"East Nyala"}, ["nlg"] = {"Gela"}, ["nli"] = {"Grangali"}, ["nlj"] = {"Nyali"}, ["nlk"] = {"Ninia Yali"}, ["nll"] = {"Nihali"}, ["nlm"] = {"Mankiyali"}, ["nlo"] = {"Ngul"}, ["nlq"] = {"Lao Naga"}, ["nlu"] = {"Nchumbulu"}, ["nlv"] = {"Orizaba Nahuatl"}, ["nlw"] = {"Walangama"}, ["nlx"] = {"Nahali"}, ["nly"] = {"Nyamal"}, ["nlz"] = {"Nalögo"}, ["nma"] = {"Maram Naga"}, ["nmb"] = {"Big Nambas", "V'ënen Taut"}, ["nmc"] = {"Ngam"}, ["nmd"] = {"Ndumu"}, ["nme"] = {"Mzieme Naga"}, ["nmf"] = {"Tangkhul Naga (India)"}, ["nmg"] = {"Kwasio"}, ["nmh"] = {"Monsang Naga"}, ["nmi"] = {"Nyam"}, ["nmj"] = {"Ngombe (Central African Republic)"}, ["nmk"] = {"Namakura"}, ["nml"] = {"Ndemli"}, ["nmm"] = {"Manangba"}, ["nmn"] = {"ǃXóõ"}, ["nmo"] = {"Moyon Naga"}, ["nmp"] = {"Nimanbur"}, ["nmq"] = {"Nambya"}, ["nmr"] = {"Nimbari"}, ["nms"] = {"Letemboi"}, ["nmt"] = {"Namonuito"}, ["nmu"] = {"Northeast Maidu"}, ["nmv"] = {"Ngamini"}, ["nmw"] = {"Nimoa", "Rifao"}, ["nmx"] = {"Nama (Papua New Guinea)"}, ["nmy"] = {"Namuyi"}, ["nmz"] = {"Nawdm"}, ["nna"] = {"Nyangumarta"}, ["nnb"] = {"Nande"}, ["nnc"] = {"Nancere"}, ["nnd"] = {"West Ambae"}, ["nne"] = {"Ngandyera"}, ["nnf"] = {"Ngaing"}, ["nng"] = {"Maring Naga"}, ["nnh"] = {"Ngiemboon"}, ["nni"] = {"North Nuaulu"}, ["nnj"] = {"Nyangatom"}, ["nnk"] = {"Nankina"}, ["nnl"] = {"Northern Rengma Naga"}, ["nnm"] = {"Namia"}, ["nnn"] = {"Ngete"}, ["nnp"] = {"Wancho Naga"}, ["nnq"] = {"Ngindo"}, ["nnr"] = {"Narungga"}, ["nnt"] = {"Nanticoke"}, ["nnu"] = {"Dwang"}, ["nnv"] = {"Nugunu (Australia)"}, ["nnw"] = {"Southern Nuni"}, ["nny"] = {"Nyangga"}, ["nnz"] = {"Nda'nda'"}, ["noa"] = {"Woun Meu"}, ["noc"] = {"Nuk"}, ["nod"] = {"Northern Thai"}, ["noe"] = {"Nimadi"}, ["nof"] = {"Nomane"}, ["nog"] = {"Nogai"}, ["noh"] = {"Nomu"}, ["noi"] = {"Noiri"}, ["noj"] = {"Nonuya"}, ["nok"] = {"Nooksack"}, ["nol"] = {"Nomlaki"}, ["non"] = {"Old Norse"}, ["nop"] = {"Numanggang"}, ["noq"] = {"Ngongo"}, ["nos"] = {"Eastern Nisu"}, ["not"] = {"Nomatsiguenga"}, ["nou"] = {"Ewage-Notu"}, ["nov"] = {"Novial"}, ["now"] = {"Nyambo"}, ["noy"] = {"Noy"}, ["noz"] = {"Nayi"}, ["npa"] = {"Nar Phu"}, ["npb"] = {"Nupbikha"}, ["npg"] = {"Ponyo-Gongwang Naga"}, ["nph"] = {"Phom Naga"}, ["npi"] = {"Nepali (individual language)"}, ["npl"] = {"Southeastern Puebla Nahuatl"}, ["npn"] = {"Mondropolon"}, ["npo"] = {"Pochuri Naga"}, ["nps"] = {"Nipsan"}, ["npu"] = {"Puimei Naga"}, ["npx"] = {"Noipx"}, ["npy"] = {"Napu"}, ["nqg"] = {"Southern Nago"}, ["nqk"] = {"Kura Ede Nago"}, ["nql"] = {"Ngendelengo"}, ["nqm"] = {"Ndom"}, ["nqn"] = {"Nen"}, ["nqo"] = {"N'Ko", "N’Ko"}, ["nqq"] = {"Kyan-Karyaw Naga"}, ["nqt"] = {"Nteng"}, ["nqy"] = {"Akyaung Ari Naga"}, ["nra"] = {"Ngom"}, ["nrb"] = {"Nara"}, ["nrc"] = {"Noric"}, ["nre"] = {"Southern Rengma Naga"}, ["nrf"] = {"Jèrriais", "Guernésiais", "Sercquiais"}, ["nrg"] = {"Narango"}, ["nri"] = {"Chokri Naga"}, ["nrk"] = {"Ngarla"}, ["nrl"] = {"Ngarluma"}, ["nrm"] = {"Narom"}, ["nrn"] = {"Norn"}, ["nrp"] = {"North Picene"}, ["nrr"] = {"Norra", "Nora"}, ["nrt"] = {"Northern Kalapuya"}, ["nru"] = {"Narua"}, ["nrx"] = {"Ngurmbur"}, ["nrz"] = {"Lala"}, ["nsa"] = {"Sangtam Naga"}, ["nsb"] = {"Lower Nossob"}, ["nsc"] = {"Nshi"}, ["nsd"] = {"Southern Nisu"}, ["nse"] = {"Nsenga"}, ["nsf"] = {"Northwestern Nisu"}, ["nsg"] = {"Ngasa"}, ["nsh"] = {"Ngoshie"}, ["nsi"] = {"Nigerian Sign Language"}, ["nsk"] = {"Naskapi"}, ["nsl"] = {"Norwegian Sign Language"}, ["nsm"] = {"Sumi Naga"}, ["nsn"] = {"Nehan"}, ["nso"] = {"Pedi", "Northern Sotho", "Sepedi"}, ["nsp"] = {"Nepalese Sign Language"}, ["nsq"] = {"Northern Sierra Miwok"}, ["nsr"] = {"Maritime Sign Language"}, ["nss"] = {"Nali"}, ["nst"] = {"Tase Naga"}, ["nsu"] = {"Sierra Negra Nahuatl"}, ["nsv"] = {"Southwestern Nisu"}, ["nsw"] = {"Navut"}, ["nsx"] = {"Nsongo"}, ["nsy"] = {"Nasal"}, ["nsz"] = {"Nisenan"}, ["ntd"] = {"Northern Tidung"}, ["nte"] = {"Nathembo"}, ["ntg"] = {"Ngantangarra"}, ["nti"] = {"Natioro"}, ["ntj"] = {"Ngaanyatjarra"}, ["ntk"] = {"Ikoma-Nata-Isenye"}, ["ntm"] = {"Nateni"}, ["nto"] = {"Ntomba"}, ["ntp"] = {"Northern Tepehuan"}, ["ntr"] = {"Delo"}, ["ntu"] = {"Natügu"}, ["ntw"] = {"Nottoway"}, ["ntx"] = {"Tangkhul Naga (Myanmar)"}, ["nty"] = {"Mantsi"}, ["ntz"] = {"Natanzi"}, ["nua"] = {"Yuanga"}, ["nub"] = {"Nubian languages"}, ["nuc"] = {"Nukuini"}, ["nud"] = {"Ngala"}, ["nue"] = {"Ngundu"}, ["nuf"] = {"Nusu"}, ["nug"] = {"Nungali"}, ["nuh"] = {"Ndunda"}, ["nui"] = {"Ngumbi"}, ["nuj"] = {"Nyole"}, ["nuk"] = {"Nuu-chah-nulth", "Nuuchahnulth"}, ["nul"] = {"Nusa Laut"}, ["num"] = {"Niuafo'ou"}, ["nun"] = {"Anong"}, ["nuo"] = {"Nguôn"}, ["nup"] = {"Nupe-Nupe-Tako"}, ["nuq"] = {"Nukumanu"}, ["nur"] = {"Nukuria"}, ["nus"] = {"Nuer"}, ["nut"] = {"Nung (Viet Nam)"}, ["nuu"] = {"Ngbundu"}, ["nuv"] = {"Northern Nuni"}, ["nuw"] = {"Nguluwan"}, ["nux"] = {"Mehek"}, ["nuy"] = {"Nunggubuyu"}, ["nuz"] = {"Tlamacazapa Nahuatl"}, ["nvh"] = {"Nasarian"}, ["nvm"] = {"Namiae"}, ["nvo"] = {"Nyokon"}, ["nwa"] = {"Nawathinehena"}, ["nwb"] = {"Nyabwa"}, ["nwc"] = {"Classical Newari", "Classical Nepal Bhasa", "Old Newari"}, ["nwe"] = {"Ngwe"}, ["nwg"] = {"Ngayawung"}, ["nwi"] = {"Southwest Tanna"}, ["nwm"] = {"Nyamusa-Molo"}, ["nwo"] = {"Nauo"}, ["nwr"] = {"Nawaru"}, ["nww"] = {"Ndwewe"}, ["nwx"] = {"Middle Newar"}, ["nwy"] = {"Nottoway-Meherrin"}, ["nxa"] = {"Nauete"}, ["nxd"] = {"Ngando (Democratic Republic of Congo)"}, ["nxe"] = {"Nage"}, ["nxg"] = {"Ngad'a"}, ["nxi"] = {"Nindi"}, ["nxk"] = {"Koki Naga"}, ["nxl"] = {"South Nuaulu"}, ["nxm"] = {"Numidian"}, ["nxn"] = {"Ngawun"}, ["nxo"] = {"Ndambomo"}, ["nxq"] = {"Naxi"}, ["nxr"] = {"Ninggerum"}, ["nxx"] = {"Nafri"}, ["nyb"] = {"Nyangbo"}, ["nyc"] = {"Nyanga-li"}, ["nyd"] = {"Nyore", "Olunyole"}, ["nye"] = {"Nyengo"}, ["nyf"] = {"Giryama", "Kigiryama"}, ["nyg"] = {"Nyindu"}, ["nyh"] = {"Nyikina"}, ["nyi"] = {"Ama (Sudan)"}, ["nyj"] = {"Nyanga"}, ["nyk"] = {"Nyaneka"}, ["nyl"] = {"Nyeu"}, ["nym"] = {"Nyamwezi"}, ["nyn"] = {"Nyankole"}, ["nyo"] = {"Nyoro"}, ["nyp"] = {"Nyang'i"}, ["nyq"] = {"Nayini"}, ["nyr"] = {"Nyiha (Malawi)"}, ["nys"] = {"Nyungar"}, ["nyt"] = {"Nyawaygi"}, ["nyu"] = {"Nyungwe"}, ["nyv"] = {"Nyulnyul"}, ["nyw"] = {"Nyaw"}, ["nyx"] = {"Nganyaywana"}, ["nyy"] = {"Nyakyusa-Ngonde"}, ["nza"] = {"Tigon Mbembe"}, ["nzb"] = {"Njebi"}, ["nzd"] = {"Nzadi"}, ["nzi"] = {"Nzima"}, ["nzk"] = {"Nzakara"}, ["nzm"] = {"Zeme Naga"}, ["nzr"] = {"Dir-Nyamzak-Mbarimi"}, ["nzs"] = {"New Zealand Sign Language"}, ["nzu"] = {"Teke-Nzikou"}, ["nzy"] = {"Nzakambay"}, ["nzz"] = {"Nanga Dama Dogon"}, ["oaa"] = {"Orok"}, ["oac"] = {"Oroch"}, ["oar"] = {"Old Aramaic (up to 700 BCE)", "Ancient Aramaic (up to 700 BCE)"}, ["oav"] = {"Old Avar"}, ["obi"] = {"Obispeño"}, ["obk"] = {"Southern Bontok"}, ["obl"] = {"Oblo"}, ["obm"] = {"Moabite"}, ["obo"] = {"Obo Manobo"}, ["obr"] = {"Old Burmese"}, ["obt"] = {"Old Breton"}, ["obu"] = {"Obulom"}, ["oca"] = {"Ocaina"}, ["och"] = {"Old Chinese"}, ["ocm"] = {"Old Cham"}, ["oco"] = {"Old Cornish"}, ["ocu"] = {"Atzingo Matlatzinca"}, ["oda"] = {"Odut"}, ["odk"] = {"Od"}, ["odt"] = {"Old Dutch"}, ["odu"] = {"Odual"}, ["ofo"] = {"Ofo"}, ["ofs"] = {"Old Frisian"}, ["ofu"] = {"Efutop"}, ["ogb"] = {"Ogbia"}, ["ogc"] = {"Ogbah"}, ["oge"] = {"Old Georgian"}, ["ogg"] = {"Ogbogolo"}, ["ogo"] = {"Khana"}, ["ogu"] = {"Ogbronuagum"}, ["oht"] = {"Old Hittite"}, ["ohu"] = {"Old Hungarian"}, ["oia"] = {"Oirata"}, ["oie"] = {"Okolie"}, ["oin"] = {"Inebu One"}, ["ojb"] = {"Northwestern Ojibwa"}, ["ojc"] = {"Central Ojibwa"}, ["ojg"] = {"Eastern Ojibwa"}, ["ojp"] = {"Old Japanese"}, ["ojs"] = {"Severn Ojibwa"}, ["ojv"] = {"Ontong Java"}, ["ojw"] = {"Western Ojibwa"}, ["oka"] = {"Okanagan"}, ["okb"] = {"Okobo"}, ["okc"] = {"Kobo"}, ["okd"] = {"Okodia"}, ["oke"] = {"Okpe (Southwestern Edo)"}, ["okg"] = {"Koko Babangk"}, ["okh"] = {"Koresh-e Rostam"}, ["oki"] = {"Okiek"}, ["okj"] = {"Oko-Juwoi"}, ["okk"] = {"Kwamtim One"}, ["okl"] = {"Old Kentish Sign Language"}, ["okm"] = {"Middle Korean (10th-16th cent.)"}, ["okn"] = {"Oki-No-Erabu"}, ["oko"] = {"Old Korean (3rd-9th cent.)"}, ["okr"] = {"Kirike"}, ["oks"] = {"Oko-Eni-Osayen"}, ["oku"] = {"Oku"}, ["okv"] = {"Orokaiva"}, ["okx"] = {"Okpe (Northwestern Edo)"}, ["okz"] = {"Old Khmer"}, ["ola"] = {"Walungge"}, ["old"] = {"Mochi"}, ["ole"] = {"Olekha"}, ["olk"] = {"Olkol"}, ["olm"] = {"Oloma"}, ["olo"] = {"Livvi"}, ["olr"] = {"Olrat"}, ["olt"] = {"Old Lithuanian"}, ["olu"] = {"Kuvale"}, ["oma"] = {"Omaha-Ponca"}, ["omb"] = {"East Ambae"}, ["omc"] = {"Mochica"}, ["omg"] = {"Omagua"}, ["omi"] = {"Omi"}, ["omk"] = {"Omok"}, ["oml"] = {"Ombo"}, ["omn"] = {"Minoan"}, ["omo"] = {"Utarmbung"}, ["omp"] = {"Old Manipuri"}, ["omq"] = {"Oto-Manguean languages"}, ["omr"] = {"Old Marathi"}, ["omt"] = {"Omotik"}, ["omu"] = {"Omurano"}, ["omv"] = {"Omotic languages"}, ["omw"] = {"South Tairora"}, ["omx"] = {"Old Mon"}, ["omy"] = {"Old Malay"}, ["ona"] = {"Ona"}, ["onb"] = {"Lingao"}, ["one"] = {"Oneida"}, ["ong"] = {"Olo"}, ["oni"] = {"Onin"}, ["onj"] = {"Onjob"}, ["onk"] = {"Kabore One"}, ["onn"] = {"Onobasulu"}, ["ono"] = {"Onondaga"}, ["onp"] = {"Sartang"}, ["onr"] = {"Northern One"}, ["ons"] = {"Ono"}, ["ont"] = {"Ontenu"}, ["onu"] = {"Unua"}, ["onw"] = {"Old Nubian"}, ["onx"] = {"Onin Based Pidgin"}, ["ood"] = {"Tohono O'odham"}, ["oog"] = {"Ong"}, ["oon"] = {"Önge"}, ["oor"] = {"Oorlams"}, ["oos"] = {"Old Ossetic"}, ["opa"] = {"Okpamheri"}, ["opk"] = {"Kopkaka"}, ["opm"] = {"Oksapmin"}, ["opo"] = {"Opao"}, ["opt"] = {"Opata"}, ["opy"] = {"Ofayé"}, ["ora"] = {"Oroha"}, ["orc"] = {"Orma"}, ["ore"] = {"Orejón"}, ["org"] = {"Oring"}, ["orh"] = {"Oroqen"}, ["orn"] = {"Orang Kanaq"}, ["oro"] = {"Orokolo"}, ["orr"] = {"Oruma"}, ["ors"] = {"Orang Seletar"}, ["ort"] = {"Adivasi Oriya"}, ["oru"] = {"Ormuri"}, ["orv"] = {"Old Russian"}, ["orw"] = {"Oro Win"}, ["orx"] = {"Oro"}, ["ory"] = {"Odia (individual language)", "Oriya (individual language)"}, ["orz"] = {"Ormu"}, ["osa"] = {"Osage"}, ["osc"] = {"Oscan"}, ["osi"] = {"Osing"}, ["osn"] = {"Old Sundanese"}, ["oso"] = {"Ososo"}, ["osp"] = {"Old Spanish"}, ["ost"] = {"Osatu"}, ["osu"] = {"Southern One"}, ["osx"] = {"Old Saxon"}, ["ota"] = {"Ottoman Turkish (1500-1928)"}, ["otb"] = {"Old Tibetan"}, ["otd"] = {"Ot Danum"}, ["ote"] = {"Mezquital Otomi"}, ["oti"] = {"Oti"}, ["otk"] = {"Old Turkish"}, ["otl"] = {"Tilapa Otomi"}, ["otm"] = {"Eastern Highland Otomi"}, ["otn"] = {"Tenango Otomi"}, ["oto"] = {"Otomian languages"}, ["otq"] = {"Querétaro Otomi"}, ["otr"] = {"Otoro"}, ["ots"] = {"Estado de México Otomi"}, ["ott"] = {"Temoaya Otomi"}, ["otu"] = {"Otuke"}, ["otw"] = {"Ottawa"}, ["otx"] = {"Texcatepec Otomi"}, ["oty"] = {"Old Tamil"}, ["otz"] = {"Ixtenco Otomi"}, ["oua"] = {"Tagargrent"}, ["oub"] = {"Glio-Oubi"}, ["oue"] = {"Oune"}, ["oui"] = {"Old Uighur"}, ["oum"] = {"Ouma"}, ["ovd"] = {"Elfdalian", "Övdalian"}, ["owi"] = {"Owiniga"}, ["owl"] = {"Old Welsh"}, ["oyb"] = {"Oy"}, ["oyd"] = {"Oyda"}, ["oym"] = {"Wayampi"}, ["oyy"] = {"Oya'oya"}, ["ozm"] = {"Koonzime"}, ["paa"] = {"Papuan languages"}, ["pab"] = {"Parecís"}, ["pac"] = {"Pacoh"}, ["pad"] = {"Paumarí"}, ["pae"] = {"Pagibete"}, ["paf"] = {"Paranawát"}, ["pag"] = {"Pangasinan"}, ["pah"] = {"Tenharim"}, ["pai"] = {"Pe"}, ["pak"] = {"Parakanã"}, ["pal"] = {"Pahlavi"}, ["pam"] = {"Pampanga", "Kapampangan"}, ["pao"] = {"Northern Paiute"}, ["pap"] = {"Papiamento"}, ["paq"] = {"Parya"}, ["par"] = {"Panamint", "Timbisha"}, ["pas"] = {"Papasena"}, ["pau"] = {"Palauan"}, ["pav"] = {"Pakaásnovos"}, ["paw"] = {"Pawnee"}, ["pax"] = {"Pankararé"}, ["pay"] = {"Pech"}, ["paz"] = {"Pankararú"}, ["pbb"] = {"Páez"}, ["pbc"] = {"Patamona"}, ["pbe"] = {"Mezontla Popoloca"}, ["pbf"] = {"Coyotepec Popoloca"}, ["pbg"] = {"Paraujano"}, ["pbh"] = {"E'ñapa Woromaipu"}, ["pbi"] = {"Parkwa"}, ["pbl"] = {"Mak (Nigeria)"}, ["pbm"] = {"Puebla Mazatec"}, ["pbn"] = {"Kpasam"}, ["pbo"] = {"Papel"}, ["pbp"] = {"Badyara"}, ["pbr"] = {"Pangwa"}, ["pbs"] = {"Central Pame"}, ["pbt"] = {"Southern Pashto"}, ["pbu"] = {"Northern Pashto"}, ["pbv"] = {"Pnar"}, ["pby"] = {"Pyu (Papua New Guinea)"}, ["pca"] = {"Santa Inés Ahuatempan Popoloca"}, ["pcb"] = {"Pear"}, ["pcc"] = {"Bouyei"}, ["pcd"] = {"Picard"}, ["pce"] = {"Ruching Palaung"}, ["pcf"] = {"Paliyan"}, ["pcg"] = {"Paniya"}, ["pch"] = {"Pardhan"}, ["pci"] = {"Duruwa"}, ["pcj"] = {"Parenga"}, ["pck"] = {"Paite Chin"}, ["pcl"] = {"Pardhi"}, ["pcm"] = {"Nigerian Pidgin"}, ["pcn"] = {"Piti"}, ["pcp"] = {"Pacahuara"}, ["pcw"] = {"Pyapun"}, ["pda"] = {"Anam"}, ["pdc"] = {"Pennsylvania German"}, ["pdi"] = {"Pa Di"}, ["pdn"] = {"Podena", "Fedan"}, ["pdo"] = {"Padoe"}, ["pdt"] = {"Plautdietsch"}, ["pdu"] = {"Kayan"}, ["pea"] = {"Peranakan Indonesian"}, ["peb"] = {"Eastern Pomo"}, ["ped"] = {"Mala (Papua New Guinea)"}, ["pee"] = {"Taje"}, ["pef"] = {"Northeastern Pomo"}, ["peg"] = {"Pengo"}, ["peh"] = {"Bonan"}, ["pei"] = {"Chichimeca-Jonaz"}, ["pej"] = {"Northern Pomo"}, ["pek"] = {"Penchal"}, ["pel"] = {"Pekal"}, ["pem"] = {"Phende"}, ["peo"] = {"Old Persian (ca. 600-400 B.C.)"}, ["pep"] = {"Kunja"}, ["peq"] = {"Southern Pomo"}, ["pes"] = {"Iranian Persian"}, ["pev"] = {"Pémono"}, ["pex"] = {"Petats"}, ["pey"] = {"Petjo"}, ["pez"] = {"Eastern Penan"}, ["pfa"] = {"Pááfang"}, ["pfe"] = {"Pere"}, ["pfl"] = {"Pfaelzisch"}, ["pga"] = {"Sudanese Creole Arabic"}, ["pgd"] = {"Gāndhārī"}, ["pgg"] = {"Pangwali"}, ["pgi"] = {"Pagi"}, ["pgk"] = {"Rerep"}, ["pgl"] = {"Primitive Irish"}, ["pgn"] = {"Paelignian"}, ["pgs"] = {"Pangseng"}, ["pgu"] = {"Pagu"}, ["pgz"] = {"Papua New Guinean Sign Language"}, ["pha"] = {"Pa-Hng"}, ["phd"] = {"Phudagi"}, ["phg"] = {"Phuong"}, ["phh"] = {"Phukha"}, ["phi"] = {"Philippine languages"}, ["phj"] = {"Pahari"}, ["phk"] = {"Phake"}, ["phl"] = {"Phalura", "Palula"}, ["phm"] = {"Phimbi"}, ["phn"] = {"Phoenician"}, ["pho"] = {"Phunoi"}, ["phq"] = {"Phana'"}, ["phr"] = {"Pahari-Potwari"}, ["pht"] = {"Phu Thai"}, ["phu"] = {"Phuan"}, ["phv"] = {"Pahlavani"}, ["phw"] = {"Phangduwali"}, ["pia"] = {"Pima Bajo"}, ["pib"] = {"Yine"}, ["pic"] = {"Pinji"}, ["pid"] = {"Piaroa"}, ["pie"] = {"Piro"}, ["pif"] = {"Pingelapese"}, ["pig"] = {"Pisabo"}, ["pih"] = {"Pitcairn-Norfolk"}, ["pij"] = {"Pijao"}, ["pil"] = {"Yom"}, ["pim"] = {"Powhatan"}, ["pin"] = {"Piame"}, ["pio"] = {"Piapoco"}, ["pip"] = {"Pero"}, ["pir"] = {"Piratapuyo"}, ["pis"] = {"Pijin"}, ["pit"] = {"Pitta Pitta"}, ["piu"] = {"Pintupi-Luritja"}, ["piv"] = {"Pileni", "Vaeakau-Taumako"}, ["piw"] = {"Pimbwe"}, ["pix"] = {"Piu"}, ["piy"] = {"Piya-Kwonci"}, ["piz"] = {"Pije"}, ["pjt"] = {"Pitjantjatjara"}, ["pka"] = {"Ardhamāgadhī Prākrit"}, ["pkb"] = {"Pokomo", "Kipfokomo"}, ["pkc"] = {"Paekche"}, ["pkg"] = {"Pak-Tong"}, ["pkh"] = {"Pankhu"}, ["pkn"] = {"Pakanha"}, ["pko"] = {"Pökoot"}, ["pkp"] = {"Pukapuka"}, ["pkr"] = {"Attapady Kurumba"}, ["pks"] = {"Pakistan Sign Language"}, ["pkt"] = {"Maleng"}, ["pku"] = {"Paku"}, ["pla"] = {"Miani"}, ["plb"] = {"Polonombauk"}, ["plc"] = {"Central Palawano"}, ["pld"] = {"Polari"}, ["ple"] = {"Palu'e"}, ["plf"] = {"Central Malayo-Polynesian languages"}, ["plg"] = {"Pilagá"}, ["plh"] = {"Paulohi"}, ["plk"] = {"Kohistani Shina"}, ["pll"] = {"Shwe Palaung"}, ["pln"] = {"Palenquero"}, ["plo"] = {"Oluta Popoluca"}, ["plq"] = {"Palaic"}, ["plr"] = {"Palaka Senoufo"}, ["pls"] = {"San Marcos Tlacoyalco Popoloca", "San Marcos Tlalcoyalco Popoloca"}, ["plt"] = {"Plateau Malagasy"}, ["plu"] = {"Palikúr"}, ["plv"] = {"Southwest Palawano"}, ["plw"] = {"Brooke's Point Palawano"}, ["ply"] = {"Bolyu"}, ["plz"] = {"Paluan"}, ["pma"] = {"Paama"}, ["pmb"] = {"Pambia"}, ["pmd"] = {"Pallanganmiddang"}, ["pme"] = {"Pwaamei"}, ["pmf"] = {"Pamona"}, ["pmh"] = {"Māhārāṣṭri Prākrit"}, ["pmi"] = {"Northern Pumi"}, ["pmj"] = {"Southern Pumi"}, ["pml"] = {"Lingua Franca"}, ["pmm"] = {"Pomo"}, ["pmn"] = {"Pam"}, ["pmo"] = {"Pom"}, ["pmq"] = {"Northern Pame"}, ["pmr"] = {"Paynamar"}, ["pms"] = {"Piemontese"}, ["pmt"] = {"Tuamotuan"}, ["pmw"] = {"Plains Miwok"}, ["pmx"] = {"Poumei Naga"}, ["pmy"] = {"Papuan Malay"}, ["pmz"] = {"Southern Pame"}, ["pna"] = {"Punan Bah-Biau"}, ["pnb"] = {"Western Panjabi"}, ["pnc"] = {"Pannei"}, ["pnd"] = {"Mpinda"}, ["pne"] = {"Western Penan"}, ["png"] = {"Pangu", "Pongu"}, ["pnh"] = {"Penrhyn"}, ["pni"] = {"Aoheng"}, ["pnj"] = {"Pinjarup"}, ["pnk"] = {"Paunaka"}, ["pnl"] = {"Paleni"}, ["pnm"] = {"Punan Batu 1"}, ["pnn"] = {"Pinai-Hagahai"}, ["pno"] = {"Panobo"}, ["pnp"] = {"Pancana"}, ["pnq"] = {"Pana (Burkina Faso)"}, ["pnr"] = {"Panim"}, ["pns"] = {"Ponosakan"}, ["pnt"] = {"Pontic"}, ["pnu"] = {"Jiongnai Bunu"}, ["pnv"] = {"Pinigura"}, ["pnw"] = {"Banyjima", "Panytyima"}, ["pnx"] = {"Phong-Kniang"}, ["pny"] = {"Pinyin"}, ["pnz"] = {"Pana (Central African Republic)"}, ["poc"] = {"Poqomam"}, ["poe"] = {"San Juan Atzingo Popoloca"}, ["pof"] = {"Poke"}, ["pog"] = {"Potiguára"}, ["poh"] = {"Poqomchi'"}, ["poi"] = {"Highland Popoluca"}, ["pok"] = {"Pokangá"}, ["pom"] = {"Southeastern Pomo"}, ["pon"] = {"Pohnpeian"}, ["poo"] = {"Central Pomo"}, ["pop"] = {"Pwapwâ"}, ["poq"] = {"Texistepec Popoluca"}, ["pos"] = {"Sayula Popoluca"}, ["pot"] = {"Potawatomi"}, ["pov"] = {"Upper Guinea Crioulo"}, ["pow"] = {"San Felipe Otlaltepec Popoloca"}, ["pox"] = {"Polabian"}, ["poy"] = {"Pogolo"}, ["poz"] = {"Malayo-Polynesian languages"}, ["ppe"] = {"Papi"}, ["ppi"] = {"Paipai"}, ["ppk"] = {"Uma"}, ["ppl"] = {"Pipil", "Nicarao"}, ["ppm"] = {"Papuma"}, ["ppn"] = {"Papapana"}, ["ppo"] = {"Folopa"}, ["ppp"] = {"Pelende"}, ["ppq"] = {"Pei"}, ["pps"] = {"San Luís Temalacayuca Popoloca"}, ["ppt"] = {"Pare"}, ["ppu"] = {"Papora"}, ["pqa"] = {"Pa'a"}, ["pqe"] = {"Eastern Malayo-Polynesian languages"}, ["pqm"] = {"Malecite-Passamaquoddy"}, ["pqw"] = {"Western Malayo-Polynesian languages"}, ["pra"] = {"Prakrit languages"}, ["prc"] = {"Parachi"}, ["prd"] = {"Parsi-Dari"}, ["pre"] = {"Principense"}, ["prf"] = {"Paranan"}, ["prg"] = {"Prussian"}, ["prh"] = {"Porohanon"}, ["pri"] = {"Paicî"}, ["prk"] = {"Parauk"}, ["prl"] = {"Peruvian Sign Language"}, ["prm"] = {"Kibiri"}, ["prn"] = {"Prasuni"}, ["pro"] = {"Old Provençal (to 1500)", "Old Occitan (to 1500)"}, ["prq"] = {"Ashéninka Perené"}, ["prr"] = {"Puri"}, ["prs"] = {"Dari", "Afghan Persian"}, ["prt"] = {"Phai"}, ["pru"] = {"Puragi"}, ["prw"] = {"Parawen"}, ["prx"] = {"Purik"}, ["prz"] = {"Providencia Sign Language"}, ["psa"] = {"Asue Awyu"}, ["psc"] = {"Iranian Sign Language", "Persian Sign Language"}, ["psd"] = {"Plains Indian Sign Language"}, ["pse"] = {"Central Malay"}, ["psg"] = {"Penang Sign Language"}, ["psh"] = {"Southwest Pashai", "Southwest Pashayi"}, ["psi"] = {"Southeast Pashai", "Southeast Pashayi"}, ["psl"] = {"Puerto Rican Sign Language"}, ["psm"] = {"Pauserna"}, ["psn"] = {"Panasuan"}, ["pso"] = {"Polish Sign Language"}, ["psp"] = {"Philippine Sign Language"}, ["psq"] = {"Pasi"}, ["psr"] = {"Portuguese Sign Language"}, ["pss"] = {"Kaulong"}, ["pst"] = {"Central Pashto"}, ["psu"] = {"Sauraseni Prākrit"}, ["psw"] = {"Port Sandwich"}, ["psy"] = {"Piscataway"}, ["pta"] = {"Pai Tavytera"}, ["pth"] = {"Pataxó Hã-Ha-Hãe"}, ["pti"] = {"Pindiini", "Wangkatha"}, ["ptn"] = {"Patani"}, ["pto"] = {"Zo'é"}, ["ptp"] = {"Patep"}, ["ptq"] = {"Pattapu"}, ["ptr"] = {"Piamatsina"}, ["ptt"] = {"Enrekang"}, ["ptu"] = {"Bambam"}, ["ptv"] = {"Port Vato"}, ["ptw"] = {"Pentlatch"}, ["pty"] = {"Pathiya"}, ["pua"] = {"Western Highland Purepecha"}, ["pub"] = {"Purum"}, ["puc"] = {"Punan Merap"}, ["pud"] = {"Punan Aput"}, ["pue"] = {"Puelche"}, ["puf"] = {"Punan Merah"}, ["pug"] = {"Phuie"}, ["pui"] = {"Puinave"}, ["puj"] = {"Punan Tubu"}, ["pum"] = {"Puma"}, ["puo"] = {"Puoc"}, ["pup"] = {"Pulabu"}, ["puq"] = {"Puquina"}, ["pur"] = {"Puruborá"}, ["put"] = {"Putoh"}, ["puu"] = {"Punu"}, ["puw"] = {"Puluwatese"}, ["pux"] = {"Puare"}, ["puy"] = {"Purisimeño"}, ["pwa"] = {"Pawaia"}, ["pwb"] = {"Panawa"}, ["pwg"] = {"Gapapaiwa"}, ["pwi"] = {"Patwin"}, ["pwm"] = {"Molbog"}, ["pwn"] = {"Paiwan"}, ["pwo"] = {"Pwo Western Karen"}, ["pwr"] = {"Powari"}, ["pww"] = {"Pwo Northern Karen"}, ["pxm"] = {"Quetzaltepec Mixe"}, ["pye"] = {"Pye Krumen"}, ["pym"] = {"Fyam"}, ["pyn"] = {"Poyanáwa"}, ["pys"] = {"Paraguayan Sign Language", "Lengua de Señas del Paraguay"}, ["pyu"] = {"Puyuma"}, ["pyx"] = {"Pyu (Myanmar)"}, ["pyy"] = {"Pyen"}, ["pze"] = {"Pesse"}, ["pzh"] = {"Pazeh"}, ["pzn"] = {"Jejara Naga", "Para Naga"}, ["qua"] = {"Quapaw"}, ["qub"] = {"Huallaga Huánuco Quechua"}, ["quc"] = {"K'iche'", "Quiché"}, ["qud"] = {"Calderón Highland Quichua"}, ["quf"] = {"Lambayeque Quechua"}, ["qug"] = {"Chimborazo Highland Quichua"}, ["quh"] = {"South Bolivian Quechua"}, ["qui"] = {"Quileute"}, ["quk"] = {"Chachapoyas Quechua"}, ["qul"] = {"North Bolivian Quechua"}, ["qum"] = {"Sipacapense"}, ["qun"] = {"Quinault"}, ["qup"] = {"Southern Pastaza Quechua"}, ["quq"] = {"Quinqui"}, ["qur"] = {"Yanahuanca Pasco Quechua"}, ["qus"] = {"Santiago del Estero Quichua"}, ["quv"] = {"Sacapulteco"}, ["quw"] = {"Tena Lowland Quichua"}, ["qux"] = {"Yauyos Quechua"}, ["quy"] = {"Ayacucho Quechua"}, ["quz"] = {"Cusco Quechua"}, ["qva"] = {"Ambo-Pasco Quechua"}, ["qvc"] = {"Cajamarca Quechua"}, ["qve"] = {"Eastern Apurímac Quechua"}, ["qvh"] = {"Huamalíes-Dos de Mayo Huánuco Quechua"}, ["qvi"] = {"Imbabura Highland Quichua"}, ["qvj"] = {"Loja Highland Quichua"}, ["qvl"] = {"Cajatambo North Lima Quechua"}, ["qvm"] = {"Margos-Yarowilca-Lauricocha Quechua"}, ["qvn"] = {"North Junín Quechua"}, ["qvo"] = {"Napo Lowland Quechua"}, ["qvp"] = {"Pacaraos Quechua"}, ["qvs"] = {"San Martín Quechua"}, ["qvw"] = {"Huaylla Wanca Quechua"}, ["qvy"] = {"Queyu"}, ["qvz"] = {"Northern Pastaza Quichua"}, ["qwa"] = {"Corongo Ancash Quechua"}, ["qwc"] = {"Classical Quechua"}, ["qwe"] = {"Quechuan (family)"}, ["qwh"] = {"Huaylas Ancash Quechua"}, ["qwm"] = {"Kuman (Russia)"}, ["qws"] = {"Sihuas Ancash Quechua"}, ["qwt"] = {"Kwalhioqua-Tlatskanai"}, ["qxa"] = {"Chiquián Ancash Quechua"}, ["qxc"] = {"Chincha Quechua"}, ["qxh"] = {"Panao Huánuco Quechua"}, ["qxl"] = {"Salasaca Highland Quichua"}, ["qxn"] = {"Northern Conchucos Ancash Quechua"}, ["qxo"] = {"Southern Conchucos Ancash Quechua"}, ["qxp"] = {"Puno Quechua"}, ["qxq"] = {"Qashqa'i"}, ["qxr"] = {"Cañar Highland Quichua"}, ["qxs"] = {"Southern Qiang"}, ["qxt"] = {"Santa Ana de Tusi Pasco Quechua"}, ["qxu"] = {"Arequipa-La Unión Quechua"}, ["qxw"] = {"Jauja Wanca Quechua"}, ["qya"] = {"Quenya"}, ["qyp"] = {"Quiripi"}, ["raa"] = {"Dungmali"}, ["rab"] = {"Camling"}, ["rac"] = {"Rasawa"}, ["rad"] = {"Rade"}, ["raf"] = {"Western Meohang"}, ["rag"] = {"Logooli", "Lulogooli"}, ["rah"] = {"Rabha"}, ["rai"] = {"Ramoaaina"}, ["raj"] = {"Rajasthani"}, ["rak"] = {"Tulu-Bohuai"}, ["ral"] = {"Ralte"}, ["ram"] = {"Canela"}, ["ran"] = {"Riantana"}, ["rao"] = {"Rao"}, ["rap"] = {"Rapanui"}, ["raq"] = {"Saam"}, ["rar"] = {"Rarotongan", "Cook Islands Maori"}, ["ras"] = {"Tegali"}, ["rat"] = {"Razajerdi"}, ["rau"] = {"Raute"}, ["rav"] = {"Sampang"}, ["raw"] = {"Rawang"}, ["rax"] = {"Rang"}, ["ray"] = {"Rapa"}, ["raz"] = {"Rahambuu"}, ["rbb"] = {"Rumai Palaung"}, ["rbk"] = {"Northern Bontok"}, ["rbl"] = {"Miraya Bikol"}, ["rbp"] = {"Barababaraba"}, ["rcf"] = {"Réunion Creole French"}, ["rdb"] = {"Rudbari"}, ["rea"] = {"Rerau"}, ["reb"] = {"Rembong"}, ["ree"] = {"Rejang Kayan"}, ["reg"] = {"Kara (Tanzania)"}, ["rei"] = {"Reli"}, ["rej"] = {"Rejang"}, ["rel"] = {"Rendille"}, ["rem"] = {"Remo"}, ["ren"] = {"Rengao"}, ["rer"] = {"Rer Bare"}, ["res"] = {"Reshe"}, ["ret"] = {"Retta"}, ["rey"] = {"Reyesano"}, ["rga"] = {"Roria"}, ["rge"] = {"Romano-Greek"}, ["rgk"] = {"Rangkas"}, ["rgn"] = {"Romagnol"}, ["rgr"] = {"Resígaro"}, ["rgs"] = {"Southern Roglai"}, ["rgu"] = {"Ringgou"}, ["rhg"] = {"Rohingya"}, ["rhp"] = {"Yahang"}, ["ria"] = {"Riang (India)"}, ["rib"] = {"Bribri Sign Language"}, ["rif"] = {"Tarifit"}, ["ril"] = {"Riang Lang", "Riang (Myanmar)"}, ["rim"] = {"Nyaturu"}, ["rin"] = {"Nungu"}, ["rir"] = {"Ribun"}, ["rit"] = {"Ritharrngu"}, ["riu"] = {"Riung"}, ["rjg"] = {"Rajong"}, ["rji"] = {"Raji"}, ["rjs"] = {"Rajbanshi"}, ["rka"] = {"Kraol"}, ["rkb"] = {"Rikbaktsa"}, ["rkh"] = {"Rakahanga-Manihiki"}, ["rki"] = {"Rakhine"}, ["rkm"] = {"Marka"}, ["rkt"] = {"Rangpuri", "Kamta"}, ["rkw"] = {"Arakwal"}, ["rma"] = {"Rama"}, ["rmb"] = {"Rembarrnga"}, ["rmc"] = {"Carpathian Romani"}, ["rmd"] = {"Traveller Danish"}, ["rme"] = {"Angloromani"}, ["rmf"] = {"Kalo Finnish Romani"}, ["rmg"] = {"Traveller Norwegian"}, ["rmh"] = {"Murkim"}, ["rmi"] = {"Lomavren"}, ["rmk"] = {"Romkun"}, ["rml"] = {"Baltic Romani"}, ["rmm"] = {"Roma"}, ["rmn"] = {"Balkan Romani"}, ["rmo"] = {"Sinte Romani"}, ["rmp"] = {"Rempi"}, ["rmq"] = {"Caló"}, ["rms"] = {"Romanian Sign Language"}, ["rmt"] = {"Domari"}, ["rmu"] = {"Tavringer Romani"}, ["rmv"] = {"Romanova"}, ["rmw"] = {"Welsh Romani"}, ["rmx"] = {"Romam"}, ["rmy"] = {"Vlax Romani"}, ["rmz"] = {"Marma"}, ["rnb"] = {"Brunca Sign Language"}, ["rnd"] = {"Ruund"}, ["rng"] = {"Ronga"}, ["rnl"] = {"Ranglong"}, ["rnn"] = {"Roon"}, ["rnp"] = {"Rongpo"}, ["rnr"] = {"Nari Nari"}, ["rnw"] = {"Rungwa"}, ["roa"] = {"Romance languages"}, ["rob"] = {"Tae'"}, ["roc"] = {"Cacgia Roglai"}, ["rod"] = {"Rogo"}, ["roe"] = {"Ronji"}, ["rof"] = {"Rombo"}, ["rog"] = {"Northern Roglai"}, ["rol"] = {"Romblomanon"}, ["rom"] = {"Romany"}, ["roo"] = {"Rotokas"}, ["rop"] = {"Kriol"}, ["ror"] = {"Rongga"}, ["rou"] = {"Runga"}, ["row"] = {"Dela-Oenale"}, ["rpn"] = {"Repanbitip"}, ["rpt"] = {"Rapting"}, ["rri"] = {"Ririo"}, ["rro"] = {"Waima"}, ["rrt"] = {"Arritinngithigh"}, ["rsb"] = {"Romano-Serbian"}, ["rsk"] = {"Ruthenian", "Rusnak"}, ["rsl"] = {"Russian Sign Language"}, ["rsm"] = {"Miriwoong Sign Language"}, ["rsn"] = {"Rwandan Sign Language"}, ["rsw"] = {"Rishiwa"}, ["rtc"] = {"Rungtu Chin"}, ["rth"] = {"Ratahan"}, ["rtm"] = {"Rotuman"}, ["rts"] = {"Yurats"}, ["rtw"] = {"Rathawi"}, ["rub"] = {"Gungu"}, ["ruc"] = {"Ruuli"}, ["rue"] = {"Rusyn"}, ["ruf"] = {"Luguru"}, ["rug"] = {"Roviana"}, ["ruh"] = {"Ruga"}, ["rui"] = {"Rufiji"}, ["ruk"] = {"Che"}, ["ruo"] = {"Istro Romanian"}, ["rup"] = {"Macedo-Romanian", "Aromanian", "Arumanian"}, ["ruq"] = {"Megleno Romanian"}, ["rut"] = {"Rutul"}, ["ruu"] = {"Lanas Lobu"}, ["ruy"] = {"Mala (Nigeria)"}, ["ruz"] = {"Ruma"}, ["rwa"] = {"Rawo"}, ["rwk"] = {"Rwa"}, ["rwl"] = {"Ruwila"}, ["rwm"] = {"Amba (Uganda)"}, ["rwo"] = {"Rawa"}, ["rwr"] = {"Marwari (India)"}, ["rxd"] = {"Ngardi"}, ["rxw"] = {"Karuwali", "Garuwali"}, ["ryn"] = {"Northern Amami-Oshima"}, ["rys"] = {"Yaeyama"}, ["ryu"] = {"Central Okinawan"}, ["rzh"] = {"Rāziḥī"}, ["saa"] = {"Saba"}, ["sab"] = {"Buglere"}, ["sac"] = {"Meskwaki"}, ["sad"] = {"Sandawe"}, ["sae"] = {"Sabanê"}, ["saf"] = {"Safaliba"}, ["sah"] = {"Yakut"}, ["sai"] = {"South American Indian languages"}, ["saj"] = {"Sahu"}, ["sak"] = {"Sake"}, ["sal"] = {"Salishan languages"}, ["sam"] = {"Samaritan Aramaic"}, ["sao"] = {"Sause"}, ["saq"] = {"Samburu"}, ["sar"] = {"Saraveca"}, ["sas"] = {"Sasak"}, ["sat"] = {"Santali"}, ["sau"] = {"Saleman"}, ["sav"] = {"Saafi-Saafi"}, ["saw"] = {"Sawi"}, ["sax"] = {"Sa"}, ["say"] = {"Saya"}, ["saz"] = {"Saurashtra"}, ["sba"] = {"Ngambay"}, ["sbb"] = {"Simbo"}, ["sbc"] = {"Kele (Papua New Guinea)"}, ["sbd"] = {"Southern Samo"}, ["sbe"] = {"Saliba"}, ["sbf"] = {"Chabu", "Shabo"}, ["sbg"] = {"Seget"}, ["sbh"] = {"Sori-Harengan"}, ["sbi"] = {"Seti"}, ["sbj"] = {"Surbakhal"}, ["sbk"] = {"Safwa"}, ["sbl"] = {"Botolan Sambal"}, ["sbm"] = {"Sagala"}, ["sbn"] = {"Sindhi Bhil"}, ["sbo"] = {"Sabüm"}, ["sbp"] = {"Sangu (Tanzania)"}, ["sbq"] = {"Sileibi"}, ["sbr"] = {"Sembakung Murut"}, ["sbs"] = {"Subiya"}, ["sbt"] = {"Kimki"}, ["sbu"] = {"Stod Bhoti"}, ["sbv"] = {"Sabine"}, ["sbw"] = {"Simba"}, ["sbx"] = {"Seberuang"}, ["sby"] = {"Soli"}, ["sbz"] = {"Sara Kaba"}, ["scb"] = {"Chut"}, ["sce"] = {"Dongxiang"}, ["scf"] = {"San Miguel Creole French"}, ["scg"] = {"Sanggau"}, ["sch"] = {"Sakachep"}, ["sci"] = {"Sri Lankan Creole Malay"}, ["sck"] = {"Sadri"}, ["scl"] = {"Shina"}, ["scn"] = {"Sicilian"}, ["sco"] = {"Scots"}, ["scp"] = {"Hyolmo", "Helambu Sherpa"}, ["scq"] = {"Sa'och"}, ["scs"] = {"North Slavey"}, ["sct"] = {"Southern Katang"}, ["scu"] = {"Shumcho"}, ["scv"] = {"Sheni"}, ["scw"] = {"Sha"}, ["scx"] = {"Sicel"}, ["sda"] = {"Toraja-Sa'dan"}, ["sdb"] = {"Shabak"}, ["sdc"] = {"Sassarese Sardinian"}, ["sde"] = {"Surubu"}, ["sdf"] = {"Sarli"}, ["sdg"] = {"Savi"}, ["sdh"] = {"Southern Kurdish"}, ["sdj"] = {"Suundi"}, ["sdk"] = {"Sos Kundi"}, ["sdl"] = {"Saudi Arabian Sign Language"}, ["sdn"] = {"Gallurese Sardinian"}, ["sdo"] = {"Bukar-Sadung Bidayuh"}, ["sdp"] = {"Sherdukpen"}, ["sdq"] = {"Semandang"}, ["sdr"] = {"Oraon Sadri"}, ["sds"] = {"Sened"}, ["sdt"] = {"Shuadit"}, ["sdu"] = {"Sarudu"}, ["sdv"] = {"Eastern Sudanic languages"}, ["sdx"] = {"Sibu Melanau"}, ["sdz"] = {"Sallands"}, ["sea"] = {"Semai"}, ["seb"] = {"Shempire Senoufo"}, ["sec"] = {"Sechelt"}, ["sed"] = {"Sedang"}, ["see"] = {"Seneca"}, ["sef"] = {"Cebaara Senoufo"}, ["seg"] = {"Segeju"}, ["seh"] = {"Sena"}, ["sei"] = {"Seri"}, ["sej"] = {"Sene"}, ["sek"] = {"Sekani"}, ["sel"] = {"Selkup"}, ["sem"] = {"Semitic languages"}, ["sen"] = {"Nanerigé Sénoufo"}, ["seo"] = {"Suarmin"}, ["sep"] = {"Sìcìté Sénoufo"}, ["seq"] = {"Senara Sénoufo"}, ["ser"] = {"Serrano"}, ["ses"] = {"Koyraboro Senni Songhai"}, ["set"] = {"Sentani"}, ["seu"] = {"Serui-Laut"}, ["sev"] = {"Nyarafolo Senoufo"}, ["sew"] = {"Sewa Bay"}, ["sey"] = {"Secoya"}, ["sez"] = {"Senthang Chin"}, ["sfb"] = {"Langue des signes de Belgique Francophone", "French Belgian Sign Language"}, ["sfe"] = {"Eastern Subanen"}, ["sfm"] = {"Small Flowery Miao"}, ["sfs"] = {"South African Sign Language"}, ["sfw"] = {"Sehwi"}, ["sga"] = {"Old Irish (to 900)"}, ["sgb"] = {"Mag-antsi Ayta"}, ["sgc"] = {"Kipsigis"}, ["sgd"] = {"Surigaonon"}, ["sge"] = {"Segai"}, ["sgg"] = {"Swiss-German Sign Language"}, ["sgh"] = {"Shughni"}, ["sgi"] = {"Suga"}, ["sgj"] = {"Surgujia"}, ["sgk"] = {"Sangkong"}, ["sgm"] = {"Singa"}, ["sgn"] = {"Sign languages"}, ["sgp"] = {"Singpho"}, ["sgr"] = {"Sangisari"}, ["sgs"] = {"Samogitian"}, ["sgt"] = {"Brokpake"}, ["sgu"] = {"Salas"}, ["sgw"] = {"Sebat Bet Gurage"}, ["sgx"] = {"Sierra Leone Sign Language"}, ["sgy"] = {"Sanglechi"}, ["sgz"] = {"Sursurunga"}, ["sha"] = {"Shall-Zwall"}, ["shb"] = {"Ninam"}, ["shc"] = {"Sonde"}, ["shd"] = {"Kundal Shahi"}, ["she"] = {"Sheko"}, ["shg"] = {"Shua"}, ["shh"] = {"Shoshoni"}, ["shi"] = {"Tachelhit"}, ["shj"] = {"Shatt"}, ["shk"] = {"Shilluk"}, ["shl"] = {"Shendu"}, ["shm"] = {"Shahrudi"}, ["shn"] = {"Shan"}, ["sho"] = {"Shanga"}, ["shp"] = {"Shipibo-Conibo"}, ["shq"] = {"Sala"}, ["shr"] = {"Shi"}, ["shs"] = {"Shuswap"}, ["sht"] = {"Shasta"}, ["shu"] = {"Chadian Arabic"}, ["shv"] = {"Shehri"}, ["shw"] = {"Shwai"}, ["shx"] = {"She"}, ["shy"] = {"Tachawit"}, ["shz"] = {"Syenara Senoufo"}, ["sia"] = {"Akkala Sami"}, ["sib"] = {"Sebop"}, ["sid"] = {"Sidamo"}, ["sie"] = {"Simaa"}, ["sif"] = {"Siamou"}, ["sig"] = {"Paasaal"}, ["sih"] = {"Zire", "Sîshëë"}, ["sii"] = {"Shom Peng"}, ["sij"] = {"Numbami"}, ["sik"] = {"Sikiana"}, ["sil"] = {"Tumulung Sisaala"}, ["sim"] = {"Mende (Papua New Guinea)"}, ["sio"] = {"Siouan languages"}, ["sip"] = {"Sikkimese"}, ["siq"] = {"Sonia"}, ["sir"] = {"Siri"}, ["sis"] = {"Siuslaw"}, ["sit"] = {"Sino-Tibetan languages"}, ["siu"] = {"Sinagen"}, ["siv"] = {"Sumariup"}, ["siw"] = {"Siwai"}, ["six"] = {"Sumau"}, ["siy"] = {"Sivandi"}, ["siz"] = {"Siwi"}, ["sja"] = {"Epena"}, ["sjb"] = {"Sajau Basap"}, ["sjd"] = {"Kildin Sami"}, ["sje"] = {"Pite Sami"}, ["sjg"] = {"Assangori"}, ["sjk"] = {"Kemi Sami"}, ["sjl"] = {"Sajalong", "Miji"}, ["sjm"] = {"Mapun"}, ["sjn"] = {"Sindarin"}, ["sjo"] = {"Xibe"}, ["sjp"] = {"Surjapuri"}, ["sjr"] = {"Siar-Lak"}, ["sjs"] = {"Senhaja De Srair"}, ["sjt"] = {"Ter Sami"}, ["sju"] = {"Ume Sami"}, ["sjw"] = {"Shawnee"}, ["ska"] = {"Skagit"}, ["skb"] = {"Saek"}, ["skc"] = {"Ma Manda"}, ["skd"] = {"Southern Sierra Miwok"}, ["ske"] = {"Seke (Vanuatu)"}, ["skf"] = {"Sakirabiá"}, ["skg"] = {"Sakalava Malagasy"}, ["skh"] = {"Sikule"}, ["ski"] = {"Sika"}, ["skj"] = {"Seke (Nepal)"}, ["skm"] = {"Kutong"}, ["skn"] = {"Kolibugan Subanon"}, ["sko"] = {"Seko Tengah"}, ["skp"] = {"Sekapan"}, ["skq"] = {"Sininkere"}, ["skr"] = {"Saraiki", "Seraiki"}, ["sks"] = {"Maia"}, ["skt"] = {"Sakata"}, ["sku"] = {"Sakao"}, ["skv"] = {"Skou"}, ["skw"] = {"Skepi Creole Dutch"}, ["skx"] = {"Seko Padang"}, ["sky"] = {"Sikaiana"}, ["skz"] = {"Sekar"}, ["sla"] = {"Slavic languages"}, ["slc"] = {"Sáliba"}, ["sld"] = {"Sissala"}, ["sle"] = {"Sholaga"}, ["slf"] = {"Swiss-Italian Sign Language"}, ["slg"] = {"Selungai Murut"}, ["slh"] = {"Southern Puget Sound Salish"}, ["sli"] = {"Lower Silesian"}, ["slj"] = {"Salumá"}, ["sll"] = {"Salt-Yui"}, ["slm"] = {"Pangutaran Sama"}, ["sln"] = {"Salinan"}, ["slp"] = {"Lamaholot"}, ["slr"] = {"Salar"}, ["sls"] = {"Singapore Sign Language"}, ["slt"] = {"Sila"}, ["slu"] = {"Selaru"}, ["slw"] = {"Sialum"}, ["slx"] = {"Salampasu"}, ["sly"] = {"Selayar"}, ["slz"] = {"Ma'ya"}, ["sma"] = {"Southern Sami"}, ["smb"] = {"Simbari"}, ["smc"] = {"Som"}, ["smf"] = {"Auwe"}, ["smg"] = {"Simbali"}, ["smh"] = {"Samei"}, ["smi"] = {"Sami languages"}, ["smj"] = {"Lule Sami"}, ["smk"] = {"Bolinao"}, ["sml"] = {"Central Sama"}, ["smm"] = {"Musasa"}, ["smn"] = {"Inari Sami"}, ["smp"] = {"Samaritan"}, ["smq"] = {"Samo"}, ["smr"] = {"Simeulue"}, ["sms"] = {"Skolt Sami"}, ["smt"] = {"Simte"}, ["smu"] = {"Somray"}, ["smv"] = {"Samvedi"}, ["smw"] = {"Sumbawa"}, ["smx"] = {"Samba"}, ["smy"] = {"Semnani"}, ["smz"] = {"Simeku"}, ["snc"] = {"Sinaugoro"}, ["sne"] = {"Bau Bidayuh"}, ["snf"] = {"Noon"}, ["sng"] = {"Sanga (Democratic Republic of Congo)"}, ["sni"] = {"Sensi"}, ["snj"] = {"Riverain Sango"}, ["snk"] = {"Soninke"}, ["snl"] = {"Sangil"}, ["snm"] = {"Southern Ma'di"}, ["snn"] = {"Siona"}, ["sno"] = {"Snohomish"}, ["snp"] = {"Siane"}, ["snq"] = {"Sangu (Gabon)"}, ["snr"] = {"Sihan"}, ["sns"] = {"South West Bay", "Nahavaq"}, ["snu"] = {"Senggi", "Viid"}, ["snv"] = {"Sa'ban"}, ["snw"] = {"Selee"}, ["snx"] = {"Sam"}, ["sny"] = {"Saniyo-Hiyewe"}, ["snz"] = {"Kou"}, ["soa"] = {"Thai Song"}, ["sob"] = {"Sobei"}, ["soc"] = {"So (Democratic Republic of Congo)"}, ["sod"] = {"Songoora"}, ["soe"] = {"Songomeno"}, ["sog"] = {"Sogdian"}, ["soh"] = {"Aka"}, ["soi"] = {"Sonha"}, ["soj"] = {"Soi"}, ["sok"] = {"Sokoro"}, ["sol"] = {"Solos"}, ["son"] = {"Songhai languages"}, ["soo"] = {"Songo"}, ["sop"] = {"Songe"}, ["soq"] = {"Kanasi"}, ["sor"] = {"Somrai"}, ["sos"] = {"Seeku"}, ["sou"] = {"Southern Thai"}, ["sov"] = {"Sonsorol"}, ["sow"] = {"Sowanda"}, ["sox"] = {"Swo"}, ["soy"] = {"Miyobe"}, ["soz"] = {"Temi"}, ["spb"] = {"Sepa (Indonesia)"}, ["spc"] = {"Sapé"}, ["spd"] = {"Saep"}, ["spe"] = {"Sepa (Papua New Guinea)"}, ["spg"] = {"Sian"}, ["spi"] = {"Saponi"}, ["spk"] = {"Sengo"}, ["spl"] = {"Selepet"}, ["spm"] = {"Akukem"}, ["spn"] = {"Sanapaná"}, ["spo"] = {"Spokane"}, ["spp"] = {"Supyire Senoufo"}, ["spq"] = {"Loreto-Ucayali Spanish"}, ["spr"] = {"Saparua"}, ["sps"] = {"Saposa"}, ["spt"] = {"Spiti Bhoti"}, ["spu"] = {"Sapuan"}, ["spv"] = {"Sambalpuri", "Kosli"}, ["spx"] = {"South Picene"}, ["spy"] = {"Sabaot"}, ["sqa"] = {"Shama-Sambuga"}, ["sqh"] = {"Shau"}, ["sqj"] = {"Albanian languages"}, ["sqk"] = {"Albanian Sign Language"}, ["sqm"] = {"Suma"}, ["sqn"] = {"Susquehannock"}, ["sqo"] = {"Sorkhei"}, ["sqq"] = {"Sou"}, ["sqr"] = {"Siculo Arabic"}, ["sqs"] = {"Sri Lankan Sign Language"}, ["sqt"] = {"Soqotri"}, ["squ"] = {"Squamish"}, ["sqx"] = {"Kufr Qassem Sign Language (KQSL)"}, ["sra"] = {"Saruga"}, ["srb"] = {"Sora"}, ["src"] = {"Logudorese Sardinian"}, ["sre"] = {"Sara"}, ["srf"] = {"Nafi"}, ["srg"] = {"Sulod"}, ["srh"] = {"Sarikoli"}, ["sri"] = {"Siriano"}, ["srk"] = {"Serudung Murut"}, ["srl"] = {"Isirawa"}, ["srm"] = {"Saramaccan"}, ["srn"] = {"Sranan Tongo"}, ["sro"] = {"Campidanese Sardinian"}, ["srq"] = {"Sirionó"}, ["srr"] = {"Serer"}, ["srs"] = {"Sarsi"}, ["srt"] = {"Sauri"}, ["sru"] = {"Suruí"}, ["srv"] = {"Southern Sorsoganon"}, ["srw"] = {"Serua"}, ["srx"] = {"Sirmauri"}, ["sry"] = {"Sera"}, ["srz"] = {"Shahmirzadi"}, ["ssa"] = {"Nilo-Saharan languages"}, ["ssb"] = {"Southern Sama"}, ["ssc"] = {"Suba-Simbiti"}, ["ssd"] = {"Siroi"}, ["sse"] = {"Balangingi", "Bangingih Sama"}, ["ssf"] = {"Thao"}, ["ssg"] = {"Seimat"}, ["ssh"] = {"Shihhi Arabic"}, ["ssi"] = {"Sansi"}, ["ssj"] = {"Sausi"}, ["ssk"] = {"Sunam"}, ["ssl"] = {"Western Sisaala"}, ["ssm"] = {"Semnam"}, ["ssn"] = {"Waata"}, ["sso"] = {"Sissano"}, ["ssp"] = {"Spanish Sign Language"}, ["ssq"] = {"So'a"}, ["ssr"] = {"Swiss-French Sign Language"}, ["sss"] = {"Sô"}, ["sst"] = {"Sinasina"}, ["ssu"] = {"Susuami"}, ["ssv"] = {"Shark Bay"}, ["ssx"] = {"Samberigi"}, ["ssy"] = {"Saho"}, ["ssz"] = {"Sengseng"}, ["sta"] = {"Settla"}, ["stb"] = {"Northern Subanen"}, ["std"] = {"Sentinel"}, ["ste"] = {"Liana-Seti"}, ["stf"] = {"Seta"}, ["stg"] = {"Trieng"}, ["sth"] = {"Shelta"}, ["sti"] = {"Bulo Stieng"}, ["stj"] = {"Matya Samo"}, ["stk"] = {"Arammba"}, ["stl"] = {"Stellingwerfs"}, ["stm"] = {"Setaman"}, ["stn"] = {"Owa"}, ["sto"] = {"Stoney"}, ["stp"] = {"Southeastern Tepehuan"}, ["stq"] = {"Saterfriesisch"}, ["str"] = {"Straits Salish"}, ["sts"] = {"Shumashti"}, ["stt"] = {"Budeh Stieng"}, ["stu"] = {"Samtao"}, ["stv"] = {"Silt'e"}, ["stw"] = {"Satawalese"}, ["sty"] = {"Siberian Tatar"}, ["sua"] = {"Sulka"}, ["sub"] = {"Suku"}, ["suc"] = {"Western Subanon"}, ["sue"] = {"Suena"}, ["sug"] = {"Suganga"}, ["sui"] = {"Suki"}, ["suj"] = {"Shubi"}, ["suk"] = {"Sukuma"}, ["suo"] = {"Bouni"}, ["suq"] = {"Tirmaga-Chai Suri", "Suri"}, ["sur"] = {"Mwaghavul"}, ["sus"] = {"Susu"}, ["sut"] = {"Subtiaba"}, ["suv"] = {"Puroik"}, ["suw"] = {"Sumbwa"}, ["sux"] = {"Sumerian"}, ["suy"] = {"Suyá"}, ["suz"] = {"Sunwar"}, ["sva"] = {"Svan"}, ["svb"] = {"Ulau-Suain"}, ["svc"] = {"Vincentian Creole English"}, ["sve"] = {"Serili"}, ["svk"] = {"Slovakian Sign Language"}, ["svm"] = {"Slavomolisano"}, ["svs"] = {"Savosavo"}, ["svx"] = {"Skalvian"}, ["swb"] = {"Maore Comorian"}, ["swc"] = {"Congo Swahili"}, ["swf"] = {"Sere"}, ["swg"] = {"Swabian"}, ["swh"] = {"Swahili (individual language)", "Kiswahili"}, ["swi"] = {"Sui"}, ["swj"] = {"Sira"}, ["swk"] = {"Malawi Sena"}, ["swl"] = {"Swedish Sign Language"}, ["swm"] = {"Samosa"}, ["swn"] = {"Sawknah"}, ["swo"] = {"Shanenawa"}, ["swp"] = {"Suau"}, ["swq"] = {"Sharwa"}, ["swr"] = {"Saweru"}, ["sws"] = {"Seluwasan"}, ["swt"] = {"Sawila"}, ["swu"] = {"Suwawa"}, ["swv"] = {"Shekhawati"}, ["sww"] = {"Sowa"}, ["swx"] = {"Suruahá"}, ["swy"] = {"Sarua"}, ["sxb"] = {"Suba"}, ["sxc"] = {"Sicanian"}, ["sxe"] = {"Sighu"}, ["sxg"] = {"Shuhi", "Shixing"}, ["sxk"] = {"Southern Kalapuya"}, ["sxl"] = {"Selian"}, ["sxm"] = {"Samre"}, ["sxn"] = {"Sangir"}, ["sxo"] = {"Sorothaptic"}, ["sxr"] = {"Saaroa"}, ["sxs"] = {"Sasaru"}, ["sxu"] = {"Upper Saxon"}, ["sxw"] = {"Saxwe Gbe"}, ["sya"] = {"Siang"}, ["syb"] = {"Central Subanen"}, ["syc"] = {"Classical Syriac"}, ["syd"] = {"Samoyedic languages"}, ["syi"] = {"Seki"}, ["syk"] = {"Sukur"}, ["syl"] = {"Sylheti"}, ["sym"] = {"Maya Samo"}, ["syn"] = {"Senaya"}, ["syo"] = {"Suoy"}, ["syr"] = {"Syriac"}, ["sys"] = {"Sinyar"}, ["syw"] = {"Kagate"}, ["syx"] = {"Samay"}, ["syy"] = {"Al-Sayyid Bedouin Sign Language"}, ["sza"] = {"Semelai"}, ["szb"] = {"Ngalum"}, ["szc"] = {"Semaq Beri"}, ["sze"] = {"Seze"}, ["szg"] = {"Sengele"}, ["szl"] = {"Silesian"}, ["szn"] = {"Sula"}, ["szp"] = {"Suabo"}, ["szs"] = {"Solomon Islands Sign Language"}, ["szv"] = {"Isu (Fako Division)"}, ["szw"] = {"Sawai"}, ["szy"] = {"Sakizaya"}, ["taa"] = {"Lower Tanana"}, ["tab"] = {"Tabassaran"}, ["tac"] = {"Lowland Tarahumara"}, ["tad"] = {"Tause"}, ["tae"] = {"Tariana"}, ["taf"] = {"Tapirapé"}, ["tag"] = {"Tagoi"}, ["tai"] = {"Tai languages"}, ["taj"] = {"Eastern Tamang"}, ["tak"] = {"Tala"}, ["tal"] = {"Tal"}, ["tan"] = {"Tangale"}, ["tao"] = {"Yami"}, ["tap"] = {"Taabwa"}, ["taq"] = {"Tamasheq"}, ["tar"] = {"Central Tarahumara"}, ["tas"] = {"Tay Boi"}, ["tau"] = {"Upper Tanana"}, ["tav"] = {"Tatuyo"}, ["taw"] = {"Tai"}, ["tax"] = {"Tamki"}, ["tay"] = {"Atayal"}, ["taz"] = {"Tocho"}, ["tba"] = {"Aikanã"}, ["tbc"] = {"Takia"}, ["tbd"] = {"Kaki Ae"}, ["tbe"] = {"Tanimbili"}, ["tbf"] = {"Mandara"}, ["tbg"] = {"North Tairora"}, ["tbh"] = {"Dharawal", "Thurawal"}, ["tbi"] = {"Gaam"}, ["tbj"] = {"Tiang"}, ["tbk"] = {"Calamian Tagbanwa"}, ["tbl"] = {"Tboli"}, ["tbm"] = {"Tagbu"}, ["tbn"] = {"Barro Negro Tunebo"}, ["tbo"] = {"Tawala"}, ["tbp"] = {"Taworta", "Diebroud"}, ["tbq"] = {"Tibeto-Burman languages"}, ["tbr"] = {"Tumtum"}, ["tbs"] = {"Tanguat"}, ["tbt"] = {"Tembo (Kitembo)"}, ["tbu"] = {"Tubar"}, ["tbv"] = {"Tobo"}, ["tbw"] = {"Tagbanwa"}, ["tbx"] = {"Kapin"}, ["tby"] = {"Tabaru"}, ["tbz"] = {"Ditammari"}, ["tca"] = {"Ticuna"}, ["tcb"] = {"Tanacross"}, ["tcc"] = {"Datooga"}, ["tcd"] = {"Tafi"}, ["tce"] = {"Southern Tutchone"}, ["tcf"] = {"Malinaltepec Me'phaa", "Malinaltepec Tlapanec"}, ["tcg"] = {"Tamagario"}, ["tch"] = {"Turks And Caicos Creole English"}, ["tci"] = {"Wára"}, ["tck"] = {"Tchitchege"}, ["tcl"] = {"Taman (Myanmar)"}, ["tcm"] = {"Tanahmerah"}, ["tcn"] = {"Tichurong"}, ["tco"] = {"Taungyo"}, ["tcp"] = {"Tawr Chin"}, ["tcq"] = {"Kaiy"}, ["tcs"] = {"Torres Strait Creole", "Yumplatok"}, ["tct"] = {"T'en"}, ["tcu"] = {"Southeastern Tarahumara"}, ["tcw"] = {"Tecpatlán Totonac"}, ["tcx"] = {"Toda"}, ["tcy"] = {"Tulu"}, ["tcz"] = {"Thado Chin"}, ["tda"] = {"Tagdal"}, ["tdb"] = {"Panchpargania"}, ["tdc"] = {"Emberá-Tadó"}, ["tdd"] = {"Tai Nüa"}, ["tde"] = {"Tiranige Diga Dogon"}, ["tdf"] = {"Talieng"}, ["tdg"] = {"Western Tamang"}, ["tdh"] = {"Thulung"}, ["tdi"] = {"Tomadino"}, ["tdj"] = {"Tajio"}, ["tdk"] = {"Tambas"}, ["tdl"] = {"Sur"}, ["tdm"] = {"Taruma"}, ["tdn"] = {"Tondano"}, ["tdo"] = {"Teme"}, ["tdq"] = {"Tita"}, ["tdr"] = {"Todrah"}, ["tds"] = {"Doutai"}, ["tdt"] = {"Tetun Dili"}, ["tdv"] = {"Toro"}, ["tdx"] = {"Tandroy-Mahafaly Malagasy"}, ["tdy"] = {"Tadyawan"}, ["tea"] = {"Temiar"}, ["teb"] = {"Tetete"}, ["tec"] = {"Terik"}, ["ted"] = {"Tepo Krumen"}, ["tee"] = {"Huehuetla Tepehua"}, ["tef"] = {"Teressa"}, ["teg"] = {"Teke-Tege"}, ["teh"] = {"Tehuelche"}, ["tei"] = {"Torricelli"}, ["tek"] = {"Ibali Teke"}, ["tem"] = {"Timne"}, ["ten"] = {"Tama (Colombia)"}, ["teo"] = {"Teso"}, ["tep"] = {"Tepecano"}, ["teq"] = {"Temein"}, ["ter"] = {"Tereno"}, ["tes"] = {"Tengger"}, ["tet"] = {"Tetum"}, ["teu"] = {"Soo"}, ["tev"] = {"Teor"}, ["tew"] = {"Tewa (USA)"}, ["tex"] = {"Tennet"}, ["tey"] = {"Tulishi"}, ["tez"] = {"Tetserret"}, ["tfi"] = {"Tofin Gbe"}, ["tfn"] = {"Tanaina"}, ["tfo"] = {"Tefaro"}, ["tfr"] = {"Teribe"}, ["tft"] = {"Ternate"}, ["tga"] = {"Sagalla"}, ["tgb"] = {"Tobilung"}, ["tgc"] = {"Tigak"}, ["tgd"] = {"Ciwogai"}, ["tge"] = {"Eastern Gorkha Tamang"}, ["tgf"] = {"Chalikha"}, ["tgh"] = {"Tobagonian Creole English"}, ["tgi"] = {"Lawunuia"}, ["tgj"] = {"Tagin"}, ["tgn"] = {"Tandaganon"}, ["tgo"] = {"Sudest"}, ["tgp"] = {"Tangoa"}, ["tgq"] = {"Tring"}, ["tgr"] = {"Tareng"}, ["tgs"] = {"Nume"}, ["tgt"] = {"Central Tagbanwa"}, ["tgu"] = {"Tanggu"}, ["tgv"] = {"Tingui-Boto"}, ["tgw"] = {"Tagwana Senoufo"}, ["tgx"] = {"Tagish"}, ["tgy"] = {"Togoyo"}, ["tgz"] = {"Tagalaka"}, ["thd"] = {"Kuuk Thaayorre", "Thayore"}, ["the"] = {"Chitwania Tharu"}, ["thf"] = {"Thangmi"}, ["thh"] = {"Northern Tarahumara"}, ["thi"] = {"Tai Long"}, ["thk"] = {"Tharaka", "Kitharaka"}, ["thl"] = {"Dangaura Tharu"}, ["thm"] = {"Aheu"}, ["thn"] = {"Thachanadan"}, ["thp"] = {"Thompson"}, ["thq"] = {"Kochila Tharu"}, ["thr"] = {"Rana Tharu"}, ["ths"] = {"Thakali"}, ["tht"] = {"Tahltan"}, ["thu"] = {"Thuri"}, ["thv"] = {"Tahaggart Tamahaq"}, ["thy"] = {"Tha"}, ["thz"] = {"Tayart Tamajeq"}, ["tia"] = {"Tidikelt Tamazight"}, ["tic"] = {"Tira"}, ["tif"] = {"Tifal"}, ["tig"] = {"Tigre"}, ["tih"] = {"Timugon Murut"}, ["tii"] = {"Tiene"}, ["tij"] = {"Tilung"}, ["tik"] = {"Tikar"}, ["til"] = {"Tillamook"}, ["tim"] = {"Timbe"}, ["tin"] = {"Tindi"}, ["tio"] = {"Teop"}, ["tip"] = {"Trimuris"}, ["tiq"] = {"Tiéfo"}, ["tis"] = {"Masadiit Itneg"}, ["tit"] = {"Tinigua"}, ["tiu"] = {"Adasen"}, ["tiv"] = {"Tiv"}, ["tiw"] = {"Tiwi"}, ["tix"] = {"Southern Tiwa"}, ["tiy"] = {"Tiruray"}, ["tiz"] = {"Tai Hongjin"}, ["tja"] = {"Tajuasohn"}, ["tjg"] = {"Tunjung"}, ["tji"] = {"Northern Tujia"}, ["tjj"] = {"Tjungundji"}, ["tjl"] = {"Tai Laing"}, ["tjm"] = {"Timucua"}, ["tjn"] = {"Tonjon"}, ["tjo"] = {"Temacine Tamazight"}, ["tjp"] = {"Tjupany"}, ["tjs"] = {"Southern Tujia"}, ["tju"] = {"Tjurruru"}, ["tjw"] = {"Djabwurrung"}, ["tka"] = {"Truká"}, ["tkb"] = {"Buksa"}, ["tkd"] = {"Tukudede"}, ["tke"] = {"Takwane"}, ["tkf"] = {"Tukumanféd"}, ["tkg"] = {"Tesaka Malagasy"}, ["tkl"] = {"Tokelau"}, ["tkm"] = {"Takelma"}, ["tkn"] = {"Toku-No-Shima"}, ["tkp"] = {"Tikopia"}, ["tkq"] = {"Tee"}, ["tkr"] = {"Tsakhur"}, ["tks"] = {"Takestani"}, ["tkt"] = {"Kathoriya Tharu"}, ["tku"] = {"Upper Necaxa Totonac"}, ["tkv"] = {"Mur Pano"}, ["tkw"] = {"Teanu"}, ["tkx"] = {"Tangko"}, ["tkz"] = {"Takua"}, ["tla"] = {"Southwestern Tepehuan"}, ["tlb"] = {"Tobelo"}, ["tlc"] = {"Yecuatla Totonac"}, ["tld"] = {"Talaud"}, ["tlf"] = {"Telefol"}, ["tlg"] = {"Tofanma"}, ["tlh"] = {"Klingon", "tlhIngan Hol"}, ["tli"] = {"Tlingit"}, ["tlj"] = {"Talinga-Bwisi"}, ["tlk"] = {"Taloki"}, ["tll"] = {"Tetela"}, ["tlm"] = {"Tolomako"}, ["tln"] = {"Talondo'"}, ["tlo"] = {"Talodi"}, ["tlp"] = {"Filomena Mata-Coahuitlán Totonac"}, ["tlq"] = {"Tai Loi"}, ["tlr"] = {"Talise"}, ["tls"] = {"Tambotalo"}, ["tlt"] = {"Sou Nama", "Teluti"}, ["tlu"] = {"Tulehu"}, ["tlv"] = {"Taliabu"}, ["tlx"] = {"Khehek"}, ["tly"] = {"Talysh"}, ["tma"] = {"Tama (Chad)"}, ["tmb"] = {"Katbol", "Avava"}, ["tmc"] = {"Tumak"}, ["tmd"] = {"Haruai"}, ["tme"] = {"Tremembé"}, ["tmf"] = {"Toba-Maskoy"}, ["tmg"] = {"Ternateño"}, ["tmh"] = {"Tamashek"}, ["tmi"] = {"Tutuba"}, ["tmj"] = {"Samarokena"}, ["tml"] = {"Tamnim Citak"}, ["tmm"] = {"Tai Thanh"}, ["tmn"] = {"Taman (Indonesia)"}, ["tmo"] = {"Temoq"}, ["tmq"] = {"Tumleo"}, ["tmr"] = {"Jewish Babylonian Aramaic (ca. 200-1200 CE)"}, ["tms"] = {"Tima"}, ["tmt"] = {"Tasmate"}, ["tmu"] = {"Iau"}, ["tmv"] = {"Tembo (Motembo)"}, ["tmw"] = {"Temuan"}, ["tmy"] = {"Tami"}, ["tmz"] = {"Tamanaku"}, ["tna"] = {"Tacana"}, ["tnb"] = {"Western Tunebo"}, ["tnc"] = {"Tanimuca-Retuarã"}, ["tnd"] = {"Angosturas Tunebo"}, ["tng"] = {"Tobanga"}, ["tnh"] = {"Maiani"}, ["tni"] = {"Tandia"}, ["tnk"] = {"Kwamera"}, ["tnl"] = {"Lenakel"}, ["tnm"] = {"Tabla"}, ["tnn"] = {"North Tanna"}, ["tno"] = {"Toromono"}, ["tnp"] = {"Whitesands"}, ["tnq"] = {"Taino"}, ["tnr"] = {"Ménik"}, ["tns"] = {"Tenis"}, ["tnt"] = {"Tontemboan"}, ["tnu"] = {"Tay Khang"}, ["tnv"] = {"Tangchangya"}, ["tnw"] = {"Tonsawang"}, ["tnx"] = {"Tanema"}, ["tny"] = {"Tongwe"}, ["tnz"] = {"Ten'edn"}, ["tob"] = {"Toba"}, ["toc"] = {"Coyutla Totonac"}, ["tod"] = {"Toma"}, ["tof"] = {"Gizrra"}, ["tog"] = {"Tonga (Nyasa)"}, ["toh"] = {"Gitonga"}, ["toi"] = {"Tonga (Zambia)"}, ["toj"] = {"Tojolabal"}, ["tok"] = {"Toki Pona"}, ["tol"] = {"Tolowa"}, ["tom"] = {"Tombulu"}, ["too"] = {"Xicotepec De Juárez Totonac"}, ["top"] = {"Papantla Totonac"}, ["toq"] = {"Toposa"}, ["tor"] = {"Togbo-Vara Banda"}, ["tos"] = {"Highland Totonac"}, ["tou"] = {"Tho"}, ["tov"] = {"Upper Taromi"}, ["tow"] = {"Jemez"}, ["tox"] = {"Tobian"}, ["toy"] = {"Topoiyo"}, ["toz"] = {"To"}, ["tpa"] = {"Taupota"}, ["tpc"] = {"Azoyú Me'phaa", "Azoyú Tlapanec"}, ["tpe"] = {"Tippera"}, ["tpf"] = {"Tarpia"}, ["tpg"] = {"Kula"}, ["tpi"] = {"Tok Pisin"}, ["tpj"] = {"Tapieté"}, ["tpk"] = {"Tupinikin"}, ["tpl"] = {"Tlacoapa Me'phaa", "Tlacoapa Tlapanec"}, ["tpm"] = {"Tampulma"}, ["tpn"] = {"Tupinambá"}, ["tpo"] = {"Tai Pao"}, ["tpp"] = {"Pisaflores Tepehua"}, ["tpq"] = {"Tukpa"}, ["tpr"] = {"Tuparí"}, ["tpt"] = {"Tlachichilco Tepehua"}, ["tpu"] = {"Tampuan"}, ["tpv"] = {"Tanapag"}, ["tpx"] = {"Acatepec Me'phaa", "Acatepec Tlapanec"}, ["tpy"] = {"Trumai"}, ["tpz"] = {"Tinputz"}, ["tqb"] = {"Tembé"}, ["tql"] = {"Lehali"}, ["tqm"] = {"Turumsa"}, ["tqn"] = {"Tenino"}, ["tqo"] = {"Toaripi"}, ["tqp"] = {"Tomoip"}, ["tqq"] = {"Tunni"}, ["tqr"] = {"Torona"}, ["tqt"] = {"Western Totonac"}, ["tqu"] = {"Touo"}, ["tqw"] = {"Tonkawa"}, ["tra"] = {"Tirahi"}, ["trb"] = {"Terebu"}, ["trc"] = {"Copala Triqui"}, ["trd"] = {"Turi"}, ["tre"] = {"East Tarangan"}, ["trf"] = {"Trinidadian Creole English"}, ["trg"] = {"Lishán Didán"}, ["trh"] = {"Turaka"}, ["tri"] = {"Trió"}, ["trj"] = {"Toram"}, ["trk"] = {"Turkic languages"}, ["trl"] = {"Traveller Scottish"}, ["trm"] = {"Tregami"}, ["trn"] = {"Trinitario"}, ["tro"] = {"Tarao Naga"}, ["trp"] = {"Kok Borok"}, ["trq"] = {"San Martín Itunyoso Triqui"}, ["trr"] = {"Taushiro"}, ["trs"] = {"Chicahuaxtla Triqui"}, ["trt"] = {"Tunggare"}, ["tru"] = {"Turoyo", "Surayt"}, ["trv"] = {"Sediq", "Seediq", "Taroko"}, ["trw"] = {"Torwali"}, ["trx"] = {"Tringgus-Sembaan Bidayuh"}, ["try"] = {"Turung"}, ["trz"] = {"Torá"}, ["tsa"] = {"Tsaangi"}, ["tsb"] = {"Tsamai"}, ["tsc"] = {"Tswa"}, ["tsd"] = {"Tsakonian"}, ["tse"] = {"Tunisian Sign Language"}, ["tsg"] = {"Tausug"}, ["tsh"] = {"Tsuvan"}, ["tsi"] = {"Tsimshian"}, ["tsj"] = {"Tshangla"}, ["tsk"] = {"Tseku"}, ["tsl"] = {"Ts'ün-Lao"}, ["tsm"] = {"Turkish Sign Language", "Türk İşaret Dili"}, ["tsp"] = {"Northern Toussian"}, ["tsq"] = {"Thai Sign Language"}, ["tsr"] = {"Akei"}, ["tss"] = {"Taiwan Sign Language"}, ["tst"] = {"Tondi Songway Kiini"}, ["tsu"] = {"Tsou"}, ["tsv"] = {"Tsogo"}, ["tsw"] = {"Tsishingini"}, ["tsx"] = {"Mubami"}, ["tsy"] = {"Tebul Sign Language"}, ["tsz"] = {"Purepecha"}, ["tta"] = {"Tutelo"}, ["ttb"] = {"Gaa"}, ["ttc"] = {"Tektiteko"}, ["ttd"] = {"Tauade"}, ["tte"] = {"Bwanabwana"}, ["ttf"] = {"Tuotomb"}, ["ttg"] = {"Tutong"}, ["tth"] = {"Upper Ta'oih"}, ["tti"] = {"Tobati"}, ["ttj"] = {"Tooro"}, ["ttk"] = {"Totoro"}, ["ttl"] = {"Totela"}, ["ttm"] = {"Northern Tutchone"}, ["ttn"] = {"Towei"}, ["tto"] = {"Lower Ta'oih"}, ["ttp"] = {"Tombelala"}, ["ttq"] = {"Tawallammat Tamajaq"}, ["ttr"] = {"Tera"}, ["tts"] = {"Northeastern Thai"}, ["ttt"] = {"Muslim Tat"}, ["ttu"] = {"Torau"}, ["ttv"] = {"Titan"}, ["ttw"] = {"Long Wat"}, ["tty"] = {"Sikaritai"}, ["ttz"] = {"Tsum"}, ["tua"] = {"Wiarumus"}, ["tub"] = {"Tübatulabal"}, ["tuc"] = {"Mutu"}, ["tud"] = {"Tuxá"}, ["tue"] = {"Tuyuca"}, ["tuf"] = {"Central Tunebo"}, ["tug"] = {"Tunia"}, ["tuh"] = {"Taulil"}, ["tui"] = {"Tupuri"}, ["tuj"] = {"Tugutil"}, ["tul"] = {"Tula"}, ["tum"] = {"Tumbuka"}, ["tun"] = {"Tunica"}, ["tuo"] = {"Tucano"}, ["tup"] = {"Tupi languages"}, ["tuq"] = {"Tedaga"}, ["tus"] = {"Tuscarora"}, ["tut"] = {"Altaic languages"}, ["tuu"] = {"Tututni"}, ["tuv"] = {"Turkana"}, ["tuw"] = {"Tungus languages"}, ["tux"] = {"Tuxináwa"}, ["tuy"] = {"Tugen"}, ["tuz"] = {"Turka"}, ["tva"] = {"Vaghua"}, ["tvd"] = {"Tsuvadi"}, ["tve"] = {"Te'un"}, ["tvi"] = {"Tulai"}, ["tvk"] = {"Southeast Ambrym"}, ["tvl"] = {"Tuvalu"}, ["tvm"] = {"Tela-Masbuar"}, ["tvn"] = {"Tavoyan"}, ["tvo"] = {"Tidore"}, ["tvs"] = {"Taveta"}, ["tvt"] = {"Tutsa Naga"}, ["tvu"] = {"Tunen"}, ["tvw"] = {"Sedoa"}, ["tvx"] = {"Taivoan"}, ["tvy"] = {"Timor Pidgin"}, ["twa"] = {"Twana"}, ["twb"] = {"Western Tawbuid"}, ["twc"] = {"Teshenawa"}, ["twd"] = {"Twents"}, ["twe"] = {"Tewa (Indonesia)"}, ["twf"] = {"Northern Tiwa"}, ["twg"] = {"Tereweng"}, ["twh"] = {"Tai Dón"}, ["twl"] = {"Tawara"}, ["twm"] = {"Tawang Monpa"}, ["twn"] = {"Twendi"}, ["two"] = {"Tswapong"}, ["twp"] = {"Ere"}, ["twq"] = {"Tasawaq"}, ["twr"] = {"Southwestern Tarahumara"}, ["twt"] = {"Turiwára"}, ["twu"] = {"Termanu"}, ["tww"] = {"Tuwari"}, ["twx"] = {"Tewe"}, ["twy"] = {"Tawoyan"}, ["txa"] = {"Tombonuo"}, ["txb"] = {"Tokharian B"}, ["txc"] = {"Tsetsaut"}, ["txe"] = {"Totoli"}, ["txg"] = {"Tangut"}, ["txh"] = {"Thracian"}, ["txi"] = {"Ikpeng"}, ["txj"] = {"Tarjumo"}, ["txm"] = {"Tomini"}, ["txn"] = {"West Tarangan"}, ["txo"] = {"Toto"}, ["txq"] = {"Tii"}, ["txr"] = {"Tartessian"}, ["txs"] = {"Tonsea"}, ["txt"] = {"Citak"}, ["txu"] = {"Kayapó"}, ["txx"] = {"Tatana"}, ["txy"] = {"Tanosy Malagasy"}, ["tya"] = {"Tauya"}, ["tye"] = {"Kyanga"}, ["tyh"] = {"O'du"}, ["tyi"] = {"Teke-Tsaayi"}, ["tyj"] = {"Tai Do", "Tai Yo"}, ["tyl"] = {"Thu Lao"}, ["tyn"] = {"Kombai"}, ["typ"] = {"Thaypan"}, ["tyr"] = {"Tai Daeng"}, ["tys"] = {"Tày Sa Pa"}, ["tyt"] = {"Tày Tac"}, ["tyu"] = {"Kua"}, ["tyv"] = {"Tuvinian"}, ["tyx"] = {"Teke-Tyee"}, ["tyy"] = {"Tiyaa"}, ["tyz"] = {"Tày"}, ["tza"] = {"Tanzanian Sign Language"}, ["tzh"] = {"Tzeltal"}, ["tzj"] = {"Tz'utujil"}, ["tzl"] = {"Talossan"}, ["tzm"] = {"Central Atlas Tamazight"}, ["tzn"] = {"Tugun"}, ["tzo"] = {"Tzotzil"}, ["tzx"] = {"Tabriak"}, ["uam"] = {"Uamué"}, ["uan"] = {"Kuan"}, ["uar"] = {"Tairuma"}, ["uba"] = {"Ubang"}, ["ubi"] = {"Ubi"}, ["ubl"] = {"Buhi'non Bikol"}, ["ubr"] = {"Ubir"}, ["ubu"] = {"Umbu-Ungu"}, ["uby"] = {"Ubykh"}, ["uda"] = {"Uda"}, ["ude"] = {"Udihe"}, ["udg"] = {"Muduga"}, ["udi"] = {"Udi"}, ["udj"] = {"Ujir"}, ["udl"] = {"Wuzlam"}, ["udm"] = {"Udmurt"}, ["udu"] = {"Uduk"}, ["ues"] = {"Kioko"}, ["ufi"] = {"Ufim"}, ["uga"] = {"Ugaritic"}, ["ugb"] = {"Kuku-Ugbanh"}, ["uge"] = {"Ughele"}, ["ugh"] = {"Kubachi"}, ["ugn"] = {"Ugandan Sign Language"}, ["ugo"] = {"Ugong"}, ["ugy"] = {"Uruguayan Sign Language"}, ["uha"] = {"Uhami"}, ["uhn"] = {"Damal"}, ["uis"] = {"Uisai"}, ["uiv"] = {"Iyive"}, ["uji"] = {"Tanjijili"}, ["uka"] = {"Kaburi"}, ["ukg"] = {"Ukuriguma"}, ["ukh"] = {"Ukhwejo"}, ["uki"] = {"Kui (India)"}, ["ukk"] = {"Muak Sa-aak"}, ["ukl"] = {"Ukrainian Sign Language"}, ["ukp"] = {"Ukpe-Bayobiri"}, ["ukq"] = {"Ukwa"}, ["uks"] = {"Urubú-Kaapor Sign Language", "Kaapor Sign Language"}, ["uku"] = {"Ukue"}, ["ukv"] = {"Kuku"}, ["ukw"] = {"Ukwuani-Aboh-Ndoni"}, ["uky"] = {"Kuuk-Yak"}, ["ula"] = {"Fungwa"}, ["ulb"] = {"Ulukwumi"}, ["ulc"] = {"Ulch"}, ["ule"] = {"Lule"}, ["ulf"] = {"Usku", "Afra"}, ["uli"] = {"Ulithian"}, ["ulk"] = {"Meriam Mir"}, ["ull"] = {"Ullatan"}, ["ulm"] = {"Ulumanda'"}, ["uln"] = {"Unserdeutsch"}, ["ulu"] = {"Uma' Lung"}, ["ulw"] = {"Ulwa"}, ["uly"] = {"Buli"}, ["uma"] = {"Umatilla"}, ["umb"] = {"Umbundu"}, ["umc"] = {"Marrucinian"}, ["umd"] = {"Umbindhamu"}, ["umg"] = {"Morrobalama", "Umbuygamu"}, ["umi"] = {"Ukit"}, ["umm"] = {"Umon"}, ["umn"] = {"Makyan Naga"}, ["umo"] = {"Umotína"}, ["ump"] = {"Umpila"}, ["umr"] = {"Umbugarla"}, ["ums"] = {"Pendau"}, ["umu"] = {"Munsee"}, ["una"] = {"North Watut"}, ["und"] = {"Undetermined"}, ["une"] = {"Uneme"}, ["ung"] = {"Ngarinyin"}, ["uni"] = {"Uni"}, ["unk"] = {"Enawené-Nawé"}, ["unm"] = {"Unami"}, ["unn"] = {"Kurnai"}, ["unr"] = {"Mundari"}, ["unu"] = {"Unubahe"}, ["unx"] = {"Munda"}, ["unz"] = {"Unde Kaili"}, ["uon"] = {"Kulon"}, ["upi"] = {"Umeda"}, ["upv"] = {"Uripiv-Wala-Rano-Atchin"}, ["ura"] = {"Urarina"}, ["urb"] = {"Urubú-Kaapor", "Kaapor"}, ["urc"] = {"Urningangg"}, ["ure"] = {"Uru"}, ["urf"] = {"Uradhi"}, ["urg"] = {"Urigina"}, ["urh"] = {"Urhobo"}, ["uri"] = {"Urim"}, ["urj"] = {"Uralic languages"}, ["urk"] = {"Urak Lawoi'"}, ["url"] = {"Urali"}, ["urm"] = {"Urapmin"}, ["urn"] = {"Uruangnirin"}, ["uro"] = {"Ura (Papua New Guinea)"}, ["urp"] = {"Uru-Pa-In"}, ["urr"] = {"Lehalurup", "Löyöp"}, ["urt"] = {"Urat"}, ["uru"] = {"Urumi"}, ["urv"] = {"Uruava"}, ["urw"] = {"Sop"}, ["urx"] = {"Urimo"}, ["ury"] = {"Orya"}, ["urz"] = {"Uru-Eu-Wau-Wau"}, ["usa"] = {"Usarufa"}, ["ush"] = {"Ushojo"}, ["usi"] = {"Usui"}, ["usk"] = {"Usaghade"}, ["usp"] = {"Uspanteco"}, ["uss"] = {"us-Saare"}, ["usu"] = {"Uya"}, ["uta"] = {"Otank"}, ["ute"] = {"Ute-Southern Paiute"}, ["uth"] = {"ut-Hun"}, ["utp"] = {"Amba (Solomon Islands)"}, ["utr"] = {"Etulo"}, ["utu"] = {"Utu"}, ["uum"] = {"Urum"}, ["uur"] = {"Ura (Vanuatu)"}, ["uuu"] = {"U"}, ["uve"] = {"West Uvean", "Fagauvea"}, ["uvh"] = {"Uri"}, ["uvl"] = {"Lote"}, ["uwa"] = {"Kuku-Uwanh"}, ["uya"] = {"Doko-Uyanga"}, ["uzn"] = {"Northern Uzbek"}, ["uzs"] = {"Southern Uzbek"}, ["vaa"] = {"Vaagri Booli"}, ["vae"] = {"Vale"}, ["vaf"] = {"Vafsi"}, ["vag"] = {"Vagla"}, ["vah"] = {"Varhadi-Nagpuri"}, ["vai"] = {"Vai"}, ["vaj"] = {"Sekele", "Northwestern ǃKung", "Vasekele"}, ["val"] = {"Vehes"}, ["vam"] = {"Vanimo"}, ["van"] = {"Valman"}, ["vao"] = {"Vao"}, ["vap"] = {"Vaiphei"}, ["var"] = {"Huarijio"}, ["vas"] = {"Vasavi"}, ["vau"] = {"Vanuma"}, ["vav"] = {"Varli"}, ["vay"] = {"Wayu"}, ["vbb"] = {"Southeast Babar"}, ["vbk"] = {"Southwestern Bontok"}, ["vec"] = {"Venetian"}, ["ved"] = {"Veddah"}, ["vel"] = {"Veluws"}, ["vem"] = {"Vemgo-Mabas"}, ["veo"] = {"Ventureño"}, ["vep"] = {"Veps"}, ["ver"] = {"Mom Jango"}, ["vgr"] = {"Vaghri"}, ["vgt"] = {"Vlaamse Gebarentaal", "Flemish Sign Language"}, ["vic"] = {"Virgin Islands Creole English"}, ["vid"] = {"Vidunda"}, ["vif"] = {"Vili"}, ["vig"] = {"Viemo"}, ["vil"] = {"Vilela"}, ["vin"] = {"Vinza"}, ["vis"] = {"Vishavan"}, ["vit"] = {"Viti"}, ["viv"] = {"Iduna"}, ["vjk"] = {"Bajjika"}, ["vka"] = {"Kariyarra"}, ["vkj"] = {"Kujarge"}, ["vkk"] = {"Kaur"}, ["vkl"] = {"Kulisusu"}, ["vkm"] = {"Kamakan"}, ["vkn"] = {"Koro Nulu"}, ["vko"] = {"Kodeoha"}, ["vkp"] = {"Korlai Creole Portuguese"}, ["vkt"] = {"Tenggarong Kutai Malay"}, ["vku"] = {"Kurrama"}, ["vkz"] = {"Koro Zuba"}, ["vlp"] = {"Valpei"}, ["vls"] = {"Vlaams"}, ["vma"] = {"Martuyhunira"}, ["vmb"] = {"Barbaram"}, ["vmc"] = {"Juxtlahuaca Mixtec"}, ["vmd"] = {"Mudu Koraga"}, ["vme"] = {"East Masela"}, ["vmf"] = {"Mainfränkisch"}, ["vmg"] = {"Lungalunga"}, ["vmh"] = {"Maraghei"}, ["vmi"] = {"Miwa"}, ["vmj"] = {"Ixtayutla Mixtec"}, ["vmk"] = {"Makhuwa-Shirima"}, ["vml"] = {"Malgana"}, ["vmm"] = {"Mitlatongo Mixtec"}, ["vmp"] = {"Soyaltepec Mazatec"}, ["vmq"] = {"Soyaltepec Mixtec"}, ["vmr"] = {"Marenje"}, ["vms"] = {"Moksela"}, ["vmu"] = {"Muluridyi"}, ["vmv"] = {"Valley Maidu"}, ["vmw"] = {"Makhuwa"}, ["vmx"] = {"Tamazola Mixtec"}, ["vmy"] = {"Ayautla Mazatec"}, ["vmz"] = {"Mazatlán Mazatec"}, ["vnk"] = {"Vano", "Lovono"}, ["vnm"] = {"Vinmavis", "Neve'ei"}, ["vnp"] = {"Vunapu"}, ["vor"] = {"Voro"}, ["vot"] = {"Votic"}, ["vra"] = {"Vera'a"}, ["vro"] = {"Võro"}, ["vrs"] = {"Varisi"}, ["vrt"] = {"Burmbar", "Banam Bay"}, ["vsi"] = {"Moldova Sign Language"}, ["vsl"] = {"Venezuelan Sign Language"}, ["vsv"] = {"Valencian Sign Language", "Llengua de signes valenciana"}, ["vto"] = {"Vitou"}, ["vum"] = {"Vumbu"}, ["vun"] = {"Vunjo"}, ["vut"] = {"Vute"}, ["vwa"] = {"Awa (China)"}, ["waa"] = {"Walla Walla"}, ["wab"] = {"Wab"}, ["wac"] = {"Wasco-Wishram"}, ["wad"] = {"Wamesa", "Wondama"}, ["wae"] = {"Walser"}, ["waf"] = {"Wakoná"}, ["wag"] = {"Wa'ema"}, ["wah"] = {"Watubela"}, ["wai"] = {"Wares"}, ["waj"] = {"Waffa"}, ["wak"] = {"Wakashan languages"}, ["wal"] = {"Wolaytta", "Wolaitta"}, ["wam"] = {"Wampanoag"}, ["wan"] = {"Wan"}, ["wao"] = {"Wappo"}, ["wap"] = {"Wapishana"}, ["waq"] = {"Wagiman"}, ["war"] = {"Waray (Philippines)"}, ["was"] = {"Washo"}, ["wat"] = {"Kaninuwa"}, ["wau"] = {"Waurá"}, ["wav"] = {"Waka"}, ["waw"] = {"Waiwai"}, ["wax"] = {"Watam", "Marangis"}, ["way"] = {"Wayana"}, ["waz"] = {"Wampur"}, ["wba"] = {"Warao"}, ["wbb"] = {"Wabo"}, ["wbe"] = {"Waritai"}, ["wbf"] = {"Wara"}, ["wbh"] = {"Wanda"}, ["wbi"] = {"Vwanji"}, ["wbj"] = {"Alagwa"}, ["wbk"] = {"Waigali"}, ["wbl"] = {"Wakhi"}, ["wbm"] = {"Wa"}, ["wbp"] = {"Warlpiri"}, ["wbq"] = {"Waddar"}, ["wbr"] = {"Wagdi"}, ["wbs"] = {"West Bengal Sign Language"}, ["wbt"] = {"Warnman"}, ["wbv"] = {"Wajarri"}, ["wbw"] = {"Woi"}, ["wca"] = {"Yanomámi"}, ["wci"] = {"Waci Gbe"}, ["wdd"] = {"Wandji"}, ["wdg"] = {"Wadaginam"}, ["wdj"] = {"Wadjiginy"}, ["wdk"] = {"Wadikali"}, ["wdt"] = {"Wendat"}, ["wdu"] = {"Wadjigu"}, ["wdy"] = {"Wadjabangayi"}, ["wea"] = {"Wewaw"}, ["wec"] = {"Wè Western"}, ["wed"] = {"Wedau"}, ["weg"] = {"Wergaia"}, ["weh"] = {"Weh"}, ["wei"] = {"Kiunum"}, ["wem"] = {"Weme Gbe"}, ["wen"] = {"Sorbian languages"}, ["weo"] = {"Wemale"}, ["wep"] = {"Westphalien"}, ["wer"] = {"Weri"}, ["wes"] = {"Cameroon Pidgin"}, ["wet"] = {"Perai"}, ["weu"] = {"Rawngtu Chin"}, ["wew"] = {"Wejewa"}, ["wfg"] = {"Yafi", "Zorop"}, ["wga"] = {"Wagaya"}, ["wgb"] = {"Wagawaga"}, ["wgg"] = {"Wangkangurru", "Wangganguru"}, ["wgi"] = {"Wahgi"}, ["wgo"] = {"Waigeo"}, ["wgu"] = {"Wirangu"}, ["wgy"] = {"Warrgamay"}, ["wha"] = {"Sou Upaa", "Manusela"}, ["whg"] = {"North Wahgi"}, ["whk"] = {"Wahau Kenyah"}, ["whu"] = {"Wahau Kayan"}, ["wib"] = {"Southern Toussian"}, ["wic"] = {"Wichita"}, ["wie"] = {"Wik-Epa"}, ["wif"] = {"Wik-Keyangan"}, ["wig"] = {"Wik Ngathan"}, ["wih"] = {"Wik-Me'anha"}, ["wii"] = {"Minidien"}, ["wij"] = {"Wik-Iiyanh"}, ["wik"] = {"Wikalkan"}, ["wil"] = {"Wilawila"}, ["wim"] = {"Wik-Mungkan"}, ["win"] = {"Ho-Chunk"}, ["wir"] = {"Wiraféd"}, ["wiu"] = {"Wiru"}, ["wiv"] = {"Vitu"}, ["wiy"] = {"Wiyot"}, ["wja"] = {"Waja"}, ["wji"] = {"Warji"}, ["wka"] = {"Kw'adza"}, ["wkb"] = {"Kumbaran"}, ["wkd"] = {"Wakde", "Mo"}, ["wkl"] = {"Kalanadi"}, ["wkr"] = {"Keerray-Woorroong"}, ["wku"] = {"Kunduvadi"}, ["wkw"] = {"Wakawaka"}, ["wky"] = {"Wangkayutyuru"}, ["wla"] = {"Walio"}, ["wlc"] = {"Mwali Comorian"}, ["wle"] = {"Wolane"}, ["wlg"] = {"Kunbarlang"}, ["wlh"] = {"Welaun"}, ["wli"] = {"Waioli"}, ["wlk"] = {"Wailaki"}, ["wll"] = {"Wali (Sudan)"}, ["wlm"] = {"Middle Welsh"}, ["wlo"] = {"Wolio"}, ["wlr"] = {"Wailapa"}, ["wls"] = {"Wallisian"}, ["wlu"] = {"Wuliwuli"}, ["wlv"] = {"Wichí Lhamtés Vejoz"}, ["wlw"] = {"Walak"}, ["wlx"] = {"Wali (Ghana)"}, ["wly"] = {"Waling"}, ["wma"] = {"Mawa (Nigeria)"}, ["wmb"] = {"Wambaya"}, ["wmc"] = {"Wamas"}, ["wmd"] = {"Mamaindé"}, ["wme"] = {"Wambule"}, ["wmg"] = {"Western Minyag"}, ["wmh"] = {"Waima'a"}, ["wmi"] = {"Wamin"}, ["wmm"] = {"Maiwa (Indonesia)"}, ["wmn"] = {"Waamwang"}, ["wmo"] = {"Wom (Papua New Guinea)"}, ["wms"] = {"Wambon"}, ["wmt"] = {"Walmajarri"}, ["wmw"] = {"Mwani"}, ["wmx"] = {"Womo"}, ["wnb"] = {"Mokati"}, ["wnc"] = {"Wantoat"}, ["wnd"] = {"Wandarang"}, ["wne"] = {"Waneci"}, ["wng"] = {"Wanggom"}, ["wni"] = {"Ndzwani Comorian"}, ["wnk"] = {"Wanukaka"}, ["wnm"] = {"Wanggamala"}, ["wnn"] = {"Wunumara"}, ["wno"] = {"Wano"}, ["wnp"] = {"Wanap"}, ["wnu"] = {"Usan"}, ["wnw"] = {"Wintu"}, ["wny"] = {"Wanyi", "Waanyi"}, ["woa"] = {"Kuwema", "Tyaraity"}, ["wob"] = {"Wè Northern"}, ["woc"] = {"Wogeo"}, ["wod"] = {"Wolani"}, ["woe"] = {"Woleaian"}, ["wof"] = {"Gambian Wolof"}, ["wog"] = {"Wogamusin"}, ["woi"] = {"Kamang"}, ["wok"] = {"Longto"}, ["wom"] = {"Wom (Nigeria)"}, ["won"] = {"Wongo"}, ["woo"] = {"Manombai"}, ["wor"] = {"Woria"}, ["wos"] = {"Hanga Hundi"}, ["wow"] = {"Wawonii"}, ["woy"] = {"Weyto"}, ["wpc"] = {"Maco"}, ["wrb"] = {"Waluwarra", "Warluwara"}, ["wrg"] = {"Warungu", "Gudjal"}, ["wrh"] = {"Wiradjuri"}, ["wri"] = {"Wariyangga"}, ["wrk"] = {"Garrwa"}, ["wrl"] = {"Warlmanpa"}, ["wrm"] = {"Warumungu"}, ["wrn"] = {"Warnang"}, ["wro"] = {"Worrorra"}, ["wrp"] = {"Waropen"}, ["wrr"] = {"Wardaman"}, ["wrs"] = {"Waris"}, ["wru"] = {"Waru"}, ["wrv"] = {"Waruna"}, ["wrw"] = {"Gugu Warra"}, ["wrx"] = {"Wae Rana"}, ["wry"] = {"Merwari"}, ["wrz"] = {"Waray (Australia)"}, ["wsa"] = {"Warembori"}, ["wsg"] = {"Adilabad Gondi"}, ["wsi"] = {"Wusi"}, ["wsk"] = {"Waskia"}, ["wsr"] = {"Owenia"}, ["wss"] = {"Wasa"}, ["wsu"] = {"Wasu"}, ["wsv"] = {"Wotapuri-Katarqalai"}, ["wtb"] = {"Matambwe"}, ["wtf"] = {"Watiwa"}, ["wth"] = {"Wathawurrung"}, ["wti"] = {"Berta"}, ["wtk"] = {"Watakataui"}, ["wtm"] = {"Mewati"}, ["wtw"] = {"Wotu"}, ["wua"] = {"Wikngenchera"}, ["wub"] = {"Wunambal"}, ["wud"] = {"Wudu"}, ["wuh"] = {"Wutunhua"}, ["wul"] = {"Silimo"}, ["wum"] = {"Wumbvu"}, ["wun"] = {"Bungu"}, ["wur"] = {"Wurrugu"}, ["wut"] = {"Wutung"}, ["wuu"] = {"Wu Chinese"}, ["wuv"] = {"Wuvulu-Aua"}, ["wux"] = {"Wulna"}, ["wuy"] = {"Wauyai"}, ["wwa"] = {"Waama"}, ["wwb"] = {"Wakabunga"}, ["wwo"] = {"Wetamut", "Dorig"}, ["wwr"] = {"Warrwa"}, ["www"] = {"Wawa"}, ["wxa"] = {"Waxianghua"}, ["wxw"] = {"Wardandi"}, ["wyb"] = {"Wangaaybuwan-Ngiyambaa"}, ["wyi"] = {"Woiwurrung"}, ["wym"] = {"Wymysorys"}, ["wyn"] = {"Wyandot"}, ["wyr"] = {"Wayoró"}, ["wyy"] = {"Western Fijian"}, ["xaa"] = {"Andalusian Arabic"}, ["xab"] = {"Sambe"}, ["xac"] = {"Kachari"}, ["xad"] = {"Adai"}, ["xae"] = {"Aequian"}, ["xag"] = {"Aghwan"}, ["xai"] = {"Kaimbé"}, ["xaj"] = {"Ararandewára"}, ["xak"] = {"Máku"}, ["xal"] = {"Kalmyk", "Oirat"}, ["xam"] = {"ǀXam"}, ["xan"] = {"Xamtanga"}, ["xao"] = {"Khao"}, ["xap"] = {"Apalachee"}, ["xaq"] = {"Aquitanian"}, ["xar"] = {"Karami"}, ["xas"] = {"Kamas"}, ["xat"] = {"Katawixi"}, ["xau"] = {"Kauwera"}, ["xav"] = {"Xavánte"}, ["xaw"] = {"Kawaiisu"}, ["xay"] = {"Kayan Mahakam"}, ["xbb"] = {"Lower Burdekin"}, ["xbc"] = {"Bactrian"}, ["xbd"] = {"Bindal"}, ["xbe"] = {"Bigambal"}, ["xbg"] = {"Bunganditj"}, ["xbi"] = {"Kombio"}, ["xbj"] = {"Birrpayi"}, ["xbm"] = {"Middle Breton"}, ["xbn"] = {"Kenaboi"}, ["xbo"] = {"Bolgarian"}, ["xbp"] = {"Bibbulman"}, ["xbr"] = {"Kambera"}, ["xbw"] = {"Kambiwá"}, ["xby"] = {"Batjala", "Batyala"}, ["xcb"] = {"Cumbric"}, ["xcc"] = {"Camunic"}, ["xce"] = {"Celtiberian"}, ["xcg"] = {"Cisalpine Gaulish"}, ["xch"] = {"Chemakum", "Chimakum"}, ["xcl"] = {"Classical Armenian"}, ["xcm"] = {"Comecrudo"}, ["xcn"] = {"Cotoname"}, ["xco"] = {"Chorasmian"}, ["xcr"] = {"Carian"}, ["xct"] = {"Classical Tibetan"}, ["xcu"] = {"Curonian"}, ["xcv"] = {"Chuvantsy"}, ["xcw"] = {"Coahuilteco"}, ["xcy"] = {"Cayuse"}, ["xda"] = {"Darkinyung"}, ["xdc"] = {"Dacian"}, ["xdk"] = {"Dharuk"}, ["xdm"] = {"Edomite"}, ["xdo"] = {"Kwandu"}, ["xdq"] = {"Kaitag"}, ["xdy"] = {"Malayic Dayak"}, ["xeb"] = {"Eblan"}, ["xed"] = {"Hdi"}, ["xeg"] = {"ǁXegwi"}, ["xel"] = {"Kelo"}, ["xem"] = {"Kembayan"}, ["xep"] = {"Epi-Olmec"}, ["xer"] = {"Xerénte"}, ["xes"] = {"Kesawai"}, ["xet"] = {"Xetá"}, ["xeu"] = {"Keoru-Ahia"}, ["xfa"] = {"Faliscan"}, ["xga"] = {"Galatian"}, ["xgb"] = {"Gbin"}, ["xgd"] = {"Gudang"}, ["xgf"] = {"Gabrielino-Fernandeño"}, ["xgg"] = {"Goreng"}, ["xgi"] = {"Garingbal"}, ["xgl"] = {"Galindan"}, ["xgm"] = {"Dharumbal", "Guwinmal"}, ["xgn"] = {"Mongolian languages"}, ["xgr"] = {"Garza"}, ["xgu"] = {"Unggumi"}, ["xgw"] = {"Guwa"}, ["xha"] = {"Harami"}, ["xhc"] = {"Hunnic"}, ["xhd"] = {"Hadrami"}, ["xhe"] = {"Khetrani"}, ["xhm"] = {"Middle Khmer (1400 to 1850 CE)"}, ["xhr"] = {"Hernican"}, ["xht"] = {"Hattic"}, ["xhu"] = {"Hurrian"}, ["xhv"] = {"Khua"}, ["xib"] = {"Iberian"}, ["xii"] = {"Xiri"}, ["xil"] = {"Illyrian"}, ["xin"] = {"Xinca"}, ["xir"] = {"Xiriâna"}, ["xis"] = {"Kisan"}, ["xiv"] = {"Indus Valley Language"}, ["xiy"] = {"Xipaya"}, ["xjb"] = {"Minjungbal"}, ["xjt"] = {"Jaitmatang"}, ["xka"] = {"Kalkoti"}, ["xkb"] = {"Northern Nago"}, ["xkc"] = {"Kho'ini"}, ["xkd"] = {"Mendalam Kayan"}, ["xke"] = {"Kereho"}, ["xkf"] = {"Khengkha"}, ["xkg"] = {"Kagoro"}, ["xki"] = {"Kenyan Sign Language"}, ["xkj"] = {"Kajali"}, ["xkk"] = {"Kachok", "Kaco'"}, ["xkl"] = {"Mainstream Kenyah"}, ["xkn"] = {"Kayan River Kayan"}, ["xko"] = {"Kiorr"}, ["xkp"] = {"Kabatei"}, ["xkq"] = {"Koroni"}, ["xkr"] = {"Xakriabá"}, ["xks"] = {"Kumbewaha"}, ["xkt"] = {"Kantosi"}, ["xku"] = {"Kaamba"}, ["xkv"] = {"Kgalagadi"}, ["xkw"] = {"Kembra"}, ["xkx"] = {"Karore"}, ["xky"] = {"Uma' Lasan"}, ["xkz"] = {"Kurtokha"}, ["xla"] = {"Kamula"}, ["xlb"] = {"Loup B"}, ["xlc"] = {"Lycian"}, ["xld"] = {"Lydian"}, ["xle"] = {"Lemnian"}, ["xlg"] = {"Ligurian (Ancient)"}, ["xli"] = {"Liburnian"}, ["xln"] = {"Alanic"}, ["xlo"] = {"Loup A"}, ["xlp"] = {"Lepontic"}, ["xls"] = {"Lusitanian"}, ["xlu"] = {"Cuneiform Luwian"}, ["xly"] = {"Elymian"}, ["xma"] = {"Mushungulu"}, ["xmb"] = {"Mbonga"}, ["xmc"] = {"Makhuwa-Marrevone"}, ["xmd"] = {"Mbudum"}, ["xme"] = {"Median"}, ["xmf"] = {"Mingrelian"}, ["xmg"] = {"Mengaka"}, ["xmh"] = {"Kugu-Muminh"}, ["xmj"] = {"Majera"}, ["xmk"] = {"Ancient Macedonian"}, ["xml"] = {"Malaysian Sign Language"}, ["xmm"] = {"Manado Malay"}, ["xmn"] = {"Manichaean Middle Persian"}, ["xmo"] = {"Morerebi"}, ["xmp"] = {"Kuku-Mu'inh"}, ["xmq"] = {"Kuku-Mangk"}, ["xmr"] = {"Meroitic"}, ["xms"] = {"Moroccan Sign Language"}, ["xmt"] = {"Matbat"}, ["xmu"] = {"Kamu"}, ["xmv"] = {"Antankarana Malagasy", "Tankarana Malagasy"}, ["xmw"] = {"Tsimihety Malagasy"}, ["xmx"] = {"Salawati", "Maden"}, ["xmy"] = {"Mayaguduna"}, ["xmz"] = {"Mori Bawah"}, ["xna"] = {"Ancient North Arabian"}, ["xnb"] = {"Kanakanabu"}, ["xnd"] = {"Na-Dene languages"}, ["xng"] = {"Middle Mongolian"}, ["xnh"] = {"Kuanhua"}, ["xni"] = {"Ngarigu"}, ["xnj"] = {"Ngoni (Tanzania)"}, ["xnk"] = {"Nganakarti"}, ["xnm"] = {"Ngumbarl"}, ["xnn"] = {"Northern Kankanay"}, ["xno"] = {"Anglo-Norman"}, ["xnq"] = {"Ngoni (Mozambique)"}, ["xnr"] = {"Kangri"}, ["xns"] = {"Kanashi"}, ["xnt"] = {"Narragansett"}, ["xnu"] = {"Nukunul"}, ["xny"] = {"Nyiyaparli"}, ["xnz"] = {"Kenzi", "Mattoki"}, ["xoc"] = {"O'chi'chi'"}, ["xod"] = {"Kokoda"}, ["xog"] = {"Soga"}, ["xoi"] = {"Kominimung"}, ["xok"] = {"Xokleng"}, ["xom"] = {"Komo (Sudan)"}, ["xon"] = {"Konkomba"}, ["xoo"] = {"Xukurú"}, ["xop"] = {"Kopar"}, ["xor"] = {"Korubo"}, ["xow"] = {"Kowaki"}, ["xpa"] = {"Pirriya"}, ["xpb"] = {"Northeastern Tasmanian", "Pyemmairrener"}, ["xpc"] = {"Pecheneg"}, ["xpd"] = {"Oyster Bay Tasmanian"}, ["xpe"] = {"Liberia Kpelle"}, ["xpf"] = {"Southeast Tasmanian", "Nuenonne"}, ["xpg"] = {"Phrygian"}, ["xph"] = {"North Midlands Tasmanian", "Tyerrenoterpanner"}, ["xpi"] = {"Pictish"}, ["xpj"] = {"Mpalitjanh"}, ["xpk"] = {"Kulina Pano"}, ["xpl"] = {"Port Sorell Tasmanian"}, ["xpm"] = {"Pumpokol"}, ["xpn"] = {"Kapinawá"}, ["xpo"] = {"Pochutec"}, ["xpp"] = {"Puyo-Paekche"}, ["xpq"] = {"Mohegan-Pequot"}, ["xpr"] = {"Parthian"}, ["xps"] = {"Pisidian"}, ["xpt"] = {"Punthamara"}, ["xpu"] = {"Punic"}, ["xpv"] = {"Northern Tasmanian", "Tommeginne"}, ["xpw"] = {"Northwestern Tasmanian", "Peerapper"}, ["xpx"] = {"Southwestern Tasmanian", "Toogee"}, ["xpy"] = {"Puyo"}, ["xpz"] = {"Bruny Island Tasmanian"}, ["xqa"] = {"Karakhanid"}, ["xqt"] = {"Qatabanian"}, ["xra"] = {"Krahô"}, ["xrb"] = {"Eastern Karaboro"}, ["xrd"] = {"Gundungurra"}, ["xre"] = {"Kreye"}, ["xrg"] = {"Minang"}, ["xri"] = {"Krikati-Timbira"}, ["xrm"] = {"Armazic"}, ["xrn"] = {"Arin"}, ["xrr"] = {"Raetic"}, ["xrt"] = {"Aranama-Tamique"}, ["xru"] = {"Marriammu"}, ["xrw"] = {"Karawa"}, ["xsa"] = {"Sabaean"}, ["xsb"] = {"Sambal"}, ["xsc"] = {"Scythian"}, ["xsd"] = {"Sidetic"}, ["xse"] = {"Sempan"}, ["xsh"] = {"Shamang"}, ["xsi"] = {"Sio"}, ["xsj"] = {"Subi"}, ["xsl"] = {"South Slavey"}, ["xsm"] = {"Kasem"}, ["xsn"] = {"Sanga (Nigeria)"}, ["xso"] = {"Solano"}, ["xsp"] = {"Silopi"}, ["xsq"] = {"Makhuwa-Saka"}, ["xsr"] = {"Sherpa"}, ["xsu"] = {"Sanumá"}, ["xsv"] = {"Sudovian"}, ["xsy"] = {"Saisiyat"}, ["xta"] = {"Alcozauca Mixtec"}, ["xtb"] = {"Chazumba Mixtec"}, ["xtc"] = {"Katcha-Kadugli-Miri"}, ["xtd"] = {"Diuxi-Tilantongo Mixtec"}, ["xte"] = {"Ketengban"}, ["xtg"] = {"Transalpine Gaulish"}, ["xth"] = {"Yitha Yitha"}, ["xti"] = {"Sinicahua Mixtec"}, ["xtj"] = {"San Juan Teita Mixtec"}, ["xtl"] = {"Tijaltepec Mixtec"}, ["xtm"] = {"Magdalena Peñasco Mixtec"}, ["xtn"] = {"Northern Tlaxiaco Mixtec"}, ["xto"] = {"Tokharian A"}, ["xtp"] = {"San Miguel Piedras Mixtec"}, ["xtq"] = {"Tumshuqese"}, ["xtr"] = {"Early Tripuri"}, ["xts"] = {"Sindihui Mixtec"}, ["xtt"] = {"Tacahua Mixtec"}, ["xtu"] = {"Cuyamecalco Mixtec"}, ["xtv"] = {"Thawa"}, ["xtw"] = {"Tawandê"}, ["xty"] = {"Yoloxochitl Mixtec"}, ["xua"] = {"Alu Kurumba"}, ["xub"] = {"Betta Kurumba"}, ["xud"] = {"Umiida"}, ["xug"] = {"Kunigami"}, ["xuj"] = {"Jennu Kurumba"}, ["xul"] = {"Ngunawal", "Nunukul"}, ["xum"] = {"Umbrian"}, ["xun"] = {"Unggaranggu"}, ["xuo"] = {"Kuo"}, ["xup"] = {"Upper Umpqua"}, ["xur"] = {"Urartian"}, ["xut"] = {"Kuthant"}, ["xuu"] = {"Kxoe", "Khwedam"}, ["xve"] = {"Venetic"}, ["xvi"] = {"Kamviri"}, ["xvn"] = {"Vandalic"}, ["xvo"] = {"Volscian"}, ["xvs"] = {"Vestinian"}, ["xwa"] = {"Kwaza"}, ["xwc"] = {"Woccon"}, ["xwd"] = {"Wadi Wadi"}, ["xwe"] = {"Xwela Gbe"}, ["xwg"] = {"Kwegu"}, ["xwj"] = {"Wajuk"}, ["xwk"] = {"Wangkumara"}, ["xwl"] = {"Western Xwla Gbe"}, ["xwo"] = {"Written Oirat"}, ["xwr"] = {"Kwerba Mamberamo"}, ["xwt"] = {"Wotjobaluk"}, ["xww"] = {"Wemba Wemba"}, ["xxb"] = {"Boro (Ghana)"}, ["xxk"] = {"Ke'o"}, ["xxm"] = {"Minkin"}, ["xxr"] = {"Koropó"}, ["xxt"] = {"Tambora"}, ["xya"] = {"Yaygir"}, ["xyb"] = {"Yandjibara"}, ["xyj"] = {"Mayi-Yapi"}, ["xyk"] = {"Mayi-Kulan"}, ["xyl"] = {"Yalakalore"}, ["xyt"] = {"Mayi-Thakurti"}, ["xyy"] = {"Yorta Yorta"}, ["xzh"] = {"Zhang-Zhung"}, ["xzm"] = {"Zemgalian"}, ["xzp"] = {"Ancient Zapotec"}, ["yaa"] = {"Yaminahua"}, ["yab"] = {"Yuhup"}, ["yac"] = {"Pass Valley Yali"}, ["yad"] = {"Yagua"}, ["yae"] = {"Pumé"}, ["yaf"] = {"Yaka (Democratic Republic of Congo)"}, ["yag"] = {"Yámana"}, ["yah"] = {"Yazgulyam"}, ["yai"] = {"Yagnobi"}, ["yaj"] = {"Banda-Yangere"}, ["yak"] = {"Yakama"}, ["yal"] = {"Yalunka"}, ["yam"] = {"Yamba"}, ["yan"] = {"Mayangna"}, ["yao"] = {"Yao"}, ["yap"] = {"Yapese"}, ["yaq"] = {"Yaqui"}, ["yar"] = {"Yabarana"}, ["yas"] = {"Nugunu (Cameroon)"}, ["yat"] = {"Yambeta"}, ["yau"] = {"Yuwana"}, ["yav"] = {"Yangben"}, ["yaw"] = {"Yawalapití"}, ["yax"] = {"Yauma"}, ["yay"] = {"Agwagwune"}, ["yaz"] = {"Lokaa"}, ["yba"] = {"Yala"}, ["ybb"] = {"Yemba"}, ["ybe"] = {"West Yugur"}, ["ybh"] = {"Yakha"}, ["ybi"] = {"Yamphu"}, ["ybj"] = {"Hasha"}, ["ybk"] = {"Bokha"}, ["ybl"] = {"Yukuben"}, ["ybm"] = {"Yaben"}, ["ybn"] = {"Yabaâna"}, ["ybo"] = {"Yabong"}, ["ybx"] = {"Yawiyo"}, ["yby"] = {"Yaweyuha"}, ["ych"] = {"Chesu"}, ["ycl"] = {"Lolopo"}, ["ycn"] = {"Yucuna"}, ["ycp"] = {"Chepya"}, ["ycr"] = {"Yilan Creole"}, ["yda"] = {"Yanda"}, ["ydd"] = {"Eastern Yiddish"}, ["yde"] = {"Yangum Dey"}, ["ydg"] = {"Yidgha"}, ["ydk"] = {"Yoidik"}, ["yea"] = {"Ravula"}, ["yec"] = {"Yeniche"}, ["yee"] = {"Yimas"}, ["yei"] = {"Yeni"}, ["yej"] = {"Yevanic"}, ["yel"] = {"Yela"}, ["yer"] = {"Tarok"}, ["yes"] = {"Nyankpa"}, ["yet"] = {"Yetfa"}, ["yeu"] = {"Yerukula"}, ["yev"] = {"Yapunda"}, ["yey"] = {"Yeyi"}, ["yga"] = {"Malyangapa"}, ["ygi"] = {"Yiningayi"}, ["ygl"] = {"Yangum Gel"}, ["ygm"] = {"Yagomi"}, ["ygp"] = {"Gepo"}, ["ygr"] = {"Yagaria"}, ["ygs"] = {"Yolŋu Sign Language"}, ["ygu"] = {"Yugul"}, ["ygw"] = {"Yagwoia"}, ["yha"] = {"Baha Buyang"}, ["yhd"] = {"Judeo-Iraqi Arabic"}, ["yhl"] = {"Hlepho Phowa"}, ["yhs"] = {"Yan-nhaŋu Sign Language"}, ["yia"] = {"Yinggarda"}, ["yif"] = {"Ache"}, ["yig"] = {"Wusa Nasu"}, ["yih"] = {"Western Yiddish"}, ["yii"] = {"Yidiny"}, ["yij"] = {"Yindjibarndi"}, ["yik"] = {"Dongshanba Lalo"}, ["yil"] = {"Yindjilandji"}, ["yim"] = {"Yimchungru Naga"}, ["yin"] = {"Riang Lai", "Yinchia"}, ["yip"] = {"Pholo"}, ["yiq"] = {"Miqie"}, ["yir"] = {"North Awyu"}, ["yis"] = {"Yis"}, ["yit"] = {"Eastern Lalu"}, ["yiu"] = {"Awu"}, ["yiv"] = {"Northern Nisu"}, ["yix"] = {"Axi Yi"}, ["yiz"] = {"Azhe"}, ["yka"] = {"Yakan"}, ["ykg"] = {"Northern Yukaghir"}, ["ykh"] = {"Khamnigan Mongol"}, ["yki"] = {"Yoke"}, ["ykk"] = {"Yakaikeke"}, ["ykl"] = {"Khlula"}, ["ykm"] = {"Kap"}, ["ykn"] = {"Kua-nsi"}, ["yko"] = {"Yasa"}, ["ykr"] = {"Yekora"}, ["ykt"] = {"Kathu"}, ["yku"] = {"Kuamasi"}, ["yky"] = {"Yakoma"}, ["yla"] = {"Yaul"}, ["ylb"] = {"Yaleba"}, ["yle"] = {"Yele"}, ["ylg"] = {"Yelogu"}, ["yli"] = {"Angguruk Yali"}, ["yll"] = {"Yil"}, ["ylm"] = {"Limi"}, ["yln"] = {"Langnian Buyang"}, ["ylo"] = {"Naluo Yi"}, ["ylr"] = {"Yalarnnga"}, ["ylu"] = {"Aribwaung"}, ["yly"] = {"Nyâlayu", "Nyelâyu"}, ["ymb"] = {"Yambes"}, ["ymc"] = {"Southern Muji"}, ["ymd"] = {"Muda"}, ["yme"] = {"Yameo"}, ["ymg"] = {"Yamongeri"}, ["ymh"] = {"Mili"}, ["ymi"] = {"Moji"}, ["ymk"] = {"Makwe"}, ["yml"] = {"Iamalele"}, ["ymm"] = {"Maay"}, ["ymn"] = {"Yamna", "Sunum"}, ["ymo"] = {"Yangum Mon"}, ["ymp"] = {"Yamap"}, ["ymq"] = {"Qila Muji"}, ["ymr"] = {"Malasar"}, ["yms"] = {"Mysian"}, ["ymx"] = {"Northern Muji"}, ["ymz"] = {"Muzi"}, ["yna"] = {"Aluo"}, ["ynd"] = {"Yandruwandha"}, ["yne"] = {"Lang'e"}, ["yng"] = {"Yango"}, ["ynk"] = {"Naukan Yupik"}, ["ynl"] = {"Yangulam"}, ["ynn"] = {"Yana"}, ["yno"] = {"Yong"}, ["ynq"] = {"Yendang"}, ["yns"] = {"Yansi"}, ["ynu"] = {"Yahuna"}, ["yob"] = {"Yoba"}, ["yog"] = {"Yogad"}, ["yoi"] = {"Yonaguni"}, ["yok"] = {"Yokuts"}, ["yol"] = {"Yola"}, ["yom"] = {"Yombe"}, ["yon"] = {"Yongkom"}, ["yot"] = {"Yotti"}, ["yox"] = {"Yoron"}, ["yoy"] = {"Yoy"}, ["ypa"] = {"Phala"}, ["ypb"] = {"Labo Phowa"}, ["ypg"] = {"Phola"}, ["yph"] = {"Phupha"}, ["ypk"] = {"Yupik languages"}, ["ypm"] = {"Phuma"}, ["ypn"] = {"Ani Phowa"}, ["ypo"] = {"Alo Phola"}, ["ypp"] = {"Phupa"}, ["ypz"] = {"Phuza"}, ["yra"] = {"Yerakai"}, ["yrb"] = {"Yareba"}, ["yre"] = {"Yaouré"}, ["yrk"] = {"Nenets"}, ["yrl"] = {"Nhengatu"}, ["yrm"] = {"Yirrk-Mel"}, ["yrn"] = {"Yerong"}, ["yro"] = {"Yaroamë"}, ["yrs"] = {"Yarsun"}, ["yrw"] = {"Yarawata"}, ["yry"] = {"Yarluyandi"}, ["ysc"] = {"Yassic"}, ["ysd"] = {"Samatao"}, ["ysg"] = {"Sonaga"}, ["ysl"] = {"Yugoslavian Sign Language"}, ["ysm"] = {"Myanmar Sign Language"}, ["ysn"] = {"Sani"}, ["yso"] = {"Nisi (China)"}, ["ysp"] = {"Southern Lolopo"}, ["ysr"] = {"Sirenik Yupik"}, ["yss"] = {"Yessan-Mayo"}, ["ysy"] = {"Sanie"}, ["yta"] = {"Talu"}, ["ytl"] = {"Tanglang"}, ["ytp"] = {"Thopho"}, ["ytw"] = {"Yout Wam"}, ["yty"] = {"Yatay"}, ["yua"] = {"Yucateco", "Yucatec Maya"}, ["yub"] = {"Yugambal"}, ["yuc"] = {"Yuchi"}, ["yud"] = {"Judeo-Tripolitanian Arabic"}, ["yue"] = {"Yue Chinese", "Cantonese"}, ["yuf"] = {"Havasupai-Walapai-Yavapai"}, ["yug"] = {"Yug"}, ["yui"] = {"Yurutí"}, ["yuj"] = {"Karkar-Yuri"}, ["yuk"] = {"Yuki"}, ["yul"] = {"Yulu"}, ["yum"] = {"Quechan"}, ["yun"] = {"Bena (Nigeria)"}, ["yup"] = {"Yukpa"}, ["yuq"] = {"Yuqui"}, ["yur"] = {"Yurok"}, ["yut"] = {"Yopno"}, ["yuw"] = {"Yau (Morobe Province)"}, ["yux"] = {"Southern Yukaghir"}, ["yuy"] = {"East Yugur"}, ["yuz"] = {"Yuracare"}, ["yva"] = {"Yawa"}, ["yvt"] = {"Yavitero"}, ["ywa"] = {"Kalou"}, ["ywg"] = {"Yinhawangka"}, ["ywl"] = {"Western Lalu"}, ["ywn"] = {"Yawanawa"}, ["ywq"] = {"Wuding-Luquan Yi"}, ["ywr"] = {"Yawuru"}, ["ywt"] = {"Xishanba Lalo", "Central Lalo"}, ["ywu"] = {"Wumeng Nasu"}, ["yww"] = {"Yawarawarga"}, ["yxa"] = {"Mayawali"}, ["yxg"] = {"Yagara"}, ["yxl"] = {"Yardliyawarra"}, ["yxm"] = {"Yinwum"}, ["yxu"] = {"Yuyu"}, ["yxy"] = {"Yabula Yabula"}, ["yyr"] = {"Yir Yoront"}, ["yyu"] = {"Yau (Sandaun Province)"}, ["yyz"] = {"Ayizi"}, ["yzg"] = {"E'ma Buyang"}, ["yzk"] = {"Zokhuo"}, ["zaa"] = {"Sierra de Juárez Zapotec"}, ["zab"] = {"Western Tlacolula Valley Zapotec", "San Juan Guelavía Zapotec"}, ["zac"] = {"Ocotlán Zapotec"}, ["zad"] = {"Cajonos Zapotec"}, ["zae"] = {"Yareni Zapotec"}, ["zaf"] = {"Ayoquesco Zapotec"}, ["zag"] = {"Zaghawa"}, ["zah"] = {"Zangwal"}, ["zai"] = {"Isthmus Zapotec"}, ["zaj"] = {"Zaramo"}, ["zak"] = {"Zanaki"}, ["zal"] = {"Zauzou"}, ["zam"] = {"Miahuatlán Zapotec"}, ["zao"] = {"Ozolotepec Zapotec"}, ["zap"] = {"Zapotec"}, ["zaq"] = {"Aloápam Zapotec"}, ["zar"] = {"Rincón Zapotec"}, ["zas"] = {"Santo Domingo Albarradas Zapotec"}, ["zat"] = {"Tabaa Zapotec"}, ["zau"] = {"Zangskari"}, ["zav"] = {"Yatzachi Zapotec"}, ["zaw"] = {"Mitla Zapotec"}, ["zax"] = {"Xadani Zapotec"}, ["zay"] = {"Zayse-Zergulla", "Zaysete"}, ["zaz"] = {"Zari"}, ["zba"] = {"Balaibalan"}, ["zbc"] = {"Central Berawan"}, ["zbe"] = {"East Berawan"}, ["zbl"] = {"Blissymbols", "Bliss", "Blissymbolics"}, ["zbt"] = {"Batui"}, ["zbu"] = {"Bu (Bauchi State)"}, ["zbw"] = {"West Berawan"}, ["zca"] = {"Coatecas Altas Zapotec"}, ["zcd"] = {"Las Delicias Zapotec"}, ["zch"] = {"Central Hongshuihe Zhuang"}, ["zdj"] = {"Ngazidja Comorian"}, ["zea"] = {"Zeeuws"}, ["zeg"] = {"Zenag"}, ["zeh"] = {"Eastern Hongshuihe Zhuang"}, ["zem"] = {"Zeem"}, ["zen"] = {"Zenaga"}, ["zga"] = {"Kinga"}, ["zgb"] = {"Guibei Zhuang"}, ["zgh"] = {"Standard Moroccan Tamazight"}, ["zgm"] = {"Minz Zhuang"}, ["zgn"] = {"Guibian Zhuang"}, ["zgr"] = {"Magori"}, ["zhb"] = {"Zhaba"}, ["zhd"] = {"Dai Zhuang"}, ["zhi"] = {"Zhire"}, ["zhn"] = {"Nong Zhuang"}, ["zhw"] = {"Zhoa"}, ["zhx"] = {"Chinese (family)"}, ["zia"] = {"Zia"}, ["zib"] = {"Zimbabwe Sign Language"}, ["zik"] = {"Zimakani"}, ["zil"] = {"Zialo"}, ["zim"] = {"Mesme"}, ["zin"] = {"Zinza"}, ["ziw"] = {"Zigula"}, ["ziz"] = {"Zizilivakan"}, ["zka"] = {"Kaimbulawa"}, ["zkd"] = {"Kadu"}, ["zkg"] = {"Koguryo"}, ["zkh"] = {"Khorezmian"}, ["zkk"] = {"Karankawa"}, ["zkn"] = {"Kanan"}, ["zko"] = {"Kott"}, ["zkp"] = {"São Paulo Kaingáng"}, ["zkr"] = {"Zakhring"}, ["zkt"] = {"Kitan"}, ["zku"] = {"Kaurna"}, ["zkv"] = {"Krevinian"}, ["zkz"] = {"Khazar"}, ["zla"] = {"Zula"}, ["zle"] = {"East Slavic languages"}, ["zlj"] = {"Liujiang Zhuang"}, ["zlm"] = {"Malay (individual language)"}, ["zln"] = {"Lianshan Zhuang"}, ["zlq"] = {"Liuqian Zhuang"}, ["zls"] = {"South Slavic languages"}, ["zlu"] = {"Zul"}, ["zlw"] = {"West Slavic languages"}, ["zma"] = {"Manda (Australia)"}, ["zmb"] = {"Zimba"}, ["zmc"] = {"Margany"}, ["zmd"] = {"Maridan"}, ["zme"] = {"Mangerr"}, ["zmf"] = {"Mfinu"}, ["zmg"] = {"Marti Ke"}, ["zmh"] = {"Makolkol"}, ["zmi"] = {"Negeri Sembilan Malay"}, ["zmj"] = {"Maridjabin"}, ["zmk"] = {"Mandandanyi"}, ["zml"] = {"Matngala"}, ["zmm"] = {"Marimanindji", "Marramaninyshi"}, ["zmn"] = {"Mbangwe"}, ["zmo"] = {"Molo"}, ["zmp"] = {"Mpuono"}, ["zmq"] = {"Mituku"}, ["zmr"] = {"Maranunggu"}, ["zms"] = {"Mbesa"}, ["zmt"] = {"Maringarr"}, ["zmu"] = {"Muruwari"}, ["zmv"] = {"Mbariman-Gudhinma"}, ["zmw"] = {"Mbo (Democratic Republic of Congo)"}, ["zmx"] = {"Bomitaba"}, ["zmy"] = {"Mariyedi"}, ["zmz"] = {"Mbandja"}, ["zna"] = {"Zan Gula"}, ["znd"] = {"Zande languages"}, ["zne"] = {"Zande (individual language)"}, ["zng"] = {"Mang"}, ["znk"] = {"Manangkari"}, ["zns"] = {"Mangas"}, ["zoc"] = {"Copainalá Zoque"}, ["zoh"] = {"Chimalapa Zoque"}, ["zom"] = {"Zou"}, ["zoo"] = {"Asunción Mixtepec Zapotec"}, ["zoq"] = {"Tabasco Zoque"}, ["zor"] = {"Rayón Zoque"}, ["zos"] = {"Francisco León Zoque"}, ["zpa"] = {"Lachiguiri Zapotec"}, ["zpb"] = {"Yautepec Zapotec"}, ["zpc"] = {"Choapan Zapotec"}, ["zpd"] = {"Southeastern Ixtlán Zapotec"}, ["zpe"] = {"Petapa Zapotec"}, ["zpf"] = {"San Pedro Quiatoni Zapotec"}, ["zpg"] = {"Guevea De Humboldt Zapotec"}, ["zph"] = {"Totomachapan Zapotec"}, ["zpi"] = {"Santa María Quiegolani Zapotec"}, ["zpj"] = {"Quiavicuzas Zapotec"}, ["zpk"] = {"Tlacolulita Zapotec"}, ["zpl"] = {"Lachixío Zapotec"}, ["zpm"] = {"Mixtepec Zapotec"}, ["zpn"] = {"Santa Inés Yatzechi Zapotec"}, ["zpo"] = {"Amatlán Zapotec"}, ["zpp"] = {"El Alto Zapotec"}, ["zpq"] = {"Zoogocho Zapotec"}, ["zpr"] = {"Santiago Xanica Zapotec"}, ["zps"] = {"Coatlán Zapotec"}, ["zpt"] = {"San Vicente Coatlán Zapotec"}, ["zpu"] = {"Yalálag Zapotec"}, ["zpv"] = {"Chichicapan Zapotec"}, ["zpw"] = {"Zaniza Zapotec"}, ["zpx"] = {"San Baltazar Loxicha Zapotec"}, ["zpy"] = {"Mazaltepec Zapotec"}, ["zpz"] = {"Texmelucan Zapotec"}, ["zqe"] = {"Qiubei Zhuang"}, ["zra"] = {"Kara (Korea)"}, ["zrg"] = {"Mirgan"}, ["zrn"] = {"Zerenkel"}, ["zro"] = {"Záparo"}, ["zrp"] = {"Zarphatic"}, ["zrs"] = {"Mairasi"}, ["zsa"] = {"Sarasira"}, ["zsk"] = {"Kaskean"}, ["zsl"] = {"Zambian Sign Language"}, ["zsm"] = {"Standard Malay"}, ["zsr"] = {"Southern Rincon Zapotec"}, ["zsu"] = {"Sukurum"}, ["zte"] = {"Elotepec Zapotec"}, ["ztg"] = {"Xanaguía Zapotec"}, ["ztl"] = {"Lapaguía-Guivini Zapotec"}, ["ztm"] = {"San Agustín Mixtepec Zapotec"}, ["ztn"] = {"Santa Catarina Albarradas Zapotec"}, ["ztp"] = {"Loxicha Zapotec"}, ["ztq"] = {"Quioquitani-Quierí Zapotec"}, ["zts"] = {"Tilquiapan Zapotec"}, ["ztt"] = {"Tejalapan Zapotec"}, ["ztu"] = {"Güilá Zapotec"}, ["ztx"] = {"Zaachila Zapotec"}, ["zty"] = {"Yatee Zapotec"}, ["zuh"] = {"Tokano"}, ["zum"] = {"Kumzari"}, ["zun"] = {"Zuni"}, ["zuy"] = {"Zumaya"}, ["zwa"] = {"Zay"}, ["zxx"] = {"No linguistic content", "Not applicable"}, ["zyb"] = {"Yongbei Zhuang"}, ["zyg"] = {"Yang Zhuang"}, ["zyj"] = {"Youjiang Zhuang"}, ["zyn"] = {"Yongnan Zhuang"}, ["zyp"] = {"Zyphe Chin"}, ["zza"] = {"Zaza", "Dimili", "Dimli (macrolanguage)", "Kirdki", "Kirmanjki (macrolanguage)", "Zazaki"}, ["zzj"] = {"Zuojiang Zhuang"} } local deprecated = { ["in"] = {"Indonesian"}, ["iw"] = {"Hebrew"}, ["ji"] = {"Yiddish"}, ["jw"] = {"Javanese"}, ["mo"] = {"Moldavian", "Moldovan"}, ["aam"] = {"Aramanik"}, ["adp"] = {"Adap"}, ["agp"] = {"Paranan"}, ["ais"] = {"Nataoran Amis"}, ["ajp"] = {"South Levantine Arabic"}, ["ajt"] = {"Judeo-Tunisian Arabic"}, ["aoh"] = {"Arma"}, ["asd"] = {"Asas"}, ["aue"] = {"ǂKxʼauǁʼein"}, ["ayx"] = {"Ayi (China)"}, ["ayy"] = {"Tayabas Ayta"}, ["baz"] = {"Tunen"}, ["bbz"] = {"Babalia Creole Arabic"}, ["bgm"] = {"Baga Mboteni"}, ["bhk"] = {"Albay Bicolano"}, ["bic"] = {"Bikaru"}, ["bij"] = {"Vaghat-Ya-Bijim-Legeri"}, ["bjd"] = {"Bandjigali"}, ["bjq"] = {"Southern Betsimisaraka Malagasy"}, ["bkb"] = {"Finallig"}, ["blg"] = {"Balau"}, ["bmy"] = {"Bemba (Democratic Republic of Congo)"}, ["bpb"] = {"Barbacoas"}, ["btb"] = {"Beti (Cameroon)"}, ["btl"] = {"Bhatola"}, ["bxx"] = {"Borna (Democratic Republic of Congo)"}, ["byy"] = {"Buya"}, ["cbe"] = {"Chipiajes"}, ["cbh"] = {"Cagua"}, ["cca"] = {"Cauca"}, ["ccq"] = {"Chaungtha"}, ["cdg"] = {"Chamari"}, ["cjr"] = {"Chorotega"}, ["cka"] = {"Khumi Awa Chin"}, ["cmk"] = {"Chimakum"}, ["coy"] = {"Coyaima"}, ["cqu"] = {"Chilean Quechua"}, ["cug"] = {"Chungmboko", "Cung"}, ["cum"] = {"Cumeral"}, ["daf"] = {"Dan"}, ["dap"] = {"Nisi (India)"}, ["dgu"] = {"Degaru"}, ["dha"] = {"Dhanwar (India)"}, ["dit"] = {"Dirari"}, ["djl"] = {"Djiwarli"}, ["dkl"] = {"Kolum So Dogon"}, ["drh"] = {"Darkhat"}, ["drr"] = {"Dororo"}, ["drw"] = {"Darwazi"}, ["dud"] = {"Hun-Saare"}, ["duj"] = {"Dhuwal"}, ["dwl"] = {"Walo Kumbe Dogon"}, ["ekc"] = {"Eastern Karnic"}, ["elp"] = {"Elpaputih"}, ["emo"] = {"Emok"}, ["gav"] = {"Gabutamon"}, ["gbc"] = {"Garawa"}, ["gfx"] = {"Mangetti Dune ǃXung"}, ["ggn"] = {"Eastern Gurung"}, ["ggo"] = {"Southern Gondi"}, ["ggr"] = {"Aghu Tharnggalu"}, ["gio"] = {"Gelao"}, ["gji"] = {"Geji"}, ["gli"] = {"Guliguli"}, ["gti"] = {"Gbati-ri"}, ["guv"] = {"Gey"}, ["hrr"] = {"Horuru"}, ["iap"] = {"Iapama"}, ["ibi"] = {"Ibilo"}, ["ill"] = {"Iranun"}, ["ilw"] = {"Talur"}, ["ime"] = {"Imeraguen"}, ["izi"] = {"Izi-Ezaa-Ikwo-Mgbo"}, ["jar"] = {"Jarawa (Nigeria)"}, ["jeg"] = {"Jeng"}, ["kbf"] = {"Kakauhua"}, ["kdv"] = {"Kado"}, ["kgc"] = {"Kasseng"}, ["kgd"] = {"Kataang"}, ["kgh"] = {"Upper Tanudan Kalinga"}, ["kgm"] = {"Karipúna"}, ["kjf"] = {"Khalaj [Indo-Iranian]"}, ["koj"] = {"Sara Dunjo"}, ["kox"] = {"Coxima"}, ["kpp"] = {"Paku Karen"}, ["krm"] = {"Krim"}, ["ksa"] = {"Shuwa-Zamani"}, ["ktr"] = {"Kota Marudu Tinagas"}, ["kvs"] = {"Kunggara"}, ["kwq"] = {"Kwak"}, ["kxe"] = {"Kakihum"}, ["kxl"] = {"Nepali Kurux"}, ["kxu"] = {"Kui (India)"}, ["kzh"] = {"Kenuzi-Dongola"}, ["kzj"] = {"Coastal Kadazan"}, ["kzt"] = {"Tambunan Dusun"}, ["lak"] = {"Laka (Nigeria)"}, ["lba"] = {"Lui"}, ["leg"] = {"Lengua"}, ["lii"] = {"Lingkhim"}, ["llo"] = {"Khlor"}, ["lmm"] = {"Lamam"}, ["lmz"] = {"Lumbee"}, ["lno"] = {"Lango (South Sudan)"}, ["lsg"] = {"Lyons Sign Language"}, ["meg"] = {"Mea"}, ["mgx"] = {"Omati"}, ["mhh"] = {"Maskoy Pidgin"}, ["mja"] = {"Mahei"}, ["mld"] = {"Malakhel"}, ["mnt"] = {"Maykulan"}, ["mof"] = {"Mohegan-Montauk-Narragansett"}, ["mst"] = {"Cataelano Mandaya"}, ["mvm"] = {"Muya"}, ["mwd"] = {"Mudbura"}, ["mwj"] = {"Maligo"}, ["mwx"] = {"Mediak"}, ["mwy"] = {"Mosiro"}, ["myd"] = {"Maramba"}, ["myi"] = {"Mina (India)"}, ["myq"] = {"Forest Maninka"}, ["myt"] = {"Sangab Mandaya"}, ["nad"] = {"Nijadali"}, ["nbf"] = {"Naxi"}, ["nbx"] = {"Ngura"}, ["ncp"] = {"Ndaktup"}, ["ngo"] = {"Ngoni"}, ["nln"] = {"Durango Nahuatl"}, ["nlr"] = {"Ngarla"}, ["nns"] = {"Ningye"}, ["nnx"] = {"Ngong"}, ["nom"] = {"Nocamán"}, ["noo"] = {"Nootka"}, ["nts"] = {"Natagaimas"}, ["nxu"] = {"Narau"}, ["ome"] = {"Omejes"}, ["oun"] = {"ǃOǃung"}, ["pat"] = {"Papitalai"}, ["pbz"] = {"Palu"}, ["pcr"] = {"Panang"}, ["pgy"] = {"Pongyong"}, ["pii"] = {"Pini"}, ["plj"] = {"Polci"}, ["plp"] = {"Palpa"}, ["pmc"] = {"Palumata"}, ["pmk"] = {"Pamlico"}, ["pmu"] = {"Mirpur Panjabi"}, ["pod"] = {"Ponares"}, ["ppa"] = {"Pao"}, ["ppr"] = {"Piru"}, ["prb"] = {"Lua'"}, ["prp"] = {"Parsi"}, ["pry"] = {"Pray 3"}, ["puk"] = {"Pu Ko"}, ["puz"] = {"Purum Naga"}, ["rie"] = {"Rien"}, ["rmr"] = {"Caló"}, ["rna"] = {"Runa"}, ["rsi"] = {"Rennellese Sign Language"}, ["sap"] = {"Sanapaná"}, ["sca"] = {"Sansu"}, ["sdm"] = {"Semandang"}, ["sgl"] = {"Sanglechi-Ishkashimi"}, ["sgo"] = {"Songa"}, ["skk"] = {"Sok"}, ["slq"] = {"Salchuq"}, ["smd"] = {"Sama"}, ["snb"] = {"Sebuyau"}, ["snh"] = {"Shinabo"}, ["sul"] = {"Surigaonon"}, ["sum"] = {"Sumo-Mayangna"}, ["svr"] = {"Savara"}, ["szd"] = {"Seru"}, ["tbb"] = {"Tapeba"}, ["tdu"] = {"Tempasuk Dusun"}, ["tgg"] = {"Tangga"}, ["thc"] = {"Tai Hang Tong"}, ["thw"] = {"Thudam"}, ["thx"] = {"The"}, ["tid"] = {"Tidong"}, ["tie"] = {"Tingal"}, ["tkk"] = {"Takpa"}, ["tlw"] = {"South Wemale"}, ["tmk"] = {"Northwestern Tamang"}, ["tmp"] = {"Tai Mène"}, ["tne"] = {"Tinoc Kallahan"}, ["tnf"] = {"Tangshewi"}, ["toe"] = {"Tomedes"}, ["tpw"] = {"Tupí"}, ["tsf"] = {"Southwestern Tamang"}, ["unp"] = {"Worora"}, ["uok"] = {"Uokha"}, ["uun"] = {"Kulon-Pazeh"}, ["vki"] = {"Ija-Zuba"}, ["wgw"] = {"Wagawaga"}, ["wit"] = {"Wintu"}, ["wiw"] = {"Wirangu"}, ["wra"] = {"Warapu"}, ["wrd"] = {"Warduji"}, ["wya"] = {"Wyandot"}, ["xba"] = {"Kamba (Brazil)"}, ["xbx"] = {"Kabixí"}, ["xia"] = {"Xiandao"}, ["xip"] = {"Xipináwa"}, ["xkh"] = {"Karahawyana"}, ["xrq"] = {"Karranga"}, ["xss"] = {"Assan"}, ["xtz"] = {"Tasmanian"}, ["ybd"] = {"Yangbye"}, ["yds"] = {"Yiddish Sign Language"}, ["yen"] = {"Yendang"}, ["yiy"] = {"Yir Yoront"}, ["yma"] = {"Yamphe"}, ["ymt"] = {"Mator-Taygi-Karagas"}, ["ynh"] = {"Yangho"}, ["yos"] = {"Yos"}, ["yri"] = {"Yarí"}, ["yuu"] = {"Yugh"}, ["zir"] = {"Ziriya"}, ["zkb"] = {"Koibal"}, ["zua"] = {"Zeem"} } return { active = active, deprecated = deprecated, } 90939c58de6a6d2fcd35fcf808d04acfa67bc8fd Module:Language/data/iana scripts 828 364 719 718 2023-06-23T00:30:28Z Tasha04 2 1 revision imported Scribunto text/plain -- File-Date: 2023-05-11 return { ["Adlm"] = {"Adlam"}, ["Afak"] = {"Afaka"}, ["Aghb"] = {"Caucasian Albanian"}, ["Ahom"] = {"Ahom", "Tai Ahom"}, ["Arab"] = {"Arabic"}, ["Aran"] = {"Arabic (Nastaliq variant)"}, ["Armi"] = {"Imperial Aramaic"}, ["Armn"] = {"Armenian"}, ["Avst"] = {"Avestan"}, ["Bali"] = {"Balinese"}, ["Bamu"] = {"Bamum"}, ["Bass"] = {"Bassa Vah"}, ["Batk"] = {"Batak"}, ["Beng"] = {"Bengali", "Bangla"}, ["Bhks"] = {"Bhaiksuki"}, ["Blis"] = {"Blissymbols"}, ["Bopo"] = {"Bopomofo"}, ["Brah"] = {"Brahmi"}, ["Brai"] = {"Braille"}, ["Bugi"] = {"Buginese"}, ["Buhd"] = {"Buhid"}, ["Cakm"] = {"Chakma"}, ["Cans"] = {"Unified Canadian Aboriginal Syllabics"}, ["Cari"] = {"Carian"}, ["Cham"] = {"Cham"}, ["Cher"] = {"Cherokee"}, ["Chrs"] = {"Chorasmian"}, ["Cirt"] = {"Cirth"}, ["Copt"] = {"Coptic"}, ["Cpmn"] = {"Cypro-Minoan"}, ["Cprt"] = {"Cypriot syllabary"}, ["Cyrl"] = {"Cyrillic"}, ["Cyrs"] = {"Cyrillic (Old Church Slavonic variant)"}, ["Deva"] = {"Devanagari", "Nagari"}, ["Diak"] = {"Dives Akuru"}, ["Dogr"] = {"Dogra"}, ["Dsrt"] = {"Deseret", "Mormon"}, ["Dupl"] = {"Duployan shorthand", "Duployan stenography"}, ["Egyd"] = {"Egyptian demotic"}, ["Egyh"] = {"Egyptian hieratic"}, ["Egyp"] = {"Egyptian hieroglyphs"}, ["Elba"] = {"Elbasan"}, ["Elym"] = {"Elymaic"}, ["Ethi"] = {"Ethiopic", "Geʻez", "Ge'ez"}, ["Geok"] = {"Khutsuri (Asomtavruli and Nuskhuri)"}, ["Geor"] = {"Georgian (Mkhedruli and Mtavruli)"}, ["Glag"] = {"Glagolitic"}, ["Gong"] = {"Gunjala Gondi"}, ["Gonm"] = {"Masaram Gondi"}, ["Goth"] = {"Gothic"}, ["Gran"] = {"Grantha"}, ["Grek"] = {"Greek"}, ["Gujr"] = {"Gujarati"}, ["Guru"] = {"Gurmukhi"}, ["Hanb"] = {"Han with Bopomofo (alias for Han + Bopomofo)"}, ["Hang"] = {"Hangul", "Hangŭl", "Hangeul"}, ["Hani"] = {"Han", "Hanzi", "Kanji", "Hanja"}, ["Hano"] = {"Hanunoo", "Hanunóo"}, ["Hans"] = {"Han (Simplified variant)"}, ["Hant"] = {"Han (Traditional variant)"}, ["Hatr"] = {"Hatran"}, ["Hebr"] = {"Hebrew"}, ["Hira"] = {"Hiragana"}, ["Hluw"] = {"Anatolian Hieroglyphs", "Luwian Hieroglyphs", "Hittite Hieroglyphs"}, ["Hmng"] = {"Pahawh Hmong"}, ["Hmnp"] = {"Nyiakeng Puachue Hmong"}, ["Hrkt"] = {"Japanese syllabaries (alias for Hiragana + Katakana)"}, ["Hung"] = {"Old Hungarian", "Hungarian Runic"}, ["Inds"] = {"Indus", "Harappan"}, ["Ital"] = {"Old Italic (Etruscan, Oscan, etc.)"}, ["Jamo"] = {"Jamo (alias for Jamo subset of Hangul)"}, ["Java"] = {"Javanese"}, ["Jpan"] = {"Japanese (alias for Han + Hiragana + Katakana)"}, ["Jurc"] = {"Jurchen"}, ["Kali"] = {"Kayah Li"}, ["Kana"] = {"Katakana"}, ["Kawi"] = {"Kawi"}, ["Khar"] = {"Kharoshthi"}, ["Khmr"] = {"Khmer"}, ["Khoj"] = {"Khojki"}, ["Kitl"] = {"Khitan large script"}, ["Kits"] = {"Khitan small script"}, ["Knda"] = {"Kannada"}, ["Kore"] = {"Korean (alias for Hangul + Han)"}, ["Kpel"] = {"Kpelle"}, ["Kthi"] = {"Kaithi"}, ["Lana"] = {"Tai Tham", "Lanna"}, ["Laoo"] = {"Lao"}, ["Latf"] = {"Latin (Fraktur variant)"}, ["Latg"] = {"Latin (Gaelic variant)"}, ["Latn"] = {"Latin"}, ["Leke"] = {"Leke"}, ["Lepc"] = {"Lepcha", "Róng"}, ["Limb"] = {"Limbu"}, ["Lina"] = {"Linear A"}, ["Linb"] = {"Linear B"}, ["Lisu"] = {"Lisu", "Fraser"}, ["Loma"] = {"Loma"}, ["Lyci"] = {"Lycian"}, ["Lydi"] = {"Lydian"}, ["Mahj"] = {"Mahajani"}, ["Maka"] = {"Makasar"}, ["Mand"] = {"Mandaic", "Mandaean"}, ["Mani"] = {"Manichaean"}, ["Marc"] = {"Marchen"}, ["Maya"] = {"Mayan hieroglyphs"}, ["Medf"] = {"Medefaidrin", "Oberi Okaime", "Oberi Ɔkaimɛ"}, ["Mend"] = {"Mende Kikakui"}, ["Merc"] = {"Meroitic Cursive"}, ["Mero"] = {"Meroitic Hieroglyphs"}, ["Mlym"] = {"Malayalam"}, ["Modi"] = {"Modi", "Moḍī"}, ["Mong"] = {"Mongolian"}, ["Moon"] = {"Moon", "Moon code", "Moon script", "Moon type"}, ["Mroo"] = {"Mro", "Mru"}, ["Mtei"] = {"Meitei Mayek", "Meithei", "Meetei"}, ["Mult"] = {"Multani"}, ["Mymr"] = {"Myanmar", "Burmese"}, ["Nagm"] = {"Nag Mundari"}, ["Nand"] = {"Nandinagari"}, ["Narb"] = {"Old North Arabian", "Ancient North Arabian"}, ["Nbat"] = {"Nabataean"}, ["Newa"] = {"Newa", "Newar", "Newari", "Nepāla lipi"}, ["Nkdb"] = {"Naxi Dongba", "na²¹ɕi³³ to³³ba²¹", "Nakhi Tomba"}, ["Nkgb"] = {"Naxi Geba", "na²¹ɕi³³ gʌ²¹ba²¹", "'Na-'Khi ²Ggŏ-¹baw", "Nakhi Geba"}, ["Nkoo"] = {"N’Ko", "N'Ko"}, ["Nshu"] = {"Nüshu"}, ["Ogam"] = {"Ogham"}, ["Olck"] = {"Ol Chiki", "Ol Cemet'", "Ol", "Santali"}, ["Orkh"] = {"Old Turkic", "Orkhon Runic"}, ["Orya"] = {"Oriya", "Odia"}, ["Osge"] = {"Osage"}, ["Osma"] = {"Osmanya"}, ["Ougr"] = {"Old Uyghur"}, ["Palm"] = {"Palmyrene"}, ["Pauc"] = {"Pau Cin Hau"}, ["Pcun"] = {"Proto-Cuneiform"}, ["Pelm"] = {"Proto-Elamite"}, ["Perm"] = {"Old Permic"}, ["Phag"] = {"Phags-pa"}, ["Phli"] = {"Inscriptional Pahlavi"}, ["Phlp"] = {"Psalter Pahlavi"}, ["Phlv"] = {"Book Pahlavi"}, ["Phnx"] = {"Phoenician"}, ["Piqd"] = {"Klingon (KLI pIqaD)"}, ["Plrd"] = {"Miao", "Pollard"}, ["Prti"] = {"Inscriptional Parthian"}, ["Psin"] = {"Proto-Sinaitic"}, ["Ranj"] = {"Ranjana"}, ["Rjng"] = {"Rejang", "Redjang", "Kaganga"}, ["Rohg"] = {"Hanifi Rohingya"}, ["Roro"] = {"Rongorongo"}, ["Runr"] = {"Runic"}, ["Samr"] = {"Samaritan"}, ["Sara"] = {"Sarati"}, ["Sarb"] = {"Old South Arabian"}, ["Saur"] = {"Saurashtra"}, ["Sgnw"] = {"SignWriting"}, ["Shaw"] = {"Shavian", "Shaw"}, ["Shrd"] = {"Sharada", "Śāradā"}, ["Shui"] = {"Shuishu"}, ["Sidd"] = {"Siddham", "Siddhaṃ", "Siddhamātṛkā"}, ["Sind"] = {"Khudawadi", "Sindhi"}, ["Sinh"] = {"Sinhala"}, ["Sogd"] = {"Sogdian"}, ["Sogo"] = {"Old Sogdian"}, ["Sora"] = {"Sora Sompeng"}, ["Soyo"] = {"Soyombo"}, ["Sund"] = {"Sundanese"}, ["Sunu"] = {"Sunuwar"}, ["Sylo"] = {"Syloti Nagri"}, ["Syrc"] = {"Syriac"}, ["Syre"] = {"Syriac (Estrangelo variant)"}, ["Syrj"] = {"Syriac (Western variant)"}, ["Syrn"] = {"Syriac (Eastern variant)"}, ["Tagb"] = {"Tagbanwa"}, ["Takr"] = {"Takri", "Ṭākrī", "Ṭāṅkrī"}, ["Tale"] = {"Tai Le"}, ["Talu"] = {"New Tai Lue"}, ["Taml"] = {"Tamil"}, ["Tang"] = {"Tangut"}, ["Tavt"] = {"Tai Viet"}, ["Telu"] = {"Telugu"}, ["Teng"] = {"Tengwar"}, ["Tfng"] = {"Tifinagh", "Berber"}, ["Tglg"] = {"Tagalog", "Baybayin", "Alibata"}, ["Thaa"] = {"Thaana"}, ["Thai"] = {"Thai"}, ["Tibt"] = {"Tibetan"}, ["Tirh"] = {"Tirhuta"}, ["Tnsa"] = {"Tangsa"}, ["Toto"] = {"Toto"}, ["Ugar"] = {"Ugaritic"}, ["Vaii"] = {"Vai"}, ["Visp"] = {"Visible Speech"}, ["Vith"] = {"Vithkuqi"}, ["Wara"] = {"Warang Citi", "Varang Kshiti"}, ["Wcho"] = {"Wancho"}, ["Wole"] = {"Woleai"}, ["Xpeo"] = {"Old Persian"}, ["Xsux"] = {"Sumero-Akkadian cuneiform"}, ["Yezi"] = {"Yezidi"}, ["Yiii"] = {"Yi"}, ["Zanb"] = {"Zanabazar Square", "Zanabazarin Dörböljin Useg", "Xewtee Dörböljin Bicig", "Horizontal Square Script"}, ["Zinh"] = {"Code for inherited script"}, ["Zmth"] = {"Mathematical notation"}, ["Zsye"] = {"Symbols (Emoji variant)"}, ["Zsym"] = {"Symbols"}, ["Zxxx"] = {"Code for unwritten documents"}, ["Zyyy"] = {"Code for undetermined script"}, ["Zzzz"] = {"Code for uncoded script"} } 279ed2c472c8154d84ff2ea23c214e64c168d7e9 Module:Language/data/iana regions 828 365 721 720 2023-06-23T00:30:28Z Tasha04 2 1 revision imported Scribunto text/plain -- File-Date: 2023-05-11 return { ["AC"] = {"Ascension Island"}, ["AD"] = {"Andorra"}, ["AE"] = {"United Arab Emirates"}, ["AF"] = {"Afghanistan"}, ["AG"] = {"Antigua and Barbuda"}, ["AI"] = {"Anguilla"}, ["AL"] = {"Albania"}, ["AM"] = {"Armenia"}, ["AO"] = {"Angola"}, ["AQ"] = {"Antarctica"}, ["AR"] = {"Argentina"}, ["AS"] = {"American Samoa"}, ["AT"] = {"Austria"}, ["AU"] = {"Australia"}, ["AW"] = {"Aruba"}, ["AX"] = {"Åland Islands"}, ["AZ"] = {"Azerbaijan"}, ["BA"] = {"Bosnia and Herzegovina"}, ["BB"] = {"Barbados"}, ["BD"] = {"Bangladesh"}, ["BE"] = {"Belgium"}, ["BF"] = {"Burkina Faso"}, ["BG"] = {"Bulgaria"}, ["BH"] = {"Bahrain"}, ["BI"] = {"Burundi"}, ["BJ"] = {"Benin"}, ["BL"] = {"Saint Barthélemy"}, ["BM"] = {"Bermuda"}, ["BN"] = {"Brunei Darussalam"}, ["BO"] = {"Bolivia"}, ["BQ"] = {"Bonaire, Sint Eustatius and Saba"}, ["BR"] = {"Brazil"}, ["BS"] = {"Bahamas"}, ["BT"] = {"Bhutan"}, ["BV"] = {"Bouvet Island"}, ["BW"] = {"Botswana"}, ["BY"] = {"Belarus"}, ["BZ"] = {"Belize"}, ["CA"] = {"Canada"}, ["CC"] = {"Cocos (Keeling) Islands"}, ["CD"] = {"The Democratic Republic of the Congo"}, ["CF"] = {"Central African Republic"}, ["CG"] = {"Congo"}, ["CH"] = {"Switzerland"}, ["CI"] = {"Côte d'Ivoire"}, ["CK"] = {"Cook Islands"}, ["CL"] = {"Chile"}, ["CM"] = {"Cameroon"}, ["CN"] = {"China"}, ["CO"] = {"Colombia"}, ["CP"] = {"Clipperton Island"}, ["CQ"] = {"Sark"}, ["CR"] = {"Costa Rica"}, ["CU"] = {"Cuba"}, ["CV"] = {"Cabo Verde", "Cape Verde"}, ["CW"] = {"Curaçao"}, ["CX"] = {"Christmas Island"}, ["CY"] = {"Cyprus"}, ["CZ"] = {"Czechia", "Czech Republic"}, ["DE"] = {"Germany"}, ["DG"] = {"Diego Garcia"}, ["DJ"] = {"Djibouti"}, ["DK"] = {"Denmark"}, ["DM"] = {"Dominica"}, ["DO"] = {"Dominican Republic"}, ["DZ"] = {"Algeria"}, ["EA"] = {"Ceuta, Melilla"}, ["EC"] = {"Ecuador"}, ["EE"] = {"Estonia"}, ["EG"] = {"Egypt"}, ["EH"] = {"Western Sahara"}, ["ER"] = {"Eritrea"}, ["ES"] = {"Spain"}, ["ET"] = {"Ethiopia"}, ["EU"] = {"European Union"}, ["EZ"] = {"Eurozone"}, ["FI"] = {"Finland"}, ["FJ"] = {"Fiji"}, ["FK"] = {"Falkland Islands (Malvinas)"}, ["FM"] = {"Federated States of Micronesia"}, ["FO"] = {"Faroe Islands"}, ["FR"] = {"France"}, ["GA"] = {"Gabon"}, ["GB"] = {"United Kingdom"}, ["GD"] = {"Grenada"}, ["GE"] = {"Georgia"}, ["GF"] = {"French Guiana"}, ["GG"] = {"Guernsey"}, ["GH"] = {"Ghana"}, ["GI"] = {"Gibraltar"}, ["GL"] = {"Greenland"}, ["GM"] = {"Gambia"}, ["GN"] = {"Guinea"}, ["GP"] = {"Guadeloupe"}, ["GQ"] = {"Equatorial Guinea"}, ["GR"] = {"Greece"}, ["GS"] = {"South Georgia and the South Sandwich Islands"}, ["GT"] = {"Guatemala"}, ["GU"] = {"Guam"}, ["GW"] = {"Guinea-Bissau"}, ["GY"] = {"Guyana"}, ["HK"] = {"Hong Kong"}, ["HM"] = {"Heard Island and McDonald Islands"}, ["HN"] = {"Honduras"}, ["HR"] = {"Croatia"}, ["HT"] = {"Haiti"}, ["HU"] = {"Hungary"}, ["IC"] = {"Canary Islands"}, ["ID"] = {"Indonesia"}, ["IE"] = {"Ireland"}, ["IL"] = {"Israel"}, ["IM"] = {"Isle of Man"}, ["IN"] = {"India"}, ["IO"] = {"British Indian Ocean Territory"}, ["IQ"] = {"Iraq"}, ["IR"] = {"Islamic Republic of Iran"}, ["IS"] = {"Iceland"}, ["IT"] = {"Italy"}, ["JE"] = {"Jersey"}, ["JM"] = {"Jamaica"}, ["JO"] = {"Jordan"}, ["JP"] = {"Japan"}, ["KE"] = {"Kenya"}, ["KG"] = {"Kyrgyzstan"}, ["KH"] = {"Cambodia"}, ["KI"] = {"Kiribati"}, ["KM"] = {"Comoros"}, ["KN"] = {"Saint Kitts and Nevis"}, ["KP"] = {"Democratic People's Republic of Korea"}, ["KR"] = {"Republic of Korea"}, ["KW"] = {"Kuwait"}, ["KY"] = {"Cayman Islands"}, ["KZ"] = {"Kazakhstan"}, ["LA"] = {"Lao People's Democratic Republic"}, ["LB"] = {"Lebanon"}, ["LC"] = {"Saint Lucia"}, ["LI"] = {"Liechtenstein"}, ["LK"] = {"Sri Lanka"}, ["LR"] = {"Liberia"}, ["LS"] = {"Lesotho"}, ["LT"] = {"Lithuania"}, ["LU"] = {"Luxembourg"}, ["LV"] = {"Latvia"}, ["LY"] = {"Libya"}, ["MA"] = {"Morocco"}, ["MC"] = {"Monaco"}, ["MD"] = {"Moldova"}, ["ME"] = {"Montenegro"}, ["MF"] = {"Saint Martin (French part)"}, ["MG"] = {"Madagascar"}, ["MH"] = {"Marshall Islands"}, ["MK"] = {"North Macedonia"}, ["ML"] = {"Mali"}, ["MM"] = {"Myanmar"}, ["MN"] = {"Mongolia"}, ["MO"] = {"Macao"}, ["MP"] = {"Northern Mariana Islands"}, ["MQ"] = {"Martinique"}, ["MR"] = {"Mauritania"}, ["MS"] = {"Montserrat"}, ["MT"] = {"Malta"}, ["MU"] = {"Mauritius"}, ["MV"] = {"Maldives"}, ["MW"] = {"Malawi"}, ["MX"] = {"Mexico"}, ["MY"] = {"Malaysia"}, ["MZ"] = {"Mozambique"}, ["NA"] = {"Namibia"}, ["NC"] = {"New Caledonia"}, ["NE"] = {"Niger"}, ["NF"] = {"Norfolk Island"}, ["NG"] = {"Nigeria"}, ["NI"] = {"Nicaragua"}, ["NL"] = {"Netherlands"}, ["NO"] = {"Norway"}, ["NP"] = {"Nepal"}, ["NR"] = {"Nauru"}, ["NU"] = {"Niue"}, ["NZ"] = {"New Zealand"}, ["OM"] = {"Oman"}, ["PA"] = {"Panama"}, ["PE"] = {"Peru"}, ["PF"] = {"French Polynesia"}, ["PG"] = {"Papua New Guinea"}, ["PH"] = {"Philippines"}, ["PK"] = {"Pakistan"}, ["PL"] = {"Poland"}, ["PM"] = {"Saint Pierre and Miquelon"}, ["PN"] = {"Pitcairn"}, ["PR"] = {"Puerto Rico"}, ["PS"] = {"State of Palestine"}, ["PT"] = {"Portugal"}, ["PW"] = {"Palau"}, ["PY"] = {"Paraguay"}, ["QA"] = {"Qatar"}, ["RE"] = {"Réunion"}, ["RO"] = {"Romania"}, ["RS"] = {"Serbia"}, ["RU"] = {"Russian Federation"}, ["RW"] = {"Rwanda"}, ["SA"] = {"Saudi Arabia"}, ["SB"] = {"Solomon Islands"}, ["SC"] = {"Seychelles"}, ["SD"] = {"Sudan"}, ["SE"] = {"Sweden"}, ["SG"] = {"Singapore"}, ["SH"] = {"Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {"Slovenia"}, ["SJ"] = {"Svalbard and Jan Mayen"}, ["SK"] = {"Slovakia"}, ["SL"] = {"Sierra Leone"}, ["SM"] = {"San Marino"}, ["SN"] = {"Senegal"}, ["SO"] = {"Somalia"}, ["SR"] = {"Suriname"}, ["SS"] = {"South Sudan"}, ["ST"] = {"Sao Tome and Principe"}, ["SV"] = {"El Salvador"}, ["SX"] = {"Sint Maarten (Dutch part)"}, ["SY"] = {"Syrian Arab Republic"}, ["SZ"] = {"Eswatini", "eSwatini", "Swaziland"}, ["TA"] = {"Tristan da Cunha"}, ["TC"] = {"Turks and Caicos Islands"}, ["TD"] = {"Chad"}, ["TF"] = {"French Southern Territories"}, ["TG"] = {"Togo"}, ["TH"] = {"Thailand"}, ["TJ"] = {"Tajikistan"}, ["TK"] = {"Tokelau"}, ["TL"] = {"Timor-Leste"}, ["TM"] = {"Turkmenistan"}, ["TN"] = {"Tunisia"}, ["TO"] = {"Tonga"}, ["TR"] = {"Türkiye", "Turkey"}, ["TT"] = {"Trinidad and Tobago"}, ["TV"] = {"Tuvalu"}, ["TW"] = {"Taiwan, Province of China"}, ["TZ"] = {"United Republic of Tanzania"}, ["UA"] = {"Ukraine"}, ["UG"] = {"Uganda"}, ["UM"] = {"United States Minor Outlying Islands"}, ["UN"] = {"United Nations"}, ["US"] = {"United States"}, ["UY"] = {"Uruguay"}, ["UZ"] = {"Uzbekistan"}, ["VA"] = {"Holy See (Vatican City State)"}, ["VC"] = {"Saint Vincent and the Grenadines"}, ["VE"] = {"Venezuela"}, ["VG"] = {"British Virgin Islands"}, ["VI"] = {"U.S. Virgin Islands"}, ["VN"] = {"Viet Nam"}, ["VU"] = {"Vanuatu"}, ["WF"] = {"Wallis and Futuna"}, ["WS"] = {"Samoa"}, ["YE"] = {"Yemen"}, ["YT"] = {"Mayotte"}, ["ZA"] = {"South Africa"}, ["ZM"] = {"Zambia"}, ["ZW"] = {"Zimbabwe"}, ["001"] = {"World"}, ["002"] = {"Africa"}, ["003"] = {"North America"}, ["005"] = {"South America"}, ["009"] = {"Oceania"}, ["011"] = {"Western Africa"}, ["013"] = {"Central America"}, ["014"] = {"Eastern Africa"}, ["015"] = {"Northern Africa"}, ["017"] = {"Middle Africa"}, ["018"] = {"Southern Africa"}, ["019"] = {"Americas"}, ["021"] = {"Northern America"}, ["029"] = {"Caribbean"}, ["030"] = {"Eastern Asia"}, ["034"] = {"Southern Asia"}, ["035"] = {"South-Eastern Asia"}, ["039"] = {"Southern Europe"}, ["053"] = {"Australia and New Zealand"}, ["054"] = {"Melanesia"}, ["057"] = {"Micronesia"}, ["061"] = {"Polynesia"}, ["142"] = {"Asia"}, ["143"] = {"Central Asia"}, ["145"] = {"Western Asia"}, ["150"] = {"Europe"}, ["151"] = {"Eastern Europe"}, ["154"] = {"Northern Europe"}, ["155"] = {"Western Europe"}, ["202"] = {"Sub-Saharan Africa"}, ["419"] = {"Latin America and the Caribbean"} } 9b8ad87e9a14bff745205a082bcd25cbcd8713ee Module:Language/data/iana variants 828 366 723 722 2023-06-23T00:30:28Z Tasha04 2 1 revision imported Scribunto text/plain -- File-Date: 2023-05-11 return { ["1606nict"] = { ["descriptions"] = {"Late Middle French (to 1606)"}, ["prefixes"] = {"frm"}, }, ["1694acad"] = { ["descriptions"] = {"Early Modern French"}, ["prefixes"] = {"fr"}, }, ["1901"] = { ["descriptions"] = {"Traditional German orthography"}, ["prefixes"] = {"de"}, }, ["1959acad"] = { ["descriptions"] = {"\"Academic\" (\"governmental\") variant of Belarusian as codified in 1959"}, ["prefixes"] = {"be"}, }, ["1994"] = { ["descriptions"] = {"Standardized Resian orthography"}, ["prefixes"] = {"sl-rozaj", "sl-rozaj-biske", "sl-rozaj-njiva", "sl-rozaj-osojs", "sl-rozaj-solba"}, }, ["1996"] = { ["descriptions"] = {"German orthography of 1996"}, ["prefixes"] = {"de"}, }, ["abl1943"] = { ["descriptions"] = {"Orthographic formulation of 1943 - Official in Brazil (Formulário Ortográfico de 1943 - Oficial no Brasil)"}, ["prefixes"] = {"pt-br"}, }, ["akuapem"] = { ["descriptions"] = {"Akuapem Twi"}, ["prefixes"] = {"tw"}, }, ["alalc97"] = { ["descriptions"] = {"ALA-LC Romanization, 1997 edition"}, ["prefixes"] = {}, }, ["aluku"] = { ["descriptions"] = {"Aluku dialect", "Boni dialect"}, ["prefixes"] = {"djk"}, }, ["ao1990"] = { ["descriptions"] = {"Portuguese Language Orthographic Agreement of 1990 (Acordo Ortográfico da Língua Portuguesa de 1990)"}, ["prefixes"] = {"pt", "gl"}, }, ["aranes"] = { ["descriptions"] = {"Aranese"}, ["prefixes"] = {"oc"}, }, ["arkaika"] = { ["descriptions"] = {"Arcaicam Esperantom", "Arkaika Esperanto"}, ["prefixes"] = {"eo"}, }, ["asante"] = { ["descriptions"] = {"Asante Twi", "Ashanti Twi"}, ["prefixes"] = {"tw"}, }, ["auvern"] = { ["descriptions"] = {"Auvergnat"}, ["prefixes"] = {"oc"}, }, ["baku1926"] = { ["descriptions"] = {"Unified Turkic Latin Alphabet (Historical)"}, ["prefixes"] = {"az", "ba", "crh", "kk", "krc", "ky", "sah", "tk", "tt", "uz"}, }, ["balanka"] = { ["descriptions"] = {"The Balanka dialect of Anii"}, ["prefixes"] = {"blo"}, }, ["barla"] = { ["descriptions"] = {"The Barlavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["basiceng"] = { ["descriptions"] = {"Basic English"}, ["prefixes"] = {"en"}, }, ["bauddha"] = { ["descriptions"] = {"Buddhist Hybrid Sanskrit"}, ["prefixes"] = {"sa"}, }, ["bciav"] = { ["descriptions"] = {"BCI Blissymbolics AV"}, ["prefixes"] = {"zbl"}, }, ["bcizbl"] = { ["descriptions"] = {"BCI Blissymbolics"}, ["prefixes"] = {"zbl"}, }, ["biscayan"] = { ["descriptions"] = {"Biscayan dialect of Basque"}, ["prefixes"] = {"eu"}, }, ["biske"] = { ["descriptions"] = {"The San Giorgio dialect of Resian", "The Bila dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["bohoric"] = { ["descriptions"] = {"Slovene in Bohorič alphabet"}, ["prefixes"] = {"sl"}, }, ["boont"] = { ["descriptions"] = {"Boontling"}, ["prefixes"] = {"en"}, }, ["bornholm"] = { ["descriptions"] = {"Bornholmsk"}, ["prefixes"] = {"da"}, }, ["cisaup"] = { ["descriptions"] = {"Cisalpine"}, ["prefixes"] = {"oc"}, }, ["colb1945"] = { ["descriptions"] = {"Portuguese-Brazilian Orthographic Convention of 1945 (Convenção Ortográfica Luso-Brasileira de 1945)"}, ["prefixes"] = {"pt"}, }, ["cornu"] = { ["descriptions"] = {"Cornu-English", "Cornish English", "Anglo-Cornish"}, ["prefixes"] = {"en"}, }, ["creiss"] = { ["descriptions"] = {"Occitan variants of the Croissant area"}, ["prefixes"] = {"oc"}, }, ["dajnko"] = { ["descriptions"] = {"Slovene in Dajnko alphabet"}, ["prefixes"] = {"sl"}, }, ["ekavsk"] = { ["descriptions"] = {"Serbian with Ekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["emodeng"] = { ["descriptions"] = {"Early Modern English (1500-1700)"}, ["prefixes"] = {"en"}, }, ["fonipa"] = { ["descriptions"] = {"International Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonkirsh"] = { ["descriptions"] = {"Kirshenbaum Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonnapa"] = { ["descriptions"] = {"North American Phonetic Alphabet", "Americanist Phonetic Notation"}, ["prefixes"] = {}, }, ["fonupa"] = { ["descriptions"] = {"Uralic Phonetic Alphabet"}, ["prefixes"] = {}, }, ["fonxsamp"] = { ["descriptions"] = {"X-SAMPA transcription"}, ["prefixes"] = {}, }, ["gallo"] = { ["descriptions"] = {"Gallo"}, ["prefixes"] = {"fr"}, }, ["gascon"] = { ["descriptions"] = {"Gascon"}, ["prefixes"] = {"oc"}, }, ["grclass"] = { ["descriptions"] = {"Classical Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["grital"] = { ["descriptions"] = {"Italian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-cisaup", "oc-nicard", "oc-provenc"}, }, ["grmistr"] = { ["descriptions"] = {"Mistralian or Mistralian-inspired Occitan orthography"}, ["prefixes"] = {"oc", "oc-aranes", "oc-auvern", "oc-cisaup", "oc-creiss", "oc-gascon", "oc-lemosin", "oc-lengadoc", "oc-nicard", "oc-provenc", "oc-vivaraup"}, }, ["hepburn"] = { ["descriptions"] = {"Hepburn romanization"}, ["prefixes"] = {"ja-latn"}, }, ["hognorsk"] = { ["descriptions"] = {"Norwegian in Høgnorsk (High Norwegian) orthography"}, ["prefixes"] = {"nn"}, }, ["hsistemo"] = { ["descriptions"] = {"Standard H-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, }, ["ijekavsk"] = { ["descriptions"] = {"Serbian with Ijekavian pronunciation"}, ["prefixes"] = {"sr", "sr-latn", "sr-cyrl"}, }, ["itihasa"] = { ["descriptions"] = {"Epic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["ivanchov"] = { ["descriptions"] = {"Bulgarian in 1899 orthography"}, ["prefixes"] = {"bg"}, }, ["jauer"] = { ["descriptions"] = {"Jauer dialect of Romansh"}, ["prefixes"] = {"rm"}, }, ["jyutping"] = { ["descriptions"] = {"Jyutping Cantonese Romanization"}, ["prefixes"] = {"yue"}, }, ["kkcor"] = { ["descriptions"] = {"Common Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["kociewie"] = { ["descriptions"] = {"The Kociewie dialect of Polish"}, ["prefixes"] = {"pl"}, }, ["kscor"] = { ["descriptions"] = {"Standard Cornish orthography of Revived Cornish", "Kernowek Standard"}, ["prefixes"] = {"kw"}, }, ["laukika"] = { ["descriptions"] = {"Classical Sanskrit"}, ["prefixes"] = {"sa"}, }, ["lemosin"] = { ["descriptions"] = {"Limousin"}, ["prefixes"] = {"oc"}, }, ["lengadoc"] = { ["descriptions"] = {"Languedocien"}, ["prefixes"] = {"oc"}, }, ["lipaw"] = { ["descriptions"] = {"The Lipovaz dialect of Resian", "The Lipovec dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["ltg1929"] = { ["descriptions"] = {"The Latgalian language orthography codified in 1929"}, ["prefixes"] = {"ltg"}, }, ["ltg2007"] = { ["descriptions"] = {"The Latgalian language orthography codified in the language law in 2007"}, ["prefixes"] = {"ltg"}, }, ["luna1918"] = { ["descriptions"] = {"Post-1917 Russian orthography"}, ["prefixes"] = {"ru"}, }, ["metelko"] = { ["descriptions"] = {"Slovene in Metelko alphabet"}, ["prefixes"] = {"sl"}, }, ["monoton"] = { ["descriptions"] = {"Monotonic Greek"}, ["prefixes"] = {"el"}, }, ["ndyuka"] = { ["descriptions"] = {"Ndyuka dialect", "Aukan dialect"}, ["prefixes"] = {"djk"}, }, ["nedis"] = { ["descriptions"] = {"Natisone dialect", "Nadiza dialect"}, ["prefixes"] = {"sl"}, }, ["newfound"] = { ["descriptions"] = {"Newfoundland English"}, ["prefixes"] = {"en-ca"}, }, ["nicard"] = { ["descriptions"] = {"Niçard"}, ["prefixes"] = {"oc"}, }, ["njiva"] = { ["descriptions"] = {"The Gniva dialect of Resian", "The Njiva dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["nulik"] = { ["descriptions"] = {"Volapük nulik", "Volapük perevidöl", "Volapük nulädik", "de Jong's Volapük", "New Volapük", "Revised Volapük", "Modern Volapük"}, ["prefixes"] = {"vo"}, }, ["osojs"] = { ["descriptions"] = {"The Oseacco dialect of Resian", "The Osojane dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["oxendict"] = { ["descriptions"] = {"Oxford English Dictionary spelling"}, ["prefixes"] = {"en"}, }, ["pahawh2"] = { ["descriptions"] = {"Pahawh Hmong Second Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh3"] = { ["descriptions"] = {"Pahawh Hmong Third Stage Reduced orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pahawh4"] = { ["descriptions"] = {"Pahawh Hmong Final Version orthography"}, ["prefixes"] = {"mww", "hnj"}, }, ["pamaka"] = { ["descriptions"] = {"Pamaka dialect"}, ["prefixes"] = {"djk"}, }, ["peano"] = { ["descriptions"] = {"Latino Sine Flexione", "Interlingua de API", "Interlingua de Peano"}, ["prefixes"] = {"la"}, }, ["petr1708"] = { ["descriptions"] = {"Petrine orthography"}, ["prefixes"] = {"ru"}, }, ["pinyin"] = { ["descriptions"] = {"Pinyin romanization"}, ["prefixes"] = {"zh-latn", "bo-latn"}, }, ["polyton"] = { ["descriptions"] = {"Polytonic Greek"}, ["prefixes"] = {"el"}, }, ["provenc"] = { ["descriptions"] = {"Provençal"}, ["prefixes"] = {"oc"}, }, ["puter"] = { ["descriptions"] = {"Puter idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["rigik"] = { ["descriptions"] = {"Volapük rigik", "Schleyer's Volapük", "Original Volapük", "Classic Volapük"}, ["prefixes"] = {"vo"}, }, ["rozaj"] = { ["descriptions"] = {"Resian", "Resianic", "Rezijan"}, ["prefixes"] = {"sl"}, }, ["rumgr"] = { ["descriptions"] = {"Rumantsch Grischun"}, ["prefixes"] = {"rm"}, }, ["scotland"] = { ["descriptions"] = {"Scottish Standard English"}, ["prefixes"] = {"en"}, }, ["scouse"] = { ["descriptions"] = {"Scouse"}, ["prefixes"] = {"en"}, }, ["simple"] = { ["descriptions"] = {"Simplified form"}, ["prefixes"] = {}, }, ["solba"] = { ["descriptions"] = {"The Stolvizza dialect of Resian", "The Solbica dialect of Resian"}, ["prefixes"] = {"sl-rozaj"}, }, ["sotav"] = { ["descriptions"] = {"The Sotavento dialect group of Kabuverdianu"}, ["prefixes"] = {"kea"}, }, ["spanglis"] = { ["descriptions"] = {"Spanglish"}, ["prefixes"] = {"en", "es"}, }, ["surmiran"] = { ["descriptions"] = {"Surmiran idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sursilv"] = { ["descriptions"] = {"Sursilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["sutsilv"] = { ["descriptions"] = {"Sutsilvan idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["synnejyl"] = { ["descriptions"] = {"Synnejysk", "South Jutish"}, ["prefixes"] = {"da"}, }, ["tarask"] = { ["descriptions"] = {"Belarusian in Taraskievica orthography"}, ["prefixes"] = {"be"}, }, ["tongyong"] = { ["descriptions"] = {"Tongyong Pinyin romanization"}, ["prefixes"] = {"zh-latn"}, }, ["tunumiit"] = { ["descriptions"] = {"Tunumiisiut", "East Greenlandic", "Østgrønlandsk"}, ["prefixes"] = {"kl"}, }, ["uccor"] = { ["descriptions"] = {"Unified Cornish orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ucrcor"] = { ["descriptions"] = {"Unified Cornish Revised orthography of Revived Cornish"}, ["prefixes"] = {"kw"}, }, ["ulster"] = { ["descriptions"] = {"Ulster dialect of Scots"}, ["prefixes"] = {"sco"}, }, ["unifon"] = { ["descriptions"] = {"Unifon phonetic alphabet"}, ["prefixes"] = {"en", "hup", "kyh", "tol", "yur"}, }, ["vaidika"] = { ["descriptions"] = {"Vedic Sanskrit"}, ["prefixes"] = {"sa"}, }, ["valencia"] = { ["descriptions"] = {"Valencian"}, ["prefixes"] = {"ca"}, }, ["vallader"] = { ["descriptions"] = {"Vallader idiom of Romansh"}, ["prefixes"] = {"rm"}, }, ["vecdruka"] = { ["descriptions"] = {"Latvian orthography used before 1920s (\"vecā druka\")"}, ["prefixes"] = {"lv"}, }, ["vivaraup"] = { ["descriptions"] = {"Vivaro-Alpine"}, ["prefixes"] = {"oc"}, }, ["wadegile"] = { ["descriptions"] = {"Wade-Giles romanization"}, ["prefixes"] = {"zh-latn"}, }, ["xsistemo"] = { ["descriptions"] = {"Standard X-system orthographic fallback for spelling Esperanto"}, ["prefixes"] = {"eo"}, } } 6e18c8087ecffb70ab2722634deb5ede2d84fffa Module:Language/data/iana suppressed scripts 828 367 725 724 2023-06-23T00:30:29Z Tasha04 2 1 revision imported Scribunto text/plain -- File-Date: 2023-05-11 return { ["Arab"] = {"ar", "fa", "ps", "ur"}, ["Armn"] = {"hy"}, ["Beng"] = {"as", "bn"}, ["Blis"] = {"zbl"}, ["Cyrl"] = {"ab", "be", "bg", "kk", "mk", "ru", "uk"}, ["Deva"] = {"hi", "mr", "ne", "kok", "mai"}, ["Ethi"] = {"am", "ti"}, ["Geor"] = {"ka"}, ["Grek"] = {"el"}, ["Gujr"] = {"gu"}, ["Guru"] = {"pa"}, ["Hebr"] = {"he", "iw", "yi"}, ["Jpan"] = {"ja"}, ["Khmr"] = {"km"}, ["Knda"] = {"kn"}, ["Kore"] = {"ko"}, ["Laoo"] = {"lo"}, ["Latn"] = {"af", "ay", "bs", "ca", "ch", "cs", "cy", "da", "de", "en", "eo", "es", "et", "eu", "fi", "fj", "fo", "fr", "fy", "ga", "gl", "gn", "gv", "hr", "ht", "hu", "id", "in", "is", "it", "kl", "la", "lb", "ln", "lt", "lv", "mg", "mh", "mo", "ms", "mt", "na", "nb", "nd", "nl", "nn", "no", "nr", "ny", "om", "pl", "pt", "qu", "rm", "rn", "ro", "rw", "sg", "sk", "sl", "sm", "so", "sq", "ss", "st", "sv", "sw", "tl", "tn", "to", "tr", "ts", "ve", "vi", "xh", "zu", "dsb", "frr", "frs", "gsw", "hsb", "men", "nds", "niu", "nso", "tem", "tkl", "tmh", "tpi", "tvl"}, ["Mlym"] = {"ml"}, ["Mymr"] = {"my"}, ["Nkoo"] = {"nqo"}, ["Orya"] = {"or"}, ["Sinh"] = {"si"}, ["Taml"] = {"ta"}, ["Telu"] = {"te"}, ["Thaa"] = {"dv"}, ["Thai"] = {"th"}, ["Tibt"] = {"dz"} } fd9ca3f5beaba5fdfc149a8d24e63fa3a9768f4f Module:Lang/ISO 639 synonyms 828 368 727 726 2023-06-23T00:30:29Z Tasha04 2 1 revision imported Scribunto text/plain -- File-Date: 2013-01-11 return { ["aar"] = "aa", ["abk"] = "ab", ["afr"] = "af", ["aka"] = "ak", ["amh"] = "am", ["ara"] = "ar", ["arg"] = "an", ["asm"] = "as", ["ava"] = "av", ["ave"] = "ae", ["aym"] = "ay", ["aze"] = "az", ["bak"] = "ba", ["bam"] = "bm", ["bel"] = "be", ["ben"] = "bn", ["bih"] = "bh", ["bis"] = "bi", ["bod"] = "bo", ["bos"] = "bs", ["bre"] = "br", ["bul"] = "bg", ["cat"] = "ca", ["ces"] = "cs", ["cha"] = "ch", ["che"] = "ce", ["chu"] = "cu", ["chv"] = "cv", ["cor"] = "kw", ["cos"] = "co", ["cre"] = "cr", ["cym"] = "cy", ["dan"] = "da", ["deu"] = "de", ["div"] = "dv", ["dzo"] = "dz", ["ell"] = "el", ["eng"] = "en", ["epo"] = "eo", ["est"] = "et", ["eus"] = "eu", ["ewe"] = "ee", ["fao"] = "fo", ["fas"] = "fa", ["fij"] = "fj", ["fin"] = "fi", ["fra"] = "fr", ["fry"] = "fy", ["ful"] = "ff", ["gla"] = "gd", ["gle"] = "ga", ["glg"] = "gl", ["glv"] = "gv", ["grn"] = "gn", ["guj"] = "gu", ["hat"] = "ht", ["hau"] = "ha", ["heb"] = "he", ["her"] = "hz", ["hin"] = "hi", ["hmo"] = "ho", ["hrv"] = "hr", ["hun"] = "hu", ["hye"] = "hy", ["ibo"] = "ig", ["ido"] = "io", ["iii"] = "ii", ["iku"] = "iu", ["ile"] = "ie", ["ina"] = "ia", ["ind"] = "id", ["ipk"] = "ik", ["isl"] = "is", ["ita"] = "it", ["jav"] = "jv", ["jpn"] = "ja", ["kal"] = "kl", ["kan"] = "kn", ["kas"] = "ks", ["kat"] = "ka", ["kau"] = "kr", ["kaz"] = "kk", ["khm"] = "km", ["kik"] = "ki", ["kin"] = "rw", ["kir"] = "ky", ["kom"] = "kv", ["kon"] = "kg", ["kor"] = "ko", ["kua"] = "kj", ["kur"] = "ku", ["lao"] = "lo", ["lat"] = "la", ["lav"] = "lv", ["lim"] = "li", ["lin"] = "ln", ["lit"] = "lt", ["ltz"] = "lb", ["lub"] = "lu", ["lug"] = "lg", ["mah"] = "mh", ["mal"] = "ml", ["mar"] = "mr", ["mkd"] = "mk", ["mlg"] = "mg", ["mlt"] = "mt", ["mon"] = "mn", ["mri"] = "mi", ["msa"] = "ms", ["mya"] = "my", ["nau"] = "na", ["nav"] = "nv", ["nbl"] = "nr", ["nde"] = "nd", ["ndo"] = "ng", ["nep"] = "ne", ["nld"] = "nl", ["nno"] = "nn", ["nob"] = "nb", ["nor"] = "no", ["nya"] = "ny", ["oci"] = "oc", ["oji"] = "oj", ["ori"] = "or", ["orm"] = "om", ["oss"] = "os", ["pan"] = "pa", ["pli"] = "pi", ["pol"] = "pl", ["por"] = "pt", ["pus"] = "ps", ["que"] = "qu", ["roh"] = "rm", ["ron"] = "ro", ["run"] = "rn", ["rus"] = "ru", ["sag"] = "sg", ["san"] = "sa", ["sin"] = "si", ["slk"] = "sk", ["slv"] = "sl", ["sme"] = "se", ["smo"] = "sm", ["sna"] = "sn", ["snd"] = "sd", ["som"] = "so", ["sot"] = "st", ["spa"] = "es", ["sqi"] = "sq", ["srd"] = "sc", ["srp"] = "sr", ["ssw"] = "ss", ["sun"] = "su", ["swa"] = "sw", ["swe"] = "sv", ["tah"] = "ty", ["tam"] = "ta", ["tat"] = "tt", ["tel"] = "te", ["tgk"] = "tg", ["tgl"] = "tl", ["tha"] = "th", ["tir"] = "ti", ["ton"] = "to", ["tsn"] = "tn", ["tso"] = "ts", ["tuk"] = "tk", ["tur"] = "tr", ["twi"] = "tw", ["uig"] = "ug", ["ukr"] = "uk", ["urd"] = "ur", ["uzb"] = "uz", ["ven"] = "ve", ["vie"] = "vi", ["vol"] = "vo", ["wln"] = "wa", ["wol"] = "wo", ["xho"] = "xh", ["yid"] = "yi", ["yor"] = "yo", ["zha"] = "za", ["zho"] = "zh", ["zul"] = "zu" } f3fb5374c9e0fdef6ce6ea22736b79468358ca19 Module:Separated entries 828 371 733 732 2023-06-23T00:30:34Z Tasha04 2 1 revision imported Scribunto text/plain -- This module takes positional parameters as input and concatenates them with -- an optional separator. The final separator (the "conjunction") can be -- specified independently, enabling natural-language lists like -- "foo, bar, baz and qux". The starting parameter can also be specified. local compressSparseArray = require('Module:TableTools').compressSparseArray local p = {} function p._main(args) local separator = args.separator -- Decode (convert to Unicode) HTML escape sequences, such as "&#32;" for space. and mw.text.decode(args.separator) or '' local conjunction = args.conjunction and mw.text.decode(args.conjunction) or separator -- Discard values before the starting parameter. local start = tonumber(args.start) if start then for i = 1, start - 1 do args[i] = nil end end -- Discard named parameters. local values = compressSparseArray(args) return mw.text.listToText(values, separator, conjunction) end local function makeInvokeFunction(separator, conjunction, first) return function (frame) local args = require('Module:Arguments').getArgs(frame) args.separator = separator or args.separator args.conjunction = conjunction or args.conjunction args.first = first or args.first return p._main(args) end end p.main = makeInvokeFunction() p.br = makeInvokeFunction('<br />') p.comma = makeInvokeFunction(mw.message.new('comma-separator'):plain()) return p e80231ff3de01afd7f62a94e0a34dc1e67504085 Module:Side box 828 372 735 734 2023-06-23T00:30:39Z Tasha04 2 1 revision imported Scribunto text/plain local yesno = require('Module:Yesno') local p = {} local function makeData(args) local data = {} -- Main table classes data.classes = {} if yesno(args.metadata) ~= false then table.insert(data.classes, 'metadata') end if args.position and args.position:lower() == 'left' then table.insert(data.classes, 'side-box-left') else table.insert(data.classes, 'side-box-right') end if args.collapsible then table.insert(data.classes, 'mw-collapsible') if args.collapsible == "collapsed" then table.insert(data.classes, 'mw-collapsed') end data.collapsible = true end table.insert(data.classes, args.class) -- Image if args.image and args.image ~= 'none' then data.image = args.image end -- we have to check to see if a downstream use has plainlist like -- Template:Sister_project. also it's the default. wikitext is :( if args.textclass == 'plainlist' or not args.textclass then data.textclass = 'plainlist' data.plainlist_templatestyles = 'Plainlist/styles.css' else data.textclass = args.textclass end -- Copy over data that does not need adjusting local argsToCopy = { -- aria qualities 'role', 'labelledby', -- Styles 'style', 'textstyle', 'templatestyles', -- Above row 'above', 'abovestyle', -- Body row 'text', 'imageright', -- Below row 'below', } for i, key in ipairs(argsToCopy) do data[key] = args[key] end return data end local function renderSidebox(data) -- Renders the sidebox HTML. -- Table root local root = mw.html.create('div') root:attr('role', data.role) :attr('aria-labelledby', data.labelledby) :addClass('side-box') for i, class in ipairs(data.classes or {}) do root:addClass(class) end if data.style then root:cssText(data.style) end local frame = mw.getCurrentFrame() if data.plainlist_templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = data.plainlist_templatestyles } }) end -- The "above" row if data.above then local above = root:newline():tag('div') above:addClass('side-box-abovebelow') :newline() :wikitext(data.above) if data.textstyle then above:cssText(data.textstyle) end if data.abovestyle then above:cssText(data.abovestyle) end end -- The body row local body = root:newline():tag('div') body:addClass('side-box-flex') :addClass(data.collapsible and 'mw-collapsible-content') :newline() if data.image then body:tag('div') :addClass('side-box-image') :wikitext(data.image) end local text = body:newline():tag('div') text:addClass('side-box-text') :addClass(data.textclass) if data.textstyle then text:cssText(data.textstyle) end text:wikitext(data.text) if data.imageright then body:newline():tag('div') :addClass('side-box-imageright') :wikitext(data.imageright) end -- The below row if data.below then local below = root:newline():tag('div') below :addClass('side-box-abovebelow') :wikitext(data.below) if data.textstyle then below:cssText(data.textstyle) end end root:newline() local templatestyles = '' if data.templatestyles then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = data.templatestyles } } end return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Side box/styles.css' } } .. templatestyles .. tostring(root) end function p._main(args) local data = makeData(args) return renderSidebox(data) end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 096bef4a3721857fc16eb509a4f8d75973484485 Template:Transl 10 376 743 742 2023-06-23T00:30:44Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Transliteration]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} cff0d040d26c532c6c3a93a603e86991019a8fba Template:Ubl 10 381 753 752 2023-06-23T00:30:45Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Unbulleted list]] {{Rcat shell| {{R from template shortcut}} }} 6b250cba5f224bbaa761c7bdc41463e1cef32a3d Module:Uses Wikidata 828 388 767 766 2023-06-23T00:30:50Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} function p.usesProperty(frame) local args = frame.getParent(frame).args or nil if mw.text.trim(args[1] or '') == '' then args = frame.args end local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li>[[File:Disc Plain blue dark.svg|middle|4px|link=|alt=]] <b><i>[[d:Property talk:" .. p_num .. "|" .. label .. " (" .. string.upper(p_num) .. ")]]</i></b> (see <span class='plainlinks'>[https://query.wikidata.org/embed.html#SELECT%20%3FWikidata_item_%20%3FWikidata_item_Label%20%3Fvalue%20%3FvalueLabel%20%3FEnglish_Wikipedia_article%20%23Show%20data%20in%20this%20order%0A%7B%0A%09%3FWikidata_item_%20wdt%3A" .. p_num .. "%20%3Fvalue%20.%20%23Collecting%20all%20items%20which%20have%20" .. p_num .. "%20data%2C%20from%20whole%20Wikidata%20item%20pages%0A%09OPTIONAL%20%7B%3FEnglish_Wikipedia_article%20schema%3Aabout%20%3FWikidata_item_%3B%20schema%3AisPartOf%20%3Chttps%3A%2F%2Fen.wikipedia.org%2F%3E%20.%7D%20%23If%20collected%20item%20has%20link%20to%20English%20Wikipedia%2C%20show%20that%0A%09SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%20%7D%20%23Show%20label%20in%20this%20language.%20%22en%22%20is%20English.%20%20%20%0A%7D%0ALIMIT%201000 uses]</span>)</li>" ii = ii + 1 else break end end result = result.."</ul>" return result end function p.tuProperty(frame) local parent = frame.getParent(frame) local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(parent.args[ii] or '') if p_num ~= '' then local label = mw.wikibase.getLabel(p_num) or "NO LABEL" result = result .. "<li><span style='font-size:90%;line-height:1;'>●</span>&nbsp;&nbsp;<b>[[d:Property:" .. p_num .. "|" .. label .. "]]</b> <span style='font-size:90%;'>([[d:Property talk:" .. string.upper(p_num) .. "|" .. p_num .. "]])</span></li>" ii = ii + 1 else break end end result = result.."</ul>" return result end return p 8b704fdbc00fb94538c56f18c5c01f1e72963ea9 Template:Colorbox 10 389 769 768 2023-06-23T00:30:51Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Color box]] {{Redirect category shell| {{R from merge}} {{R from template shortcut}} {{R from modification}} }} fda2429b209ac6c2800d55d664b38599e2a4e287 Template:Clc 10 391 773 772 2023-06-23T00:30:55Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Module:Side box/styles.css 828 393 777 776 2023-06-23T00:30:56Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .side-box { margin: 4px 0; box-sizing: border-box; border: 1px solid #aaa; font-size: 88%; line-height: 1.25em; background-color: #f9f9f9; display: flow-root; } .side-box-abovebelow, .side-box-text { padding: 0.25em 0.9em; } .side-box-image { /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .side-box-imageright { /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* roughly the skin's sidebar + size of side box */ @media (min-width: 500px) { .side-box-flex { display: flex; align-items: center; } .side-box-text { flex: 1; } } @media (min-width: 720px) { .side-box { width: 238px; } .side-box-right { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin-left: 1em; } /* derives from mbox classes, which do not float left in mbox-small-left * so far as I can tell, that was a deliberate decision, since only .ambox * supports mbox-left */ .side-box-left { /* @noflip */ margin-right: 1em; } } 5be55dbc33007e62deac23036c134ed064dbe603 Module:Convert 828 583 1155 1154 2023-06-23T00:34:59Z Tasha04 2 1 revision imported Scribunto text/plain -- Convert a value from one unit of measurement to another. -- Example: {{convert|123|lb|kg}} --> 123 pounds (56 kg) -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. local MINUS = '−' -- Unicode U+2212 MINUS SIGN (UTF-8: e2 88 92) local abs = math.abs local floor = math.floor local format = string.format local log10 = math.log10 local ustring = mw.ustring local ulen = ustring.len local usub = ustring.sub -- Configuration options to keep magic values in one location. -- Conversion data and message text are defined in separate modules. local config, maxsigfig local numdot -- must be '.' or ',' or a character which works in a regex local numsep, numsep_remove, numsep_remove2 local data_code, all_units local text_code local varname -- can be a code to use variable names that depend on value local from_en_table -- to translate an output string of en digits to local language local to_en_table -- to translate an input string of digits in local language to en -- Use translation_table in convert/text to change the following. local en_default -- true uses lang=en unless convert has lang=local or local digits local group_method = 3 -- code for how many digits are in a group local per_word = 'per' -- for units like "liters per kilometer" local plural_suffix = 's' -- only other useful value is probably '' to disable plural unit names local omitsep -- true to omit separator before local symbol/name -- All units should be defined in the data module. However, to cater for quick changes -- and experiments, any unknown unit is looked up in an extra data module, if it exists. -- That module would be transcluded in only a small number of pages, so there should be -- little server overhead from making changes, and changes should propagate quickly. local extra_module -- name of module with extra units local extra_units -- nil or table of extra units from extra_module -- Some options in the invoking template can set variables used later in the module. local currency_text -- for a user-defined currency symbol: {{convert|12|$/ha|$=€}} (euro replaces dollar) local function from_en(text) -- Input is a string representing a number in en digits with '.' decimal mark, -- without digit grouping (which is done just after calling this). -- Return the translation of the string with numdot and digits in local language. if numdot ~= '.' then text = text:gsub('%.', numdot) end if from_en_table then text = text:gsub('%d', from_en_table) end return text end local function to_en(text) -- Input is a string representing a number in the local language with -- an optional numdot decimal mark and numsep digit grouping. -- Return the translation of the string with '.' mark and en digits, -- and no separators (they have to be removed here to handle cases like -- numsep = '.' and numdot = ',' with input "1.234.567,8"). if to_en_table then text = ustring.gsub(text, '%d', to_en_table) end if numsep_remove then text = text:gsub(numsep_remove, '') end if numsep_remove2 then text = text:gsub(numsep_remove2, '') end if numdot ~= '.' then text = text:gsub(numdot, '.') end return text end local function decimal_mark(text) -- Return ',' if text probably is using comma for decimal mark, or has no decimal mark. -- Return '.' if text probably is using dot for decimal mark. -- Otherwise return nothing (decimal mark not known). if not text:find('[.,]') then return ',' end text = text:gsub('^%-', ''):gsub('%+%d+/%d+$', ''):gsub('[Ee]%-?%d+$', '') local decimal = text:match('^0?([.,])%d+$') or text:match('%d([.,])%d?%d?$') or text:match('%d([.,])%d%d%d%d+$') if decimal then return decimal end if text:match('%.%d+%.') then return ',' end if text:match('%,%d+,') then return '.' end end local add_warning, with_separator -- forward declarations local function to_en_with_check(text, parms) -- Version of to_en() for a wiki using numdot = ',' and numsep = '.' to check -- text (an input number as a string) which might have been copied from enwiki. -- For example, in '1.234' the '.' could be a decimal mark or a group separator. -- From viwiki. if to_en_table then text = ustring.gsub(text, '%d', to_en_table) end if decimal_mark(text) == '.' then local original = text text = text:gsub(',', '') -- for example, interpret "1,234.5" as an enwiki value if parms then add_warning(parms, 0, 'cvt_enwiki_num', original, with_separator({}, text)) end else if numsep_remove then text = text:gsub(numsep_remove, '') end if numsep_remove2 then text = text:gsub(numsep_remove2, '') end if numdot ~= '.' then text = text:gsub(numdot, '.') end end return text end local function omit_separator(id) -- Return true if there should be no separator before id (a unit symbol or name). -- For zhwiki, there should be no separator if id uses local characters. -- The following kludge should be a sufficient test. if omitsep then if id:sub(1, 2) == '-{' then -- for "-{...}-" content language variant return true end if id:byte() > 127 then local first = usub(id, 1, 1) if first ~= 'Å' and first ~= '°' and first ~= 'µ' then return true end end end return id:sub(1, 1) == '/' -- no separator before units like "/ha" end local spell_module -- name of module that can spell numbers local speller -- function from that module to handle spelling (set if needed) local wikidata_module, wikidata_data_module -- names of Wikidata modules local wikidata_code, wikidata_data -- exported tables from those modules (set if needed) local function set_config(args) -- Set configuration options from template #invoke or defaults. config = args maxsigfig = config.maxsigfig or 14 -- maximum number of significant figures local data_module, text_module local sandbox = config.sandbox and ('/' .. config.sandbox) or '' data_module = "Module:Convert/data" .. sandbox text_module = "Module:Convert/text" .. sandbox extra_module = "Module:Convert/extra" .. sandbox wikidata_module = "Module:Convert/wikidata" .. sandbox wikidata_data_module = "Module:Convert/wikidata/data" .. sandbox spell_module = "Module:ConvertNumeric" data_code = mw.loadData(data_module) text_code = mw.loadData(text_module) all_units = data_code.all_units local translation = text_code.translation_table if translation then numdot = translation.numdot numsep = translation.numsep if numdot == ',' and numsep == '.' then if text_code.all_messages.cvt_enwiki_num then to_en = to_en_with_check end end if translation.group then group_method = translation.group end if translation.per_word then per_word = translation.per_word end if translation.plural_suffix then plural_suffix = translation.plural_suffix end varname = translation.varname from_en_table = translation.from_en local use_workaround = true if use_workaround then -- 2013-07-05 workaround bug by making a copy of the required table. -- mw.ustring.gsub fails with a table (to_en_table) as the replacement, -- if the table is accessed via mw.loadData. local source = translation.to_en if source then to_en_table = {} for k, v in pairs(source) do to_en_table[k] = v end end else to_en_table = translation.to_en end if translation.lang == 'en default' then en_default = true -- for hiwiki end omitsep = translation.omitsep -- for zhwiki end numdot = config.numdot or numdot or '.' -- decimal mark before fractional digits numsep = config.numsep or numsep or ',' -- group separator for numbers -- numsep should be ',' or '.' or '' or '&nbsp;' or a Unicode character. -- numsep_remove must work in a regex to identify separators to be removed. if numsep ~= '' then numsep_remove = (numsep == '.') and '%.' or numsep end if numsep ~= ',' and numdot ~= ',' then numsep_remove2 = ',' -- so numbers copied from enwiki will work end end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, } end local function divide(numerator, denominator) -- Return integers quotient, remainder resulting from dividing the two -- given numbers, which should be unsigned integers. local quotient, remainder = floor(numerator / denominator), numerator % denominator if not (0 <= remainder and remainder < denominator) then -- Floating point limits may need this, as in {{convert|160.02|Ym|ydftin}}. remainder = 0 end return quotient, remainder end local function split(text, delimiter) -- Return a numbered table with fields from splitting text. -- The delimiter is used in a regex without escaping (for example, '.' would fail). -- Each field has any leading/trailing whitespace removed. local t = {} text = text .. delimiter -- to get last item for item in text:gmatch('%s*(.-)%s*' .. delimiter) do table.insert(t, item) end return t end local function strip(text) -- If text is a string, return its content with no leading/trailing -- whitespace. Otherwise return nil (a nil argument gives a nil result). if type(text) == 'string' then return text:match("^%s*(.-)%s*$") end end local function table_len(t) -- Return length (<100) of a numbered table to replace #t which is -- documented to not work if t is accessed via mw.loadData(). for i = 1, 100 do if t[i] == nil then return i - 1 end end end local function wanted_category(catkey, catsort, want_warning) -- Return message category if it is wanted in current namespace, -- otherwise return ''. local cat local title = mw.title.getCurrentTitle() if title then local nsdefault = '0' -- default namespace: '0' = article; '0,10' = article and template local namespace = title.namespace for _, v in ipairs(split(config.nscat or nsdefault, ',')) do if namespace == tonumber(v) then cat = text_code.all_categories[want_warning and 'warning' or catkey] if catsort and catsort ~= '' and cat:sub(-2) == ']]' then cat = cat:sub(1, -3) .. '|' .. mw.text.nowiki(usub(catsort, 1, 20)) .. ']]' end break end end end return cat or '' end local function message(parms, mcode, is_warning) -- Return wikitext for an error message, including category if specified -- for the message type. -- mcode = numbered table specifying the message: -- mcode[1] = 'cvt_xxx' (string used as a key to get message info) -- mcode[2] = 'parm1' (string to replace '$1' if any in message) -- mcode[3] = 'parm2' (string to replace '$2' if any in message) -- mcode[4] = 'parm3' (string to replace '$3' if any in message) local msg if type(mcode) == 'table' then if mcode[1] == 'cvt_no_output' then -- Some errors should cause convert to output an empty string, -- for example, for an optional field in an infobox. return '' end msg = text_code.all_messages[mcode[1]] end parms.have_problem = true local function subparm(fmt, ...) local rep = {} for i, v in ipairs({...}) do rep['$' .. i] = v end return (fmt:gsub('$%d+', rep)) end if msg then local parts = {} local regex, replace = msg.regex, msg.replace for i = 1, 3 do local limit = 40 local s = mcode[i + 1] if s then if regex and replace then s = s:gsub(regex, replace) limit = nil -- allow long "should be" messages end -- Escape user input so it does not break the message. -- To avoid tags (like {{convert|1<math>23</math>|m}}) breaking -- the mouseover title, any strip marker starting with char(127) is -- replaced with '...' (text not needing i18n). local append local pos = s:find(string.char(127), 1, true) if pos then append = '...' s = s:sub(1, pos - 1) end if limit and ulen(s) > limit then s = usub(s, 1, limit) append = '...' end s = mw.text.nowiki(s) .. (append or '') else s = '?' end parts['$' .. i] = s end local function ispreview() -- Return true if a prominent message should be shown. if parms.test == 'preview' or parms.test == 'nopreview' then -- For testing, can preview a real message or simulate a preview -- when running automated tests. return parms.test == 'preview' end local success, revid = pcall(function () return (parms.frame):preprocess('{{REVISIONID}}') end) return success and (revid == '') end local want_warning = is_warning and not config.warnings and -- show unobtrusive warnings if config.warnings not configured not msg.nowarn -- but use msg settings, not standard warning, if specified local title = string.gsub(msg[1] or 'Missing message', '$%d+', parts) local text = want_warning and '*' or msg[2] or 'Missing message' local cat = wanted_category(msg[3], mcode[2], want_warning) local anchor = msg[4] or '' local fmtkey = ispreview() and 'cvt_format_preview' or (want_warning and 'cvt_format2' or msg.format or 'cvt_format') local fmt = text_code.all_messages[fmtkey] or 'convert: bug' return subparm(fmt, title:gsub('"', '&quot;'), text, cat, anchor) end return 'Convert internal error: unknown message' end function add_warning(parms, level, key, text1, text2) -- for forward declaration above -- If enabled, add a warning that will be displayed after the convert result. -- A higher level is more verbose: more kinds of warnings are displayed. -- To reduce output noise, only the first warning is displayed. if level <= (tonumber(config.warnings) or 1) then if parms.warnings == nil then parms.warnings = message(parms, { key, text1, text2 }, true) end end end local function spell_number(parms, inout, number, numerator, denominator) -- Return result of spelling (number, numerator, denominator), or -- return nil if spelling is not available or not supported for given text. -- Examples (each value must be a string or nil): -- number numerator denominator output -- ------ --------- ----------- ------------------- -- "1.23" nil nil one point two three -- "1" "2" "3" one and two thirds -- nil "2" "3" two thirds if not speller then local function get_speller(module) return require(module).spell_number end local success success, speller = pcall(get_speller, spell_module) if not success or type(speller) ~= 'function' then add_warning(parms, 1, 'cvt_no_spell', 'spell') return nil end end local case if parms.spell_upper == inout then case = true parms.spell_upper = nil -- only uppercase first word in a multiple unit end local sp = not parms.opt_sp_us local adj = parms.opt_adjectival return speller(number, numerator, denominator, case, sp, adj) end ------------------------------------------------------------------------ -- BEGIN: Code required only for built-in units. -- LATER: If need much more code, move to another module to simplify this module. local function speed_of_sound(altitude) -- This is for the Mach built-in unit of speed. -- Return speed of sound in metres per second at given altitude in feet. -- If no altitude given, use default (zero altitude = sea level). -- Table gives speed of sound in miles per hour at various altitudes: -- altitude = -17,499 to 402,499 feet -- mach_table[a + 4] = s where -- a = (altitude / 5000) rounded to nearest integer (-3 to 80) -- s = speed of sound (mph) at that altitude -- LATER: Should calculate result from an interpolation between the next -- lower and higher altitudes in table, rather than rounding to nearest. -- From: http://www.aerospaceweb.org/question/atmosphere/q0112.shtml local mach_table = { -- a = 799.5, 787.0, 774.2, 761.207051, -- -3 to 0 748.0, 734.6, 721.0, 707.0, 692.8, 678.3, 663.5, 660.1, 660.1, 660.1, -- 1 to 10 660.1, 660.1, 660.1, 662.0, 664.3, 666.5, 668.9, 671.1, 673.4, 675.6, -- 11 to 20 677.9, 683.7, 689.9, 696.0, 702.1, 708.1, 714.0, 719.9, 725.8, 731.6, -- 21 to 30 737.3, 737.7, 737.7, 736.2, 730.5, 724.6, 718.8, 712.9, 707.0, 701.0, -- 31 to 40 695.0, 688.9, 682.8, 676.6, 670.4, 664.1, 657.8, 652.9, 648.3, 643.7, -- 41 to 50 639.1, 634.4, 629.6, 624.8, 620.0, 615.2, 613.2, 613.2, 613.2, 613.5, -- 51 to 60 614.4, 615.3, 616.7, 619.8, 623.4, 629.7, 635.0, 641.1, 650.6, 660.0, -- 61 to 70 672.5, 674.3, 676.1, 677.9, 679.7, 681.5, 683.3, 685.1, 686.8, 688.6, -- 71 to 80 } altitude = altitude or 0 local a = (altitude < 0) and -altitude or altitude a = floor(a / 5000 + 0.5) if altitude < 0 then a = -a end if a < -3 then a = -3 elseif a > 80 then a = 80 end return mach_table[a + 4] * 0.44704 -- mph converted to m/s end -- END: Code required only for built-in units. ------------------------------------------------------------------------ local function add_style(parms, class) -- Add selected template style to parms if not already present. parms.templatestyles = parms.templatestyles or {} if not parms.templatestyles[class] then parms.templatestyles[class] = parms.frame:extensionTag({ name = 'templatestyles', args = { src = text_code.titles[class] } }) end end local function get_styles(parms) -- Return string of required template styles, empty if none. if parms.templatestyles then local t = {} for _, v in pairs(parms.templatestyles) do table.insert(t, v) end return table.concat(t) end return '' end local function get_range(word) -- Return a range (string or table) corresponding to word (like "to"), -- or return nil if not a range word. local ranges = text_code.ranges return ranges.types[word] or ranges.types[ranges.aliases[word]] end local function check_mismatch(unit1, unit2) -- If unit1 cannot be converted to unit2, return an error message table. -- This allows conversion between units of the same type, and between -- Nm (normally torque) and ftlb (energy), as in gun-related articles. -- This works because Nm is the base unit (scale = 1) for both the -- primary type (torque), and the alternate type (energy, where Nm = J). -- A match occurs if the primary types are the same, or if unit1 matches -- the alternate type of unit2, and vice versa. That provides a whitelist -- of which conversions are permitted between normally incompatible types. if unit1.utype == unit2.utype or (unit1.utype == unit2.alttype and unit1.alttype == unit2.utype) then return nil end return { 'cvt_mismatch', unit1.utype, unit2.utype } end local function override_from(out_table, in_table, fields) -- Copy the specified fields from in_table to out_table, but do not -- copy nil fields (keep any corresponding field in out_table). for _, field in ipairs(fields) do if in_table[field] then out_table[field] = in_table[field] end end end local function shallow_copy(t) -- Return a shallow copy of table t. -- Do not need the features and overhead of the Scribunto mw.clone(). local result = {} for k, v in pairs(t) do result[k] = v end return result end local unit_mt = { -- Metatable to get missing values for a unit that does not accept SI prefixes. -- Warning: The boolean value 'false' is returned for any missing field -- so __index is not called twice for the same field in a given unit. __index = function (self, key) local value if key == 'name1' or key == 'sym_us' then value = self.symbol elseif key == 'name2' then value = self.name1 .. plural_suffix elseif key == 'name1_us' then value = self.name1 if not rawget(self, 'name2_us') then -- If name1_us is 'foot', do not make name2_us by appending plural_suffix. self.name2_us = self.name2 end elseif key == 'name2_us' then local raw1_us = rawget(self, 'name1_us') if raw1_us then value = raw1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 else value = false end rawset(self, key, value) return value end } local function prefixed_name(unit, name, index) -- Return unit name with SI prefix inserted at correct position. -- index = 1 (name1), 2 (name2), 3 (name1_us), 4 (name2_us). -- The position is a byte (not character) index, so use Lua's sub(). local pos = rawget(unit, 'prefix_position') if type(pos) == 'string' then pos = tonumber(split(pos, ',')[index]) end if pos then return name:sub(1, pos - 1) .. unit.si_name .. name:sub(pos) end return unit.si_name .. name end local unit_prefixed_mt = { -- Metatable to get missing values for a unit that accepts SI prefixes. -- Before use, fields si_name, si_prefix must be defined. -- The unit must define _symbol, _name1 and -- may define _sym_us, _name1_us, _name2_us -- (_sym_us, _name2_us may be defined for a language using sp=us -- to refer to a variant unrelated to U.S. units). __index = function (self, key) local value if key == 'symbol' then value = self.si_prefix .. self._symbol if value == 'l' then value = 'L' end elseif key == 'sym_us' then value = rawget(self, '_sym_us') if value then value = self.si_prefix .. value else value = self.symbol end elseif key == 'name1' then value = prefixed_name(self, self._name1, 1) elseif key == 'name2' then value = rawget(self, '_name2') if value then value = prefixed_name(self, value, 2) else value = self.name1 .. plural_suffix end elseif key == 'name1_us' then value = rawget(self, '_name1_us') if value then value = prefixed_name(self, value, 3) else value = self.name1 end elseif key == 'name2_us' then value = rawget(self, '_name2_us') if value then value = prefixed_name(self, value, 4) elseif rawget(self, '_name1_us') then value = self.name1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 else value = false end rawset(self, key, value) return value end } local unit_per_mt = { -- Metatable to get values for a per unit of form "x/y". -- This is never called to determine a unit name or link because per units -- are handled as a special case. -- Similarly, the default output is handled elsewhere, and for a symbol -- this is only called from get_default() for default_exceptions. __index = function (self, key) local value if key == 'symbol' then local per = self.per local unit1, unit2 = per[1], per[2] if unit1 then value = unit1[key] .. '/' .. unit2[key] else value = '/' .. unit2[key] end elseif key == 'sym_us' then value = self.symbol elseif key == 'scale' then local per = self.per local unit1, unit2 = per[1], per[2] value = (unit1 and unit1.scale or 1) * self.scalemultiplier / unit2.scale else value = false end rawset(self, key, value) return value end } local function make_per(unitcode, unit_table, ulookup) -- Return true, t where t is a per unit with unit codes expanded to unit tables, -- or return false, t where t is an error message table. local result = { unitcode = unitcode, utype = unit_table.utype, per = {} } override_from(result, unit_table, { 'invert', 'iscomplex', 'default', 'link', 'symbol', 'symlink' }) result.symbol_raw = (result.symbol or false) -- to distinguish between a defined exception and a metatable calculation local prefix for i, v in ipairs(unit_table.per) do if i == 1 and v == '' then -- First unit symbol can be empty; that gives a nil first unit table. elseif i == 1 and text_code.currency[v] then prefix = currency_text or v else local success, t = ulookup(v) if not success then return false, t end result.per[i] = t end end local multiplier = unit_table.multiplier if not result.utype then -- Creating an automatic per unit. local unit1 = result.per[1] local utype = (unit1 and unit1.utype or prefix or '') .. '/' .. result.per[2].utype local t = data_code.per_unit_fixups[utype] if t then if type(t) == 'table' then utype = t.utype or utype result.link = result.link or t.link multiplier = multiplier or t.multiplier else utype = t end end result.utype = utype end result.scalemultiplier = multiplier or 1 result.vprefix = prefix or false -- set to non-nil to avoid calling __index return true, setmetatable(result, unit_per_mt) end local function lookup(parms, unitcode, what, utable, fails, depth) -- Return true, t where t is a copy of the unit's converter table, -- or return false, t where t is an error message table. -- Parameter 'what' determines whether combination units are accepted: -- 'no_combination' : single unit only -- 'any_combination' : single unit or combination or output multiple -- 'only_multiple' : single unit or output multiple only -- Parameter unitcode is a symbol (like 'g'), with an optional SI prefix (like 'kg'). -- If, for example, 'kg' is in this table, that entry is used; -- otherwise the prefix ('k') is applied to the base unit ('g'). -- If unitcode is a known combination code (and if allowed by what), -- a table of output multiple unit tables is included in the result. -- For compatibility with the old template, an underscore in a unitcode is -- replaced with a space so usage like {{convert|350|board_feet}} works. -- Wikignomes may also put two spaces or "&nbsp;" in combinations, so -- replace underscore, "&nbsp;", and multiple spaces with a single space. utable = utable or parms.unittable or all_units fails = fails or {} depth = depth and depth + 1 or 1 if depth > 9 then -- There are ways to mistakenly define units which result in infinite -- recursion when lookup() is called. That gives a long delay and very -- confusing error messages, so the depth parameter is used as a guard. return false, { 'cvt_lookup', unitcode } end if unitcode == nil or unitcode == '' then return false, { 'cvt_no_unit' } end unitcode = unitcode:gsub('_', ' '):gsub('&nbsp;', ' '):gsub(' +', ' ') local function call_make_per(t) return make_per(unitcode, t, function (ucode) return lookup(parms, ucode, 'no_combination', utable, fails, depth) end ) end local t = utable[unitcode] if t then if t.shouldbe then return false, { 'cvt_should_be', t.shouldbe } end if t.sp_us then parms.opt_sp_us = true end local target = t.target -- nil, or unitcode is an alias for this target if target then local success, result = lookup(parms, target, what, utable, fails, depth) if not success then return false, result end override_from(result, t, { 'customary', 'default', 'link', 'symbol', 'symlink' }) local multiplier = t.multiplier if multiplier then result.multiplier = tostring(multiplier) result.scale = result.scale * multiplier end return true, result end if t.per then return call_make_per(t) end local combo = t.combination -- nil or a table of unitcodes if combo then local multiple = t.multiple if what == 'no_combination' or (what == 'only_multiple' and not multiple) then return false, { 'cvt_bad_unit', unitcode } end -- Recursively create a combination table containing the -- converter table of each unitcode. local result = { utype = t.utype, multiple = multiple, combination = {} } local cvt = result.combination for i, v in ipairs(combo) do local success, t = lookup(parms, v, multiple and 'no_combination' or 'only_multiple', utable, fails, depth) if not success then return false, t end cvt[i] = t end return true, result end local result = shallow_copy(t) result.unitcode = unitcode if result.prefixes then result.si_name = '' result.si_prefix = '' return true, setmetatable(result, unit_prefixed_mt) end return true, setmetatable(result, unit_mt) end local SIprefixes = text_code.SIprefixes for plen = SIprefixes[1] or 2, 1, -1 do -- Look for an SI prefix; should never occur with an alias. -- Check for longer prefix first ('dam' is decametre). -- SIprefixes[1] = prefix maximum #characters (as seen by mw.ustring.sub). local prefix = usub(unitcode, 1, plen) local si = SIprefixes[prefix] if si then local t = utable[usub(unitcode, plen+1)] if t and t.prefixes then local result = shallow_copy(t) result.unitcode = unitcode result.si_name = parms.opt_sp_us and si.name_us or si.name result.si_prefix = si.prefix or prefix result.scale = t.scale * 10 ^ (si.exponent * t.prefixes) return true, setmetatable(result, unit_prefixed_mt) end end end -- Accept user-defined combinations like "acre+m2+ha" or "acre m2 ha" for output. -- If '+' is used, each unit code can include a space, and any error is fatal. -- If ' ' is used and if each space-separated word is a unit code, it is a combo, -- but errors are not fatal so the unit code can be looked up as an extra unit. local err_is_fatal local combo = collection() if unitcode:find('+', 1, true) then err_is_fatal = true for item in (unitcode .. '+'):gmatch('%s*(.-)%s*%+') do if item ~= '' then combo:add(item) end end elseif unitcode:find('%s') then for item in unitcode:gmatch('%S+') do combo:add(item) end end if combo.n > 1 then local function lookup_combo() if what == 'no_combination' or what == 'only_multiple' then return false, { 'cvt_bad_unit', unitcode } end local result = { combination = {} } local cvt = result.combination for i, v in ipairs(combo) do local success, t = lookup(parms, v, 'only_multiple', utable, fails, depth) if not success then return false, t end if i == 1 then result.utype = t.utype else local mismatch = check_mismatch(result, t) if mismatch then return false, mismatch end end cvt[i] = t end return true, result end local success, result = lookup_combo() if success or err_is_fatal then return success, result end end -- Accept any unit with an engineering notation prefix like "e6cuft" -- (million cubic feet), but not chained prefixes like "e3e6cuft", -- and not if the unit is a combination or multiple, -- and not if the unit has an offset or is a built-in. -- Only en digits are accepted. local exponent, baseunit = unitcode:match('^e(%d+)(.*)') if exponent then local engscale = text_code.eng_scales[exponent] if engscale then local success, result = lookup(parms, baseunit, 'no_combination', utable, fails, depth) if success and not (result.offset or result.builtin or result.engscale) then result.unitcode = unitcode -- 'e6cuft' not 'cuft' result.defkey = unitcode -- key to lookup default exception result.engscale = engscale result.scale = result.scale * 10 ^ tonumber(exponent) return true, result end end end -- Look for x/y; split on right-most slash to get scale correct (x/y/z is x/y per z). local top, bottom = unitcode:match('^(.-)/([^/]+)$') if top and not unitcode:find('e%d') then -- If valid, create an automatic per unit for an "x/y" unit code. -- The unitcode must not include extraneous spaces. -- Engineering notation (apart from at start and which has been stripped before here), -- is not supported so do not make a per unit if find text like 'e3' in unitcode. local success, result = call_make_per({ per = {top, bottom} }) if success then return true, result end end if not parms.opt_ignore_error and not get_range(unitcode) then -- Want the "what links here" list for the extra_module to show only cases -- where an extra unit is used, so do not require it if invoked from {{val}} -- or if looking up a range word which cannot be a unit. if not extra_units then local success, extra = pcall(function () return require(extra_module).extra_units end) if success and type(extra) == 'table' then extra_units = extra end end if extra_units then -- A unit in one data table might refer to a unit in the other table, so -- switch between them, relying on fails or depth to terminate loops. if not fails[unitcode] then fails[unitcode] = true local other = (utable == all_units) and extra_units or all_units local success, result = lookup(parms, unitcode, what, other, fails, depth) if success then return true, result end end end end if to_en_table then -- At fawiki it is common to translate all digits so a unit like "km2" becomes "km۲". local en_code = ustring.gsub(unitcode, '%d', to_en_table) if en_code ~= unitcode then return lookup(parms, en_code, what, utable, fails, depth) end end return false, { 'cvt_unknown', unitcode } end local function valid_number(num) -- Return true if num is a valid number. -- In Scribunto (different from some standard Lua), when expressed as a string, -- overflow or other problems are indicated with text like "inf" or "nan" -- which are regarded as invalid here (each contains "n"). if type(num) == 'number' and tostring(num):find('n', 1, true) == nil then return true end end local function hyphenated(name, parts) -- Return a hyphenated form of given name (for adjectival usage). -- The name may be linked and the target of the link must not be changed. -- Hypothetical examples: -- [[long ton|ton]] → [[long ton|ton]] (no change) -- [[tonne|long ton]] → [[tonne|long-ton]] -- [[metric ton|long ton]] → [[metric ton|long-ton]] -- [[long ton]] → [[long ton|long-ton]] -- Input can also have multiple links in a single name like: -- [[United States customary units|U.S.]] [[US gallon|gallon]] -- [[mile]]s per [[United States customary units|U.S.]] [[quart]] -- [[long ton]]s per [[short ton]] -- Assume that links cannot be nested (never like "[[abc[[def]]ghi]]"). -- This uses a simple and efficient procedure that works for most cases. -- Some units (if used) would require more, and can later think about -- adding a method to handle exceptions. -- The procedure is to replace each space with a hyphen, but -- not a space after ')' [for "(pre-1954&nbsp;US) nautical mile"], and -- not spaces immediately before '(' or in '(...)' [for cases like -- "British thermal unit (ISO)" and "Calorie (International Steam Table)"]. if name:find(' ', 1, true) then if parts then local pos if name:sub(1, 1) == '(' then pos = name:find(')', 1, true) if pos then return name:sub(1, pos+1) .. name:sub(pos+2):gsub(' ', '-') end elseif name:sub(-1) == ')' then pos = name:find('(', 1, true) if pos then return name:sub(1, pos-2):gsub(' ', '-') .. name:sub(pos-1) end end return name:gsub(' ', '-') end parts = collection() for before, item, after in name:gmatch('([^[]*)(%[%[[^[]*%]%])([^[]*)') do if item:find(' ', 1, true) then local prefix local plen = item:find('|', 1, true) if plen then prefix = item:sub(1, plen) item = item:sub(plen + 1, -3) else prefix = item:sub(1, -3) .. '|' item = item:sub(3, -3) end item = prefix .. hyphenated(item, parts) .. ']]' end parts:add(before:gsub(' ', '-') .. item .. after:gsub(' ', '-')) end if parts.n == 0 then -- No link like "[[...]]" was found in the original name. parts:add(hyphenated(name, parts)) end return table.concat(parts) end return name end local function hyphenated_maybe(parms, want_name, sep, id, inout) -- Return s, f where -- s = id, possibly modified -- f = true if hyphenated -- Possible modifications: hyphenate; prepend '-'; append mid text. if id == nil or id == '' then return '' end local mid = (inout == (parms.opt_flip and 'out' or 'in')) and parms.mid or '' if want_name then if parms.opt_adjectival then return '-' .. hyphenated(id) .. mid, true end if parms.opt_add_s and id:sub(-1) ~= 's' then id = id .. 's' -- for nowiki end end return sep .. id .. mid end local function use_minus(text) -- Return text with Unicode minus instead of '-', if present. if text:sub(1, 1) == '-' then return MINUS .. text:sub(2) end return text end local function digit_groups(parms, text, method) -- Return a numbered table of groups of digits (left-to-right, in local language). -- Parameter method is a number or nil: -- 3 for 3-digit grouping (default), or -- 2 for 3-then-2 grouping (only for digits before decimal mark). local len_right local len_left = text:find('.', 1, true) if len_left then len_right = #text - len_left len_left = len_left - 1 else len_left = #text end local twos = method == 2 and len_left > 5 local groups = collection() local run = len_left local n if run < 4 or (run == 4 and parms.opt_comma5) then if parms.opt_gaps then n = run else n = #text end elseif twos then n = run % 2 == 0 and 1 or 2 else n = run % 3 == 0 and 3 or run % 3 end while run > 0 do groups:add(n) run = run - n n = (twos and run > 3) and 2 or 3 end if len_right then if groups.n == 0 then groups:add(0) end if parms.opt_gaps and len_right > 3 then local want4 = not parms.opt_gaps3 -- true gives no gap before trailing single digit local isfirst = true run = len_right while run > 0 do n = (want4 and run == 4) and 4 or (run > 3 and 3 or run) if isfirst then isfirst = false groups[groups.n] = groups[groups.n] + 1 + n else groups:add(n) end run = run - n end else groups[groups.n] = groups[groups.n] + 1 + len_right end end local pos = 1 for i, length in ipairs(groups) do groups[i] = from_en(text:sub(pos, pos + length - 1)) pos = pos + length end return groups end function with_separator(parms, text) -- for forward declaration above -- Input text is a number in en digits with optional '.' decimal mark. -- Return an equivalent, formatted for display: -- with a custom decimal mark instead of '.', if wanted -- with thousand separators inserted, if wanted -- digits in local language -- The given text is like '123' or '123.' or '12345.6789'. -- The text has no sign (caller inserts that later, if necessary). -- When using gaps, they are inserted before and after the decimal mark. -- Separators are inserted only before the decimal mark. -- A trailing dot (as in '123.') is removed because their use appears to -- be accidental, and such a number should be shown as '123' or '123.0'. -- It is useful for convert to suppress the dot so, for example, '4000.' -- is a simple way of indicating that all the digits are significant. if text:sub(-1) == '.' then text = text:sub(1, -2) end if #text < 4 or parms.opt_nocomma or numsep == '' then return from_en(text) end local groups = digit_groups(parms, text, group_method) if parms.opt_gaps then if groups.n <= 1 then return groups[1] or '' end local nowrap = '<span style="white-space: nowrap">' local gap = '<span style="margin-left: 0.25em">' local close = '</span>' return nowrap .. groups[1] .. gap .. table.concat(groups, close .. gap, 2, groups.n) .. close .. close end return table.concat(groups, numsep) end -- An input value like 1.23e12 is displayed using scientific notation (1.23×10¹²). -- That also makes the output use scientific notation, except for small values. -- In addition, very small or very large output values use scientific notation. -- Use format(fmtpower, significand, '10', exponent) where each argument is a string. local fmtpower = '%s<span style="margin:0 .15em 0 .25em">×</span>%s<sup>%s</sup>' local function with_exponent(parms, show, exponent) -- Return wikitext to display the implied value in scientific notation. -- Input uses en digits; output uses digits in local language. return format(fmtpower, with_separator(parms, show), from_en('10'), use_minus(from_en(tostring(exponent)))) end local function make_sigfig(value, sigfig) -- Return show, exponent that are equivalent to the result of -- converting the number 'value' (where value >= 0) to a string, -- rounded to 'sigfig' significant figures. -- The returned items are: -- show: a string of digits; no sign and no dot; -- there is an implied dot before show. -- exponent: a number (an integer) to shift the implied dot. -- Resulting value = tonumber('.' .. show) * 10^exponent. -- Examples: -- make_sigfig(23.456, 3) returns '235', 2 (.235 * 10^2). -- make_sigfig(0.0023456, 3) returns '235', -2 (.235 * 10^-2). -- make_sigfig(0, 3) returns '000', 1 (.000 * 10^1). if sigfig <= 0 then sigfig = 1 elseif sigfig > maxsigfig then sigfig = maxsigfig end if value == 0 then return string.rep('0', sigfig), 1 end local exp, fracpart = math.modf(log10(value)) if fracpart >= 0 then fracpart = fracpart - 1 exp = exp + 1 end local digits = format('%.0f', 10^(fracpart + sigfig)) if #digits > sigfig then -- Overflow (for sigfig=3: like 0.9999 rounding to "1000"; need "100"). digits = digits:sub(1, sigfig) exp = exp + 1 end assert(#digits == sigfig, 'Bug: rounded number has wrong length') return digits, exp end -- Fraction output format. local fracfmt = { { -- Like {{frac}} (fraction slash). '<span class="frac" role="math">{SIGN}<span class="num">{NUM}</span>&frasl;<span class="den">{DEN}</span></span>', -- 1/2 '<span class="frac" role="math">{SIGN}{WHOLE}<span class="sr-only">+</span><span class="num">{NUM}</span>&frasl;<span class="den">{DEN}</span></span>', -- 1+2/3 style = 'frac', }, { -- Like {{sfrac}} (stacked fraction, that is, horizontal bar). '<span class="sfrac tion" role="math">{SIGN}<span class="num">{NUM}</span><span class="sr-only">/</span><span class="den">{DEN}</span></span>', -- 1//2 '<span class="sfrac" role="math">{SIGN}{WHOLE}<span class="sr-only">+</span><span class="tion"><span class="num">{NUM}</span><span class="sr-only">/</span><span class="den">{DEN}</span></span></span>', -- 1+2//3 style = 'sfrac', }, } local function format_fraction(parms, inout, negative, wholestr, numstr, denstr, do_spell, style) -- Return wikitext for a fraction, possibly spelled. -- Inputs use en digits and have no sign; output uses digits in local language. local wikitext if not style then style = parms.opt_fraction_horizontal and 2 or 1 end if wholestr == '' then wholestr = nil end local substitute = { SIGN = negative and MINUS or '', WHOLE = wholestr and with_separator(parms, wholestr), NUM = from_en(numstr), DEN = from_en(denstr), } wikitext = fracfmt[style][wholestr and 2 or 1]:gsub('{(%u+)}', substitute) if do_spell then if negative then if wholestr then wholestr = '-' .. wholestr else numstr = '-' .. numstr end end local s = spell_number(parms, inout, wholestr, numstr, denstr) if s then return s end end add_style(parms, fracfmt[style].style) return wikitext end local function format_number(parms, show, exponent, isnegative) -- Parameter show is a string or a table containing strings. -- Each string is a formatted number in en digits and optional '.' decimal mark. -- A table represents a fraction: integer, numerator, denominator; -- if a table is given, exponent must be nil. -- Return t where t is a table with fields: -- show = wikitext formatted to display implied value -- (digits in local language) -- is_scientific = true if show uses scientific notation -- clean = unformatted show (possibly adjusted and with inserted '.') -- (en digits) -- sign = '' or MINUS -- exponent = exponent (possibly adjusted) -- The clean and exponent fields can be used to calculate the -- rounded absolute value, if needed. -- -- The value implied by the arguments is found from: -- exponent is nil; and -- show is a string of digits (no sign), with an optional dot; -- show = '123.4' is value 123.4, '1234' is value 1234.0; -- or: -- exponent is an integer indicating where dot should be; -- show is a string of digits (no sign and no dot); -- there is an implied dot before show; -- show does not start with '0'; -- show = '1234', exponent = 3 is value 0.1234*10^3 = 123.4. -- -- The formatted result: -- * Is for an output value and is spelled if wanted and possible. -- * Includes a Unicode minus if isnegative and not spelled. -- * Uses a custom decimal mark, if wanted. -- * Has digits grouped where necessary, if wanted. -- * Uses scientific notation if requested, or for very small or large values -- (which forces result to not be spelled). -- * Has no more than maxsigfig significant digits -- (same as old template and {{#expr}}). local xhi, xlo -- these control when scientific notation (exponent) is used if parms.opt_scientific then xhi, xlo = 4, 2 -- default for output if input uses e-notation elseif parms.opt_scientific_always then xhi, xlo = 0, 0 -- always use scientific notation (experimental) else xhi, xlo = 10, 4 -- default end local sign = isnegative and MINUS or '' local maxlen = maxsigfig local tfrac if type(show) == 'table' then tfrac = show show = tfrac.wholestr assert(exponent == nil, 'Bug: exponent given with fraction') end if not tfrac and not exponent then local integer, dot, decimals = show:match('^(%d*)(%.?)(.*)') if integer == '0' or integer == '' then local zeros, figs = decimals:match('^(0*)([^0]?.*)') if #figs == 0 then if #zeros > maxlen then show = '0.' .. zeros:sub(1, maxlen) end elseif #zeros >= xlo then show = figs exponent = -#zeros elseif #figs > maxlen then show = '0.' .. zeros .. figs:sub(1, maxlen) end elseif #integer >= xhi then show = integer .. decimals exponent = #integer else maxlen = maxlen + #dot if #show > maxlen then show = show:sub(1, maxlen) end end end if exponent then local function zeros(n) return string.rep('0', n) end if #show > maxlen then show = show:sub(1, maxlen) end if exponent > xhi or exponent <= -xlo or (exponent == xhi and show ~= '1' .. zeros(xhi - 1)) then -- When xhi, xlo = 10, 4 (the default), scientific notation is used if the -- rounded value satisfies: value >= 1e9 or value < 1e-4 (1e9 = 0.1e10), -- except if show is '1000000000' (1e9), for example: -- {{convert|1000000000|m|m|sigfig=10}} → 1,000,000,000 metres (1,000,000,000 m) local significand if #show > 1 then significand = show:sub(1, 1) .. '.' .. show:sub(2) else significand = show end return { clean = '.' .. show, exponent = exponent, sign = sign, show = sign .. with_exponent(parms, significand, exponent-1), is_scientific = true, } end if exponent >= #show then show = show .. zeros(exponent - #show) -- result has no dot elseif exponent <= 0 then show = '0.' .. zeros(-exponent) .. show else show = show:sub(1, exponent) .. '.' .. show:sub(exponent+1) end end local formatted_show if tfrac then show = tostring(tfrac.value) -- to set clean in returned table formatted_show = format_fraction(parms, 'out', isnegative, tfrac.wholestr, tfrac.numstr, tfrac.denstr, parms.opt_spell_out) else if isnegative and show:match('^0.?0*$') then sign = '' -- don't show minus if result is negative but rounds to zero end formatted_show = sign .. with_separator(parms, show) if parms.opt_spell_out then formatted_show = spell_number(parms, 'out', sign .. show) or formatted_show end end return { clean = show, sign = sign, show = formatted_show, is_scientific = false, -- to avoid calling __index } end local function extract_fraction(parms, text, negative) -- If text represents a fraction, return -- value, altvalue, show, denominator -- where -- value is a number (value of the fraction in argument text) -- altvalue is an alternate interpretation of any fraction for the hands -- unit where "12.1+3/4" means 12 hands 1.75 inches -- show is a string (formatted text for display of an input value, -- and is spelled if wanted and possible) -- denominator is value of the denominator in the fraction -- Otherwise, return nil. -- Input uses en digits and '.' decimal mark (input has been translated). -- Output uses digits in local language and local decimal mark, if any. ------------------------------------------------------------------------ -- Originally this function accepted x+y/z where x, y, z were any valid -- numbers, possibly with a sign. For example '1.23e+2+1.2/2.4' = 123.5, -- and '2-3/8' = 1.625. However, such usages were found to be errors or -- misunderstandings, so since August 2014 the following restrictions apply: -- x (if present) is an integer or has a single digit after decimal mark -- y and z are unsigned integers -- e-notation is not accepted -- The overall number can start with '+' or '-' (so '12+3/4' and '+12+3/4' -- and '-12-3/4' are valid). -- Any leading negative sign is removed by the caller, so only inputs -- like the following are accepted here (may have whitespace): -- negative = false false true (there was a leading '-') -- text = '2/3' '+2/3' '2/3' -- text = '1+2/3' '+1+2/3' '1-2/3' -- text = '12.3+1/2' '+12.3+1/2' '12.3-1/2' -- Values like '12.3+1/2' are accepted, but are intended only for use -- with the hands unit (not worth adding code to enforce that). ------------------------------------------------------------------------ local leading_plus, prefix, numstr, slashes, denstr = text:match('^%s*(%+?)%s*(.-)%s*(%d+)%s*(/+)%s*(%d+)%s*$') if not leading_plus then -- Accept a single U+2044 fraction slash because that may be pasted. leading_plus, prefix, numstr, denstr = text:match('^%s*(%+?)%s*(.-)%s*(%d+)%s*⁄%s*(%d+)%s*$') slashes = '/' end local numerator = tonumber(numstr) local denominator = tonumber(denstr) if numerator == nil or denominator == nil or (negative and leading_plus ~= '') then return nil end local whole, wholestr if prefix == '' then wholestr = '' whole = 0 else -- Any prefix must be like '12+' or '12-' (whole number and fraction sign); -- '12.3+' and '12.3-' are also accepted (single digit after decimal point) -- because '12.3+1/2 hands' is valid (12 hands 3½ inches). local num1, num2, frac_sign = prefix:match('^(%d+)(%.?%d?)%s*([+%-])$') if num1 == nil then return nil end if num2 == '' then -- num2 must be '' or like '.1' but not '.' or '.12' wholestr = num1 else if #num2 ~= 2 then return nil end wholestr = num1 .. num2 end if frac_sign ~= (negative and '-' or '+') then return nil end whole = tonumber(wholestr) if whole == nil then return nil end end local value = whole + numerator / denominator if not valid_number(value) then return nil end local altvalue = whole + numerator / (denominator * 10) local style = #slashes -- kludge: 1 or 2 slashes can be used to select style if style > 2 then style = 2 end local wikitext = format_fraction(parms, 'in', negative, leading_plus .. wholestr, numstr, denstr, parms.opt_spell_in, style) return value, altvalue, wikitext, denominator end local function extract_number(parms, text, another, no_fraction) -- Return true, info if can extract a number from text, -- where info is a table with the result, -- or return false, t where t is an error message table. -- Input can use en digits or digits in local language and can -- have references at the end. Accepting references is intended -- for use in infoboxes with a field for a value passed to convert. -- Parameter another = true if the expected value is not the first. -- Before processing, the input text is cleaned: -- * Any thousand separators (valid or not) are removed. -- * Any sign is replaced with '-' (if negative) or '' (otherwise). -- That replaces Unicode minus with '-'. -- If successful, the returned info table contains named fields: -- value = a valid number -- altvalue = a valid number, usually same as value but different -- if fraction used (for hands unit) -- singular = true if value is 1 or -1 (to use singular form of units) -- clean = cleaned text with any separators and sign removed -- (en digits and '.' decimal mark) -- show = text formatted for output, possibly with ref strip markers -- (digits in local language and custom decimal mark) -- The resulting show: -- * Is for an input value and is spelled if wanted and possible. -- * Has a rounded value, if wanted. -- * Has digits grouped where necessary, if wanted. -- * If negative, a Unicode minus is used; otherwise the sign is -- '+' (if the input text used '+'), or is '' (if no sign in input). text = strip(text or '') local reference local pos = text:find('\127', 1, true) if pos then local before = text:sub(1, pos - 1) local remainder = text:sub(pos) local refs = {} while #remainder > 0 do local ref, spaces ref, spaces, remainder = remainder:match('^(\127[^\127]*UNIQ[^\127]*%-ref[^\127]*\127)(%s*)(.*)') if ref then table.insert(refs, ref) else refs = {} break end end if #refs > 0 then text = strip(before) reference = table.concat(refs) end end local clean = to_en(text, parms) if clean == '' then return false, { another and 'cvt_no_num2' or 'cvt_no_num' } end local isnegative, propersign = false, '' -- most common case local singular, show, denominator local value = tonumber(clean) local altvalue if value then local sign = clean:sub(1, 1) if sign == '+' or sign == '-' then propersign = (sign == '+') and '+' or MINUS clean = clean:sub(2) end if value < 0 then isnegative = true value = -value end else local valstr for _, prefix in ipairs({ '-', MINUS, '&minus;' }) do -- Including '-' sets isnegative in case input is a fraction like '-2-3/4'. local plen = #prefix if clean:sub(1, plen) == prefix then valstr = clean:sub(plen + 1) if valstr:match('^%s') then -- "- 1" is invalid but "-1 - 1/2" is ok return false, { 'cvt_bad_num', text } end break end end if valstr then isnegative = true propersign = MINUS clean = valstr value = tonumber(clean) end if value == nil then if not no_fraction then value, altvalue, show, denominator = extract_fraction(parms, clean, isnegative) end if value == nil then return false, { 'cvt_bad_num', text } end if value <= 1 then singular = true -- for example, "½ mile" or "one half mile" (singular unit) end end end if not valid_number(value) then -- for example, "1e310" may overflow return false, { 'cvt_invalid_num' } end if show == nil then -- clean is a non-empty string with no spaces, and does not represent a fraction, -- and value = tonumber(clean) is a number >= 0. -- If the input uses e-notation, show will be displayed using a power of ten, but -- we use the number as given so it might not be normalized scientific notation. -- The input value is spelled if specified so any e-notation is ignored; -- that allows input like 2e6 to be spelled as "two million" which works -- because the spell module converts '2e6' to '2000000' before spelling. local function rounded(value, default, exponent) local precision = parms.opt_ri if precision then local fmt = '%.' .. format('%d', precision) .. 'f' local result = fmt:format(tonumber(value) + 2e-14) -- fudge for some common cases of bad rounding if not exponent then singular = (tonumber(result) == 1) end return result end return default end singular = (value == 1) local scientific local significand, exponent = clean:match('^([%d.]+)[Ee]([+%-]?%d+)') if significand then show = with_exponent(parms, rounded(significand, significand, exponent), exponent) scientific = true else show = with_separator(parms, rounded(value, clean)) end show = propersign .. show if parms.opt_spell_in then show = spell_number(parms, 'in', propersign .. rounded(value, clean)) or show scientific = false end if scientific then parms.opt_scientific = true end end if isnegative and (value ~= 0) then value = -value altvalue = -(altvalue or value) end return true, { value = value, altvalue = altvalue or value, singular = singular, clean = clean, show = show .. (reference or ''), denominator = denominator, } end local function get_number(text) -- Return v, f where: -- v = nil (text is not a number) -- or -- v = value of text (text is a number) -- f = true if value is an integer -- Input can use en digits or digits in local language or separators, -- but no Unicode minus, and no fraction. if text then local number = tonumber(to_en(text)) if number then local _, fracpart = math.modf(number) return number, (fracpart == 0) end end end local function gcd(a, b) -- Return the greatest common denominator for the given values, -- which are known to be positive integers. if a > b then a, b = b, a end if a <= 0 then return b end local r = b % a if r <= 0 then return a end if r == 1 then return 1 end return gcd(r, a) end local function fraction_table(value, denominator) -- Return value as a string or a table: -- * If result is a string, there is no fraction, and the result -- is value formatted as a string of en digits. -- * If result is a table, it represents a fraction with named fields: -- wholestr, numstr, denstr (strings of en digits for integer, numerator, denominator). -- The result is rounded to the nearest multiple of (1/denominator). -- If the multiple is zero, no fraction is included. -- No fraction is included if value is very large as the fraction would -- be unhelpful, particularly if scientific notation is required. -- Input value is a non-negative number. -- Input denominator is a positive integer for the desired fraction. if value <= 0 then return '0' end if denominator <= 0 or value > 1e8 then return format('%.2f', value) end local integer, decimals = math.modf(value) local numerator = floor((decimals * denominator) + 0.5 + 2e-14) -- add fudge for some common cases of bad rounding if numerator >= denominator then integer = integer + 1 numerator = 0 end local wholestr = tostring(integer) if numerator > 0 then local div = gcd(numerator, denominator) if div > 1 then numerator = numerator / div denominator = denominator / div end return { wholestr = (integer > 0) and wholestr or '', numstr = tostring(numerator), denstr = tostring(denominator), value = value, } end return wholestr end local function preunits(count, preunit1, preunit2) -- If count is 1: -- ignore preunit2 -- return p1 -- else: -- preunit1 is used for preunit2 if the latter is empty -- return p1, p2 -- where: -- p1 is text to insert before the input unit -- p2 is text to insert before the output unit -- p1 or p2 may be nil to mean "no preunit" -- Using '+' gives output like "5+ feet" (no space before, but space after). local function withspace(text, wantboth) -- Return text with space before and, if wantboth, after. -- However, no space is added if there is a space or '&nbsp;' or '-' -- at that position ('-' is for adjectival text). -- There is also no space if text starts with '&' -- (e.g. '&deg;' would display a degree symbol with no preceding space). local char = text:sub(1, 1) if char == '&' then return text -- an html entity can be used to specify the exact display end if not (char == ' ' or char == '-' or char == '+') then text = ' ' .. text end if wantboth then char = text:sub(-1, -1) if not (char == ' ' or char == '-' or text:sub(-6, -1) == '&nbsp;') then text = text .. ' ' end end return text end local PLUS = '+ ' preunit1 = preunit1 or '' local trim1 = strip(preunit1) if count == 1 then if trim1 == '' then return nil end if trim1 == '+' then return PLUS end return withspace(preunit1, true) end preunit1 = withspace(preunit1) preunit2 = preunit2 or '' local trim2 = strip(preunit2) if trim1 == '+' then if trim2 == '' or trim2 == '+' then return PLUS, PLUS end preunit1 = PLUS end if trim2 == '' then if trim1 == '' then return nil, nil end preunit2 = preunit1 elseif trim2 == '+' then preunit2 = PLUS elseif trim2 == '&#32;' then -- trick to make preunit2 empty preunit2 = nil else preunit2 = withspace(preunit2) end return preunit1, preunit2 end local function range_text(range, want_name, parms, before, after, inout, options) -- Return before .. rtext .. after -- where rtext is the text that separates two values in a range. local rtext, adj_text, exception options = options or {} if type(range) == 'table' then -- Table must specify range text for ('off' and 'on') or ('input' and 'output'), -- and may specify range text for 'adj=on', -- and may specify exception = true. rtext = range[want_name and 'off' or 'on'] or range[((inout == 'in') == (parms.opt_flip == true)) and 'output' or 'input'] adj_text = range['adj'] exception = range['exception'] else rtext = range end if parms.opt_adjectival then if want_name or (exception and parms.abbr_org == 'on') then rtext = adj_text or rtext:gsub(' ', '-'):gsub('&nbsp;', '-') end end if rtext == '–' and (options.spaced or after:sub(1, #MINUS) == MINUS) then rtext = '&nbsp;– ' end return before .. rtext .. after end local function get_composite(parms, iparm, in_unit_table) -- Look for a composite input unit. For example, {{convert|1|yd|2|ft|3|in}} -- would result in a call to this function with -- iparm = 3 (parms[iparm] = "2", just after the first unit) -- in_unit_table = (unit table for "yd"; contains value 1 for number of yards) -- Return true, iparm, unit where -- iparm = index just after the composite units (7 in above example) -- unit = composite unit table holding all input units, -- or return true if no composite unit is present in parms, -- or return false, t where t is an error message table. local default, subinfo local composite_units, count = { in_unit_table }, 1 local fixups = {} local total = in_unit_table.valinfo[1].value local subunit = in_unit_table while subunit.subdivs do -- subdivs is nil or a table of allowed subdivisions local subcode = strip(parms[iparm+1]) local subdiv = subunit.subdivs[subcode] or subunit.subdivs[(all_units[subcode] or {}).target] if not subdiv then break end local success success, subunit = lookup(parms, subcode, 'no_combination') if not success then return false, subunit end -- should never occur success, subinfo = extract_number(parms, parms[iparm]) if not success then return false, subinfo end iparm = iparm + 2 subunit.inout = 'in' subunit.valinfo = { subinfo } -- Recalculate total as a number of subdivisions. -- subdiv[1] = number of subdivisions per previous unit (integer > 1). total = total * subdiv[1] + subinfo.value if not default then -- set by the first subdiv with a default defined default = subdiv.default end count = count + 1 composite_units[count] = subunit if subdiv.unit or subdiv.name then fixups[count] = { unit = subdiv.unit, name = subdiv.name, valinfo = subunit.valinfo } end end if count == 1 then return true -- no error and no composite unit end for i, fixup in pairs(fixups) do local unit = fixup.unit local name = fixup.name if not unit or (count > 2 and name) then composite_units[i].fixed_name = name else local success, alternate = lookup(parms, unit, 'no_combination') if not success then return false, alternate end -- should never occur alternate.inout = 'in' alternate.valinfo = fixup.valinfo composite_units[i] = alternate end end return true, iparm, { utype = in_unit_table.utype, scale = subunit.scale, -- scale of last (least significant) unit valinfo = { { value = total, clean = subinfo.clean, denominator = subinfo.denominator } }, composite = composite_units, default = default or in_unit_table.default } end local function translate_parms(parms, kv_pairs) -- Update fields in parms by translating each key:value in kv_pairs to terms -- used by this module (may involve translating from local language to English). -- Also, checks are performed which may display warnings, if enabled. -- Return true if successful or return false, t where t is an error message table. currency_text = nil -- local testing can hold module in memory; must clear globals if kv_pairs.adj and kv_pairs.sing then -- For enwiki (before translation), warn if attempt to use adj and sing -- as the latter is a deprecated alias for the former. if kv_pairs.adj ~= kv_pairs.sing and kv_pairs.sing ~= '' then add_warning(parms, 1, 'cvt_unknown_option', 'sing=' .. kv_pairs.sing) end kv_pairs.sing = nil end kv_pairs.comma = kv_pairs.comma or config.comma -- for plwiki who want default comma=5 for loc_name, loc_value in pairs(kv_pairs) do local en_name = text_code.en_option_name[loc_name] if en_name then local en_value = text_code.en_option_value[en_name] if en_value == 'INTEGER' then -- altitude_ft, altitude_m, frac, sigfig en_value = nil if loc_value == '' then add_warning(parms, 2, 'cvt_empty_option', loc_name) else local minimum local number, is_integer = get_number(loc_value) if en_name == 'sigfig' then minimum = 1 elseif en_name == 'frac' then minimum = 2 if number and number < 0 then parms.opt_fraction_horizontal = true number = -number end else minimum = -1e6 end if number and is_integer and number >= minimum then en_value = number else local m if en_name == 'frac' then m = 'cvt_bad_frac' elseif en_name == 'sigfig' then m = 'cvt_bad_sigfig' else m = 'cvt_bad_altitude' end add_warning(parms, 1, m, loc_name .. '=' .. loc_value) end end elseif en_value == 'TEXT' then -- $, input, qid, qual, stylein, styleout, tracking en_value = loc_value ~= '' and loc_value or nil -- accept non-empty user text with no validation if not en_value and (en_name == '$' or en_name == 'qid' or en_name == 'qual') then add_warning(parms, 2, 'cvt_empty_option', loc_name) elseif en_name == '$' then -- Value should be a single character like "€" for the euro currency symbol, but anything is accepted. currency_text = (loc_value == 'euro') and '€' or loc_value elseif en_name == 'input' then -- May have something like {{convert|input=}} (empty input) if source is an infobox -- with optional fields. In that case, want to output nothing rather than an error. parms.input_text = loc_value -- keep input because parms.input is nil if loc_value == '' end else en_value = en_value[loc_value] if en_value and en_value:sub(-1) == '?' then en_value = en_value:sub(1, -2) add_warning(parms, -1, 'cvt_deprecated', loc_name .. '=' .. loc_value) end if en_value == nil then if loc_value == '' then add_warning(parms, 2, 'cvt_empty_option', loc_name) else add_warning(parms, 1, 'cvt_unknown_option', loc_name .. '=' .. loc_value) end elseif en_value == '' then en_value = nil -- an ignored option like adj=off elseif type(en_value) == 'string' and en_value:sub(1, 4) == 'opt_' then for _, v in ipairs(split(en_value, ',')) do local lhs, rhs = v:match('^(.-)=(.+)$') if rhs then parms[lhs] = tonumber(rhs) or rhs else parms[v] = true end end en_value = nil end end parms[en_name] = en_value else add_warning(parms, 1, 'cvt_unknown_option', loc_name .. '=' .. loc_value) end end local abbr_entered = parms.abbr local cfg_abbr = config.abbr if cfg_abbr then -- Don't warn if invalid because every convert would show that warning. if cfg_abbr == 'on always' then parms.abbr = 'on' elseif cfg_abbr == 'off always' then parms.abbr = 'off' elseif parms.abbr == nil then if cfg_abbr == 'on default' then parms.abbr = 'on' elseif cfg_abbr == 'off default' then parms.abbr = 'off' end end end if parms.abbr then if parms.abbr == 'unit' then parms.abbr = 'on' parms.number_word = true end parms.abbr_org = parms.abbr -- original abbr, before any flip elseif parms.opt_hand_hh then parms.abbr_org = 'on' parms.abbr = 'on' else parms.abbr = 'out' -- default is to abbreviate output only (use symbol, not name) end if parms.opt_order_out then -- Disable options that do not work in a useful way with order=out. parms.opt_flip = nil -- override adj=flip parms.opt_spell_in = nil parms.opt_spell_out = nil parms.opt_spell_upper = nil end if parms.opt_spell_out and not abbr_entered then parms.abbr = 'off' -- should show unit name when spelling the output value end if parms.opt_flip then local function swap_in_out(option) local value = parms[option] if value == 'in' then parms[option] = 'out' elseif value == 'out' then parms[option] = 'in' end end swap_in_out('abbr') swap_in_out('lk') if parms.opt_spell_in and not parms.opt_spell_out then -- For simplicity, and because it does not appear to be needed, -- user cannot set an option to spell the output only. parms.opt_spell_in = nil parms.opt_spell_out = true end end if parms.opt_spell_upper then parms.spell_upper = parms.opt_flip and 'out' or 'in' end if parms.opt_table or parms.opt_tablecen then if abbr_entered == nil and parms.lk == nil then parms.opt_values = true end parms.table_align = parms.opt_table and 'right' or 'center' end if parms.table_align or parms.opt_sortable_on then parms.need_table_or_sort = true end local disp_joins = text_code.disp_joins local default_joins = disp_joins['b'] parms.join_between = default_joins[3] or '; ' local disp = parms.disp if disp == nil then -- special case for the most common setting parms.joins = default_joins elseif disp == 'x' then -- Later, parms.joins is set from the input parameters. else -- Old template does this. local abbr = parms.abbr if disp == 'slash' then if abbr_entered == nil then disp = 'slash-nbsp' elseif abbr == 'in' or abbr == 'out' then disp = 'slash-sp' else disp = 'slash-nosp' end elseif disp == 'sqbr' then if abbr == 'on' then disp = 'sqbr-nbsp' else disp = 'sqbr-sp' end end parms.joins = disp_joins[disp] or default_joins parms.join_between = parms.joins[3] or parms.join_between parms.wantname = parms.joins.wantname end if (en_default and not parms.opt_lang_local and (parms[1] or ''):find('%d')) or parms.opt_lang_en then from_en_table = nil end if en_default and from_en_table then -- For hiwiki: localized symbol/name is defined with the US symbol/name field, -- and is used if output uses localized numbers. parms.opt_sp_us = true end return true end local function get_values(parms) -- If successful, update parms and return true, v, i where -- v = table of input values -- i = index to next entry in parms after those processed here -- or return false, t where t is an error message table. local valinfo = collection() -- numbered table of input values local range = collection() -- numbered table of range items (having, for example, 2 range items requires 3 input values) local had_nocomma -- true if removed "nocomma" kludge from second parameter (like "tonocomma") local parm2 = strip(parms[2]) if parm2 and parm2:sub(-7, -1) == 'nocomma' then parms[2] = strip(parm2:sub(1, -8)) parms.opt_nocomma = true had_nocomma = true end local function extractor(i) -- If the parameter is not a value, try unpacking it as a range ("1-23" for "1 to 23"). -- However, "-1-2/3" is a negative fraction (-1⅔), so it must be extracted first. -- Do not unpack a parameter if it is like "3-1/2" which is sometimes incorrectly -- used instead of "3+1/2" (and which should not be interpreted as "3 to ½"). -- Unpacked items are inserted into the parms table. -- The tail recursion allows combinations like "1x2 to 3x4". local valstr = strip(parms[i]) -- trim so any '-' as a negative sign will be at start local success, result = extract_number(parms, valstr, i > 1) if not success and valstr and i < 20 then -- check i to limit abuse local lhs, sep, rhs = valstr:match('^(%S+)%s+(%S+)%s+(%S.*)') if lhs and not (sep == '-' and rhs:match('/')) then if sep:find('%d') then return success, result -- to reject {{convert|1 234 567|m}} with a decent message (en only) end parms[i] = rhs table.insert(parms, i, sep) table.insert(parms, i, lhs) return extractor(i) end if not valstr:match('%-.*/') then for _, sep in ipairs(text_code.ranges.words) do local start, stop = valstr:find(sep, 2, true) -- start at 2 to skip any negative sign for range '-' if start then parms[i] = valstr:sub(stop + 1) table.insert(parms, i, sep) table.insert(parms, i, valstr:sub(1, start - 1)) return extractor(i) end end end end return success, result end local i = 1 local is_change while true do local success, info = extractor(i) -- need to set parms.opt_nocomma before calling this if not success then return false, info end i = i + 1 if is_change then info.is_change = true -- value is after "±" and so is a change (significant for range like {{convert|5|±|5|°C}}) is_change = nil end valinfo:add(info) local range_item = get_range(strip(parms[i])) if not range_item then break end i = i + 1 range:add(range_item) if type(range_item) == 'table' then -- For range "x", if append unit to some values, append it to all. parms.in_range_x = parms.in_range_x or range_item.in_range_x parms.out_range_x = parms.out_range_x or range_item.out_range_x parms.abbr_range_x = parms.abbr_range_x or range_item.abbr_range_x is_change = range_item.is_range_change end end if range.n > 0 then if range.n > 30 then -- limit abuse, although 4 is a more likely upper limit return false, { 'cvt_invalid_num' } -- misleading message but it will do end parms.range = range elseif had_nocomma then return false, { 'cvt_unknown', parm2 } end return true, valinfo, i end local function simple_get_values(parms) -- If input is like "{{convert|valid_value|valid_unit|...}}", -- return true, i, in_unit, in_unit_table -- i = index in parms of what follows valid_unit, if anything. -- The valid_value is not negative and does not use a fraction, and -- no options requiring further processing of the input are used. -- Otherwise, return nothing or return false, parm1 for caller to interpret. -- Testing shows this function is successful for 96% of converts in articles, -- and that on average it speeds up converts by 8%. local clean = to_en(strip(parms[1] or ''), parms) if parms.opt_ri or parms.opt_spell_in or #clean > 10 or not clean:match('^[0-9.]+$') then return false, clean end local value = tonumber(clean) if not value then return end local info = { value = value, altvalue = value, singular = (value == 1), clean = clean, show = with_separator(parms, clean), } local in_unit = strip(parms[2]) local success, in_unit_table = lookup(parms, in_unit, 'no_combination') if not success then return end in_unit_table.valinfo = { info } return true, 3, in_unit, in_unit_table end local function wikidata_call(parms, operation, ...) -- Return true, s where s is the result of a Wikidata operation, -- or return false, t where t is an error message table. local function worker(...) wikidata_code = wikidata_code or require(wikidata_module) wikidata_data = wikidata_data or mw.loadData(wikidata_data_module) return wikidata_code[operation](wikidata_data, ...) end local success, status, result = pcall(worker, ...) if success then return status, result end if parms.opt_sortable_debug then -- Use debug=yes to crash if an error while accessing Wikidata. error('Error accessing Wikidata: ' .. status, 0) end return false, { 'cvt_wd_fail' } end local function get_parms(parms, args) -- If successful, update parms and return true, unit where -- parms is a table of all arguments passed to the template -- converted to named arguments, and -- unit is the input unit table; -- or return false, t where t is an error message table. -- For special processing (not a convert), can also return -- true, wikitext where wikitext is the final result. -- The returned input unit table may be for a fake unit using the specified -- unit code as the symbol and name, and with bad_mcode = message code table. -- MediaWiki removes leading and trailing whitespace from the values of -- named arguments. However, the values of numbered arguments include any -- whitespace entered in the template, and whitespace is used by some -- parameters (example: the numbered parameters associated with "disp=x"). local kv_pairs = {} -- table of input key:value pairs where key is a name; needed because cannot iterate parms and add new fields to it for k, v in pairs(args) do if type(k) == 'number' or k == 'test' then -- parameter "test" is reserved for testing and is not translated parms[k] = v else kv_pairs[k] = v end end if parms.test == 'wikidata' then local ulookup = function (ucode) -- Use empty table for parms so it does not accumulate results when used repeatedly. return lookup({}, ucode, 'no_combination') end return wikidata_call(parms, '_listunits', ulookup) end local success, msg = translate_parms(parms, kv_pairs) if not success then return false, msg end if parms.input then success, msg = wikidata_call(parms, '_adjustparameters', parms, 1) if not success then return false, msg end end local success, i, in_unit, in_unit_table = simple_get_values(parms) if not success then if type(i) == 'string' and i:match('^NNN+$') then -- Some infoboxes have examples like {{convert|NNN|m}} (3 or more "N"). -- Output an empty string for these. return false, { 'cvt_no_output' } end local valinfo success, valinfo, i = get_values(parms) if not success then return false, valinfo end in_unit = strip(parms[i]) i = i + 1 success, in_unit_table = lookup(parms, in_unit, 'no_combination') if not success then in_unit = in_unit or '' if parms.opt_ignore_error then -- display given unit code with no error (for use with {{val}}) in_unit_table = '' -- suppress error message and prevent processing of output unit end in_unit_table = setmetatable({ symbol = in_unit, name2 = in_unit, utype = in_unit, scale = 1, default = '', defkey = '', linkey = '', bad_mcode = in_unit_table }, unit_mt) end in_unit_table.valinfo = valinfo end if parms.test == 'msg' then -- Am testing the messages produced when no output unit is specified, and -- the input unit has a missing or invalid default. -- Set two units for testing that. -- LATER: Remove this code. if in_unit == 'chain' then in_unit_table.default = nil -- no default elseif in_unit == 'rd' then in_unit_table.default = "ft!X!m" -- an invalid expression end end in_unit_table.inout = 'in' -- this is an input unit if not parms.range then local success, inext, composite_unit = get_composite(parms, i, in_unit_table) if not success then return false, inext end if composite_unit then in_unit_table = composite_unit i = inext end end if in_unit_table.builtin == 'mach' then -- As with old template, a number following Mach as the input unit is the altitude. -- That is deprecated: should use altitude_ft=NUMBER or altitude_m=NUMBER. local success, info success = tonumber(parms[i]) -- this will often work and will give correct result for values like 2e4 without forcing output scientific notation if success then info = { value = success } else success, info = extract_number(parms, parms[i], false, true) end if success then i = i + 1 in_unit_table.altitude = info.value end end local word = strip(parms[i]) i = i + 1 local precision, is_bad_precision local function set_precision(text) local number, is_integer = get_number(text) if number then if is_integer then precision = number else precision = text is_bad_precision = true end return true -- text was used for precision, good or bad end end if word and not set_precision(word) then parms.out_unit = parms.out_unit or word if set_precision(strip(parms[i])) then i = i + 1 end end if parms.opt_adj_mid then word = parms[i] i = i + 1 if word then -- mid-text words if word:sub(1, 1) == '-' then parms.mid = word else parms.mid = ' ' .. word end end end if parms.opt_one_preunit then parms[parms.opt_flip and 'preunit2' or 'preunit1'] = preunits(1, parms[i]) i = i + 1 end if parms.disp == 'x' then -- Following is reasonably compatible with the old template. local first = parms[i] or '' local second = parms[i+1] or '' i = i + 2 if strip(first) == '' then -- user can enter '&#32;' rather than ' ' to avoid the default first = ' [&nbsp;' .. first second = '&nbsp;]' .. second end parms.joins = { first, second } elseif parms.opt_two_preunits then local p1, p2 = preunits(2, parms[i], parms[i+1]) i = i + 2 if parms.preunit1 then -- To simplify documentation, allow unlikely use of adj=pre with disp=preunit -- (however, an output unit must be specified with adj=pre and with disp=preunit). parms.preunit1 = parms.preunit1 .. p1 parms.preunit2 = p2 else parms.preunit1, parms.preunit2 = p1, p2 end end if precision == nil then if set_precision(strip(parms[i])) then i = i + 1 end end if is_bad_precision then add_warning(parms, 1, 'cvt_bad_prec', precision) else parms.precision = precision end for j = i, i + 3 do local parm = parms[j] -- warn if find a non-empty extraneous parameter if parm and parm:match('%S') then add_warning(parms, 1, 'cvt_unknown_option', parm) break end end return true, in_unit_table end local function record_default_precision(parms, out_current, precision) -- If necessary, adjust parameters and return a possibly adjusted precision. -- When converting a range of values where a default precision is required, -- that default is calculated for each value because the result sometimes -- depends on the precise input and output values. This function may cause -- the entire convert process to be repeated in order to ensure that the -- same default precision is used for each individual convert. -- If that were not done, a range like 1000 to 1000.4 may give poor results -- because the first output could be heavily rounded, while the second is not. -- For range 1000.4 to 1000, this function can give the second convert the -- same default precision that was used for the first. if not parms.opt_round_each then local maxdef = out_current.max_default_precision if maxdef then if maxdef < precision then parms.do_convert_again = true out_current.max_default_precision = precision else precision = out_current.max_default_precision end else out_current.max_default_precision = precision end end return precision end local function default_precision(parms, invalue, inclean, denominator, outvalue, in_current, out_current, extra) -- Return a default value for precision (an integer like 2, 0, -2). -- If denominator is not nil, it is the value of the denominator in inclean. -- Code follows procedures used in old template. local fudge = 1e-14 -- {{Order of magnitude}} adds this, so we do too local prec, minprec, adjust local subunit_ignore_trailing_zero local subunit_more_precision -- kludge for "in" used in input like "|2|ft|6|in" local composite = in_current.composite if composite then subunit_ignore_trailing_zero = true -- input "|2|st|10|lb" has precision 0, not -1 if composite[#composite].exception == 'subunit_more_precision' then subunit_more_precision = true -- do not use standard precision with input like "|2|ft|6|in" end end if denominator and denominator > 0 then prec = math.max(log10(denominator), 1) else -- Count digits after decimal mark, handling cases like '12.345e6'. local exponent local integer, dot, decimals, expstr = inclean:match('^(%d*)(%.?)(%d*)(.*)') local e = expstr:sub(1, 1) if e == 'e' or e == 'E' then exponent = tonumber(expstr:sub(2)) end if dot == '' then prec = subunit_ignore_trailing_zero and 0 or -integer:match('0*$'):len() else prec = #decimals end if exponent then -- So '1230' and '1.23e3' both give prec = -1, and '0.00123' and '1.23e-3' give 5. prec = prec - exponent end end if in_current.istemperature and out_current.istemperature then -- Converting between common temperatures (°C, °F, °R, K); not keVT. -- Kelvin value can be almost zero, or small but negative due to precision problems. -- Also, an input value like -300 C (below absolute zero) gives negative kelvins. -- Calculate minimum precision from absolute value. adjust = 0 local kelvin = abs((invalue - in_current.offset) * in_current.scale) if kelvin < 1e-8 then -- assume nonzero due to input or calculation precision problem minprec = 2 else minprec = 2 - floor(log10(kelvin) + fudge) -- 3 sigfigs in kelvin end else if invalue == 0 or outvalue <= 0 then -- We are never called with a negative outvalue, but it might be zero. -- This is special-cased to avoid calculation exceptions. return record_default_precision(parms, out_current, 0) end if out_current.exception == 'integer_more_precision' and floor(invalue) == invalue then -- With certain output units that sometimes give poor results -- with default rounding, use more precision when the input -- value is equal to an integer. An example of a poor result -- is when input 50 gives a smaller output than input 49.5. -- Experiment shows this helps, but it does not eliminate all -- surprises because it is not clear whether "50" should be -- interpreted as "from 45 to 55" or "from 49.5 to 50.5". adjust = -log10(in_current.scale) elseif subunit_more_precision then -- Conversion like "{{convert|6|ft|1|in|cm}}" (where subunit is "in") -- has a non-standard adjust value, to give more output precision. adjust = log10(out_current.scale) + 2 else adjust = log10(abs(invalue / outvalue)) end adjust = adjust + log10(2) -- Ensure that the output has at least two significant figures. minprec = 1 - floor(log10(outvalue) + fudge) end if extra then adjust = extra.adjust or adjust minprec = extra.minprec or minprec end return record_default_precision(parms, out_current, math.max(floor(prec + adjust), minprec)) end local function convert(parms, invalue, info, in_current, out_current) -- Convert given input value from one unit to another. -- Return output_value (a number) if a simple convert, or -- return f, t where -- f = true, t = table of information with results, or -- f = false, t = error message table. local inscale = in_current.scale local outscale = out_current.scale if not in_current.iscomplex and not out_current.iscomplex then return invalue * (inscale / outscale) -- minimize overhead for most common case end if in_current.invert or out_current.invert then -- Inverted units, such as inverse length, inverse time, or -- fuel efficiency. Built-in units do not have invert set. if (in_current.invert or 1) * (out_current.invert or 1) < 0 then return 1 / (invalue * inscale * outscale) end return invalue * (inscale / outscale) elseif in_current.offset then -- Temperature (there are no built-ins for this type of unit). if info.is_change then return invalue * (inscale / outscale) end return (invalue - in_current.offset) * (inscale / outscale) + out_current.offset else -- Built-in unit. local in_builtin = in_current.builtin local out_builtin = out_current.builtin if in_builtin and out_builtin then if in_builtin == out_builtin then return invalue end -- There are no cases (yet) where need to convert from one -- built-in unit to another, so this should never occur. return false, { 'cvt_bug_convert' } end if in_builtin == 'mach' or out_builtin == 'mach' then -- Should check that only one altitude is given but am planning to remove -- in_current.altitude (which can only occur when Mach is the input unit), -- and out_current.altitude cannot occur. local alt = parms.altitude_ft or in_current.altitude if not alt and parms.altitude_m then alt = parms.altitude_m / 0.3048 -- 1 ft = 0.3048 m end local spd = speed_of_sound(alt) if in_builtin == 'mach' then inscale = spd return invalue * (inscale / outscale) end outscale = spd local adjust = 0.1 / inscale return true, { outvalue = invalue * (inscale / outscale), adjust = log10(adjust) + log10(2), } elseif in_builtin == 'hand' then -- 1 hand = 4 inches; 1.2 hands = 6 inches. -- Decimals of a hand are only defined for the first digit, and -- the first fractional digit should be a number of inches (1, 2 or 3). -- However, this code interprets the entire fractional part as the number -- of inches / 10 (so 1.75 inches would be 0.175 hands). -- A value like 12.3 hands is exactly 12*4 + 3 inches; base default precision on that. local integer, fracpart = math.modf(invalue) local inch_value = 4 * integer + 10 * fracpart -- equivalent number of inches local factor = inscale / outscale if factor == 4 then -- Am converting to inches: show exact result, and use "inches" not "in" by default. if parms.abbr_org == nil then out_current.usename = true end local show = format('%g', abs(inch_value)) -- show and clean are unsigned if not show:find('e', 1, true) then return true, { invalue = inch_value, outvalue = inch_value, clean = show, show = show, } end end local outvalue = (integer + 2.5 * fracpart) * factor local fracstr = info.clean:match('%.(.*)') or '' local fmt if fracstr == '' then fmt = '%.0f' else fmt = '%.' .. format('%d', #fracstr - 1) .. 'f' end return true, { invalue = inch_value, clean = format(fmt, inch_value), outvalue = outvalue, minprec = 0, } end end return false, { 'cvt_bug_convert' } -- should never occur end local function user_style(parms, i) -- Return text for a user-specified style for a table cell, or '' if none, -- given i = 1 (input style) or 2 (output style). local style = parms[(i == 1) and 'stylein' or 'styleout'] if style then style = style:gsub('"', '') if style ~= '' then if style:sub(-1) ~= ';' then style = style .. ';' end return style end end return '' end local function make_table_or_sort(parms, invalue, info, in_current, scaled_top) -- Set options to handle output for a table or a sort key, or both. -- The text sort key is based on the value resulting from converting -- the input to a fake base unit with scale = 1, and other properties -- required for a conversion derived from the input unit. -- For other modules, return the sort key in a hidden span element, and -- the scaled value used to generate the sort key. -- If scaled_top is set, it is the scaled value of the numerator of a per unit -- to be combined with this unit (the denominator) to make the sort key. -- Scaling only works with units that convert with a factor (not temperature). local sortkey, scaled_value if parms.opt_sortable_on then local base = { -- a fake unit with enough fields for a valid convert scale = 1, invert = in_current.invert and 1, iscomplex = in_current.iscomplex, offset = in_current.offset and 0, } local outvalue, extra = convert(parms, invalue, info, in_current, base) if extra then outvalue = extra.outvalue end if in_current.istemperature then -- Have converted to kelvin; assume numbers close to zero have a -- rounding error and should be zero. if abs(outvalue) < 1e-12 then outvalue = 0 end end if scaled_top and outvalue ~= 0 then outvalue = scaled_top / outvalue end scaled_value = outvalue if not valid_number(outvalue) then if outvalue < 0 then sortkey = '1000000000000000000' else sortkey = '9000000000000000000' end elseif outvalue == 0 then sortkey = '5000000000000000000' else local mag = floor(log10(abs(outvalue)) + 1e-14) local prefix if outvalue > 0 then prefix = 7000 + mag else prefix = 2999 - mag outvalue = outvalue + 10^(mag+1) end sortkey = format('%d', prefix) .. format('%015.0f', floor(outvalue * 10^(14-mag))) end end local sortspan if sortkey and not parms.table_align then sortspan = parms.opt_sortable_debug and '<span data-sort-value="' .. sortkey .. '♠"><span style="border:1px solid">' .. sortkey .. '♠</span></span>' or '<span data-sort-value="' .. sortkey .. '♠"></span>' parms.join_before = sortspan end if parms.table_align then local sort if sortkey then sort = ' data-sort-value="' .. sortkey .. '"' if parms.opt_sortable_debug then parms.join_before = '<span style="border:1px solid">' .. sortkey .. '</span>' end else sort = '' end local style = 'style="text-align:' .. parms.table_align .. ';' local joins = {} for i = 1, 2 do joins[i] = (i == 1 and '' or '\n|') .. style .. user_style(parms, i) .. '"' .. sort .. '|' end parms.table_joins = joins end return sortspan, scaled_value end local cvt_to_hand local function cvtround(parms, info, in_current, out_current) -- Return true, t where t is a table with the conversion results; fields: -- show = rounded, formatted string with the result of converting value in info, -- using the rounding specified in parms. -- singular = true if result (after rounding and ignoring any negative sign) -- is "1", or like "1.00", or is a fraction with value < 1; -- (and more fields shown below, and a calculated 'absvalue' field). -- or return false, t where t is an error message table. -- Input info.clean uses en digits (it has been translated, if necessary). -- Output show uses en or non-en digits as appropriate, or can be spelled. if out_current.builtin == 'hand' then return cvt_to_hand(parms, info, in_current, out_current) end local invalue = in_current.builtin == 'hand' and info.altvalue or info.value local outvalue, extra = convert(parms, invalue, info, in_current, out_current) if parms.need_table_or_sort then parms.need_table_or_sort = nil -- process using first input value only make_table_or_sort(parms, invalue, info, in_current) end if extra then if not outvalue then return false, extra end invalue = extra.invalue or invalue outvalue = extra.outvalue end if not valid_number(outvalue) then return false, { 'cvt_invalid_num' } end local isnegative if outvalue < 0 then isnegative = true outvalue = -outvalue end local precision, show, exponent local denominator = out_current.frac if denominator then show = fraction_table(outvalue, denominator) else precision = parms.precision if not precision then if parms.sigfig then show, exponent = make_sigfig(outvalue, parms.sigfig) elseif parms.opt_round then local n = parms.opt_round if n == 0.5 then local integer, fracpart = math.modf(floor(2 * outvalue + 0.5) / 2) if fracpart == 0 then show = format('%.0f', integer) else show = format('%.1f', integer + fracpart) end else show = format('%.0f', floor((outvalue / n) + 0.5) * n) end elseif in_current.builtin == 'mach' then local sigfig = info.clean:gsub('^[0.]+', ''):gsub('%.', ''):len() + 1 show, exponent = make_sigfig(outvalue, sigfig) else local inclean = info.clean if extra then inclean = extra.clean or inclean show = extra.show end if not show then precision = default_precision(parms, invalue, inclean, info.denominator, outvalue, in_current, out_current, extra) end end end end if precision then if precision >= 0 then local fudge if precision <= 8 then -- Add a fudge to handle common cases of bad rounding due to inability -- to precisely represent some values. This makes the following work: -- {{convert|-100.1|C|K}} and {{convert|5555000|um|m|2}}. -- Old template uses #expr round, which invokes PHP round(). -- LATER: Investigate how PHP round() works. fudge = 2e-14 else fudge = 0 end local fmt = '%.' .. format('%d', precision) .. 'f' local success success, show = pcall(format, fmt, outvalue + fudge) if not success then return false, { 'cvt_big_prec', tostring(precision) } end else precision = -precision -- #digits to zero (in addition to any digits after dot) local shift = 10 ^ precision show = format('%.0f', outvalue/shift) if show ~= '0' then exponent = #show + precision end end end local t = format_number(parms, show, exponent, isnegative) if type(show) == 'string' then -- Set singular using match because on some systems 0.99999999999999999 is 1.0. if exponent then t.singular = (exponent == 1 and show:match('^10*$')) else t.singular = (show == '1' or show:match('^1%.0*$')) end else t.fraction_table = show t.singular = (outvalue <= 1) -- cannot have 'fraction == 1', but if it were possible it would be singular end t.raw_absvalue = outvalue -- absolute value before rounding return true, setmetatable(t, { __index = function (self, key) if key == 'absvalue' then -- Calculate absolute value after rounding, if needed. local clean, exponent = rawget(self, 'clean'), rawget(self, 'exponent') local value = tonumber(clean) -- absolute value (any negative sign has been ignored) if exponent then value = value * 10^exponent end rawset(self, key, value) return value end end }) end function cvt_to_hand(parms, info, in_current, out_current) -- Convert input to hands, inches. -- Return true, t where t is a table with the conversion results; -- or return false, t where t is an error message table. if parms.abbr_org == nil then out_current.usename = true -- default is to show name not symbol end local precision = parms.precision local frac = out_current.frac if not frac and precision and precision > 1 then frac = (precision == 2) and 2 or 4 end local out_next = out_current.out_next if out_next then -- Use magic knowledge to determine whether the next unit is inches without requiring i18n. -- The following ensures that when the output combination "hand in" is used, the inches -- value is rounded to match the hands value. Also, displaying say "61½" instead of 61.5 -- is better as 61.5 implies the value is not 61.4. if out_next.exception == 'subunit_more_precision' then out_next.frac = frac end end -- Convert to inches; calculate hands from that. local dummy_unit_table = { scale = out_current.scale / 4, frac = frac } local success, outinfo = cvtround(parms, info, in_current, dummy_unit_table) if not success then return false, outinfo end local tfrac = outinfo.fraction_table local inches = outinfo.raw_absvalue if tfrac then inches = floor(inches) -- integer part only; fraction added later else inches = floor(inches + 0.5) -- a hands measurement never shows decimals of an inch end local hands, inches = divide(inches, 4) outinfo.absvalue = hands + inches/4 -- supposed to be the absolute rounded value, but this is close enough local inchstr = tostring(inches) -- '0', '1', '2' or '3' if precision and precision <= 0 then -- using negative or 0 for precision rounds to nearest hand hands = floor(outinfo.raw_absvalue/4 + 0.5) inchstr = '' elseif tfrac then -- Always show an integer before fraction (like "15.0½") because "15½" means 15-and-a-half hands. inchstr = numdot .. format_fraction(parms, 'out', false, inchstr, tfrac.numstr, tfrac.denstr) else inchstr = numdot .. from_en(inchstr) end outinfo.show = outinfo.sign .. with_separator(parms, format('%.0f', hands)) .. inchstr return true, outinfo end local function evaluate_condition(value, condition) -- Return true or false from applying a conditional expression to value, -- or throw an error if invalid. -- A very limited set of expressions is supported: -- v < 9 -- v * 9 < 9 -- where -- 'v' is replaced with value -- 9 is any number (as defined by Lua tonumber) -- only en digits are accepted -- '<' can also be '<=' or '>' or '>=' -- In addition, the following form is supported: -- LHS and RHS -- where -- LHS, RHS = any of above expressions. local function compare(value, text) local arithop, factor, compop, limit = text:match('^%s*v%s*([*]?)(.-)([<>]=?)(.*)$') if arithop == nil then error('Invalid default expression', 0) elseif arithop == '*' then factor = tonumber(factor) if factor == nil then error('Invalid default expression', 0) end value = value * factor end limit = tonumber(limit) if limit == nil then error('Invalid default expression', 0) end if compop == '<' then return value < limit elseif compop == '<=' then return value <= limit elseif compop == '>' then return value > limit elseif compop == '>=' then return value >= limit end error('Invalid default expression', 0) -- should not occur end local lhs, rhs = condition:match('^(.-%W)and(%W.*)') if lhs == nil then return compare(value, condition) end return compare(value, lhs) and compare(value, rhs) end local function get_default(value, unit_table) -- Return true, s where s = name of unit's default output unit, -- or return false, t where t is an error message table. -- Some units have a default that depends on the input value -- (the first value if a range of values is used). -- If '!' is in the default, the first bang-delimited field is an -- expression that uses 'v' to represent the input value. -- Example: 'v < 120 ! small ! big ! suffix' (suffix is optional) -- evaluates 'v < 120' as a boolean with result -- 'smallsuffix' if (value < 120), or 'bigsuffix' otherwise. -- Input must use en digits and '.' decimal mark. local default = data_code.default_exceptions[unit_table.defkey or unit_table.symbol] or unit_table.default if not default then local per = unit_table.per if per then local function a_default(v, u) local success, ucode = get_default(v, u) if not success then return '?' -- an unlikely error has occurred; will cause lookup of default to fail end -- Attempt to use only the first unit if a combination or output multiple. -- This is not bulletproof but should work for most cases. -- Where it does not work, the convert will need to specify the wanted output unit. local t = all_units[ucode] if t then local combo = t.combination if combo then -- For a multiple like ftin, the "first" unit (ft) is last in the combination. local i = t.multiple and table_len(combo) or 1 ucode = combo[i] end else -- Try for an automatically generated combination. local item = ucode:match('^(.-)%+') or ucode:match('^(%S+)%s') if all_units[item] then return item end end return ucode end local unit1, unit2 = per[1], per[2] local def1 = (unit1 and a_default(value, unit1) or unit_table.vprefix or '') local def2 = a_default(1, unit2) -- 1 because per unit of denominator return true, def1 .. '/' .. def2 end return false, { 'cvt_no_default', unit_table.symbol } end if default:find('!', 1, true) == nil then return true, default end local t = split(default, '!') if #t == 3 or #t == 4 then local success, result = pcall(evaluate_condition, value, t[1]) if success then default = result and t[2] or t[3] if #t == 4 then default = default .. t[4] end return true, default end end return false, { 'cvt_bad_default', unit_table.symbol } end local linked_pages -- to record linked pages so will not link to the same page more than once local function unlink(unit_table) -- Forget that the given unit has previously been linked (if it has). -- That is needed when processing a range of inputs or outputs when an id -- for the first range value may have been evaluated, but only an id for -- the last value is displayed, and that id may need to be linked. linked_pages[unit_table.unitcode or unit_table] = nil end local function make_link(link, id, unit_table) -- Return wikilink "[[link|id]]", possibly abbreviated as in examples: -- [[Mile|mile]] --> [[mile]] -- [[Mile|miles]] --> [[mile]]s -- However, just id is returned if: -- * no link given (so caller does not need to check if a link was defined); or -- * link has previously been used during the current convert (to avoid overlinking). local link_key if unit_table then link_key = unit_table.unitcode or unit_table else link_key = link end if not link or link == '' or linked_pages[link_key] then return id end linked_pages[link_key] = true -- Following only works for language en, but it should be safe on other wikis, -- and overhead of doing it generally does not seem worthwhile. local l = link:sub(1, 1):lower() .. link:sub(2) if link == id or l == id then return '[[' .. id .. ']]' elseif link .. 's' == id or l .. 's' == id then return '[[' .. id:sub(1, -2) .. ']]s' else return '[[' .. link .. '|' .. id .. ']]' end end local function variable_name(clean, unit_table) -- For slwiki, a unit name depends on the value. -- Parameter clean is the unsigned rounded value in en digits, as a string. -- Value Source Example for "m" -- integer 1: name1 meter (also is the name of the unit) -- integer 2: var{1} metra -- integer 3 and 4: var{2} metri -- integer else: var{3} metrov (0 and 5 or more) -- real/fraction: var{4} metra -- var{i} means the i'th field in unit_table.varname if it exists and has -- an i'th field, otherwise name2. -- Fields are separated with "!" and are not empty. -- A field for a unit using an SI prefix has the prefix name inserted, -- replacing '#' if found, or before the field otherwise. local vname if clean == '1' then vname = unit_table.name1 elseif unit_table.varname then local i if clean == '2' then i = 1 elseif clean == '3' or clean == '4' then i = 2 elseif clean:find('.', 1, true) then i = 4 else i = 3 end if i > 1 and varname == 'pl' then i = i - 1 end vname = split(unit_table.varname, '!')[i] end if vname then local si_name = rawget(unit_table, 'si_name') or '' local pos = vname:find('#', 1, true) if pos then vname = vname:sub(1, pos - 1) .. si_name .. vname:sub(pos + 1) else vname = si_name .. vname end return vname end return unit_table.name2 end local function linked_id(parms, unit_table, key_id, want_link, clean) -- Return final unit id (symbol or name), optionally with a wikilink, -- and update unit_table.sep if required. -- key_id is one of: 'symbol', 'sym_us', 'name1', 'name1_us', 'name2', 'name2_us'. local abbr_on = (key_id == 'symbol' or key_id == 'sym_us') if abbr_on and want_link then local symlink = rawget(unit_table, 'symlink') if symlink then return symlink -- for exceptions that have the linked symbol built-in end end local multiplier = rawget(unit_table, 'multiplier') local per = unit_table.per if per then local paren1, paren2 = '', '' -- possible parentheses around bottom unit local unit1 = per[1] -- top unit_table, or nil local unit2 = per[2] -- bottom unit_table if abbr_on then if not unit1 then unit_table.sep = '' -- no separator in "$2/acre" end if not want_link then local symbol = unit_table.symbol_raw if symbol then return symbol -- for exceptions that have the symbol built-in end end if (unit2.symbol):find('⋅', 1, true) then paren1, paren2 = '(', ')' end end local key_id2 -- unit2 is always singular if key_id == 'name2' then key_id2 = 'name1' elseif key_id == 'name2_us' then key_id2 = 'name1_us' else key_id2 = key_id end local result if abbr_on then result = '/' elseif omitsep then result = per_word elseif unit1 then result = ' ' .. per_word .. ' ' else result = per_word .. ' ' end if want_link and unit_table.link then if abbr_on or not varname then result = (unit1 and linked_id(parms, unit1, key_id, false, clean) or '') .. result .. linked_id(parms, unit2, key_id2, false, '1') else result = (unit1 and variable_name(clean, unit1) or '') .. result .. variable_name('1', unit2) end if omit_separator(result) then unit_table.sep = '' end return make_link(unit_table.link, result, unit_table) end if unit1 then result = linked_id(parms, unit1, key_id, want_link, clean) .. result if unit1.sep then unit_table.sep = unit1.sep end elseif omitsep then unit_table.sep = '' end return result .. paren1 .. linked_id(parms, unit2, key_id2, want_link, '1') .. paren2 end if multiplier then -- A multiplier (like "100" in "100km") forces the unit to be plural. multiplier = from_en(multiplier) if not omitsep then multiplier = multiplier .. (abbr_on and '&nbsp;' or ' ') end if not abbr_on then if key_id == 'name1' then key_id = 'name2' elseif key_id == 'name1_us' then key_id = 'name2_us' end end else multiplier = '' end local id = unit_table.fixed_name or ((varname and not abbr_on) and variable_name(clean, unit_table) or unit_table[key_id]) if omit_separator(id) then unit_table.sep = '' end if want_link then local link = data_code.link_exceptions[unit_table.linkey or unit_table.symbol] or unit_table.link if link then local before = '' local i = unit_table.customary if i == 1 and parms.opt_sp_us then i = 2 -- show "U.S." not "US" end if i == 3 and abbr_on then i = 4 -- abbreviate "imperial" to "imp" end local customary = text_code.customary_units[i] if customary then -- LATER: This works for language en only, but it's esoteric so ignore for now. local pertext if id:sub(1, 1) == '/' then -- Want unit "/USgal" to display as "/U.S. gal", not "U.S. /gal". pertext = '/' id = id:sub(2) elseif id:sub(1, 4) == 'per ' then -- Similarly want "per U.S. gallon", not "U.S. per gallon" (but in practice this is unlikely to be used). pertext = 'per ' id = id:sub(5) else pertext = '' end -- Omit any "US"/"U.S."/"imp"/"imperial" from start of id since that will be inserted. local removes = (i < 3) and { 'US&nbsp;', 'US ', 'U.S.&nbsp;', 'U.S. ' } or { 'imp&nbsp;', 'imp ', 'imperial ' } for _, prefix in ipairs(removes) do local plen = #prefix if id:sub(1, plen) == prefix then id = id:sub(plen + 1) break end end before = pertext .. make_link(customary.link, customary[1]) .. ' ' end id = before .. make_link(link, id, unit_table) end end return multiplier .. id end local function make_id(parms, which, unit_table) -- Return id, f where -- id = unit name or symbol, possibly modified -- f = true if id is a name, or false if id is a symbol -- using the value for index 'which', and for 'in' or 'out' (unit_table.inout). -- Result is '' if no symbol/name is to be used. -- In addition, set unit_table.sep = ' ' or '&nbsp;' or '' -- (the separator that caller will normally insert before the id). if parms.opt_values then unit_table.sep = '' return '' end local inout = unit_table.inout local info = unit_table.valinfo[which] local abbr_org = parms.abbr_org local adjectival = parms.opt_adjectival local lk = parms.lk local want_link = (lk == 'on' or lk == inout) local usename = unit_table.usename local singular = info.singular local want_name if usename then want_name = true else if abbr_org == nil then if parms.wantname then want_name = true end if unit_table.usesymbol then want_name = false end end if want_name == nil then local abbr = parms.abbr if abbr == 'on' or abbr == inout or (abbr == 'mos' and inout == 'out') then want_name = false else want_name = true end end end local key if want_name then if lk == nil and unit_table.builtin == 'hand' then want_link = true end if parms.opt_use_nbsp then unit_table.sep = '&nbsp;' else unit_table.sep = ' ' end if parms.opt_singular then local value if inout == 'in' then value = info.value else value = info.absvalue end if value then -- some unusual units do not always set value field value = abs(value) singular = (0 < value and value < 1.0001) end end if unit_table.engscale then -- engscale: so "|1|e3kg" gives "1 thousand kilograms" (plural) singular = false end key = (adjectival or singular) and 'name1' or 'name2' if parms.opt_sp_us then key = key .. '_us' end else if unit_table.builtin == 'hand' then if parms.opt_hand_hh then unit_table.symbol = 'hh' -- LATER: might want i18n applied to this end end unit_table.sep = '&nbsp;' key = parms.opt_sp_us and 'sym_us' or 'symbol' end return linked_id(parms, unit_table, key, want_link, info.clean), want_name end local function decorate_value(parms, unit_table, which, number_word) -- If needed, update unit_table so values will be shown with extra information. -- For consistency with the old template (but different from fmtpower), -- the style to display powers of 10 includes "display:none" to allow some -- browsers to copy, for example, "10³" as "10^3", rather than as "103". local info local engscale = unit_table.engscale local prefix = unit_table.vprefix if engscale or prefix then info = unit_table.valinfo[which] if info.decorated then return -- do not redecorate if repeating convert end info.decorated = true if engscale then local inout = unit_table.inout local abbr = parms.abbr if (abbr == 'on' or abbr == inout) and not parms.number_word then info.show = info.show .. '<span style="margin-left:0.2em">×<span style="margin-left:0.1em">' .. from_en('10') .. '</span></span><s style="display:none">^</s><sup>' .. from_en(tostring(engscale.exponent)) .. '</sup>' elseif number_word then local number_id local lk = parms.lk if lk == 'on' or lk == inout then number_id = make_link(engscale.link, engscale[1]) else number_id = engscale[1] end -- WP:NUMERAL recommends "&nbsp;" in values like "12 million". info.show = info.show .. (parms.opt_adjectival and '-' or '&nbsp;') .. number_id end end if prefix then info.show = prefix .. info.show end end end local function process_input(parms, in_current) -- Processing required once per conversion. -- Return block of text to represent input (value/unit). if parms.opt_output_only or parms.opt_output_number_only or parms.opt_output_unit_only then parms.joins = { '', '' } return '' end local first_unit local composite = in_current.composite -- nil or table of units if composite then first_unit = composite[1] else first_unit = in_current end local id1, want_name = make_id(parms, 1, first_unit) local sep = first_unit.sep -- separator between value and unit, set by make_id local preunit = parms.preunit1 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_input_unit_only then parms.joins = { '', '' } if composite then local parts = { id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, (make_id(parms, 1, unit))) end end id1 = table.concat(parts, ' ') end if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end if parms.opt_also_symbol and not composite and not parms.opt_flip then local join1 = parms.joins[1] if join1 == ' (' or join1 == ' [' then parms.joins = { ' [' .. first_unit[parms.opt_sp_us and 'sym_us' or 'symbol'] .. ']' .. join1 , parms.joins[2] } end end if in_current.builtin == 'mach' and first_unit.sep ~= '' then -- '' means omitsep with non-enwiki name local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = first_unit.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. local prefix2 = make_id(parms, 2, first_unit) .. '&nbsp;' result = range_text(range[1], want_name, parms, result, prefix2 .. valinfo[2].show, 'in', {spaced=true}) end return preunit .. result end if composite then -- Simplify: assume there is no range, and no decoration. local mid = (not parms.opt_flip) and parms.mid or '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival and want_name then sep1 = '-' sep2 = '-' end if omitsep and sep == '' then -- Testing the id of the most significant unit should be sufficient. sep1 = '' sep2 = '' end local parts = { first_unit.valinfo[1].show .. sep1 .. id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, unit.valinfo[1].show .. sep1 .. (make_id(parms, 1, unit))) end end return table.concat(parts, sep2) .. mid end local add_unit = (parms.abbr == 'mos') or parms[parms.opt_flip and 'out_range_x' or 'in_range_x'] or (not want_name and parms.abbr_range_x) local range = parms.range if range and not add_unit then unlink(first_unit) end local id = range and make_id(parms, range.n + 1, first_unit) or id1 local extra, was_hyphenated = hyphenated_maybe(parms, want_name, sep, id, 'in') if was_hyphenated then add_unit = false end local result local valinfo = first_unit.valinfo if range then for i = 0, range.n do local number_word if i == range.n then add_unit = false number_word = true end decorate_value(parms, first_unit, i+1, number_word) local show = valinfo[i+1].show if add_unit then show = show .. first_unit.sep .. (i == 0 and id1 or make_id(parms, i+1, first_unit)) end if i == 0 then result = show else result = range_text(range[i], want_name, parms, result, show, 'in') end end else decorate_value(parms, first_unit, 1, true) result = valinfo[1].show end return result .. preunit .. extra end local function process_one_output(parms, out_current) -- Processing required for each output unit. -- Return block of text to represent output (value/unit). local inout = out_current.inout -- normally 'out' but can be 'in' for order=out local id1, want_name = make_id(parms, 1, out_current) local sep = out_current.sep -- set by make_id local preunit = parms.preunit2 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_output_unit_only then if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end if out_current.builtin == 'mach' and out_current.sep ~= '' then -- '' means omitsep with non-enwiki name local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = out_current.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. result = range_text(range[1], want_name, parms, result, prefix .. valinfo[2].show, inout, {spaced=true}) end return preunit .. result end local add_unit = (parms[parms.opt_flip and 'in_range_x' or 'out_range_x'] or (not want_name and parms.abbr_range_x)) and not parms.opt_output_number_only local range = parms.range if range and not add_unit then unlink(out_current) end local id = range and make_id(parms, range.n + 1, out_current) or id1 local extra, was_hyphenated = hyphenated_maybe(parms, want_name, sep, id, inout) if was_hyphenated then add_unit = false end local result local valinfo = out_current.valinfo if range then for i = 0, range.n do local number_word if i == range.n then add_unit = false number_word = true end decorate_value(parms, out_current, i+1, number_word) local show = valinfo[i+1].show if add_unit then show = show .. out_current.sep .. (i == 0 and id1 or make_id(parms, i+1, out_current)) end if i == 0 then result = show else result = range_text(range[i], want_name, parms, result, show, inout) end end else decorate_value(parms, out_current, 1, true) result = valinfo[1].show end if parms.opt_output_number_only then return result end return result .. preunit .. extra end local function make_output_single(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for a single output (which is not a combination or a multiple); -- or return false, t where t is an error message table. if parms.opt_order_out and in_unit_table.unitcode == out_unit_table.unitcode then out_unit_table.valinfo = in_unit_table.valinfo else out_unit_table.valinfo = collection() for _, v in ipairs(in_unit_table.valinfo) do local success, info = cvtround(parms, v, in_unit_table, out_unit_table) if not success then return false, info end out_unit_table.valinfo:add(info) end end return true, process_one_output(parms, out_unit_table) end local function make_output_multiple(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for an output which is a multiple (like 'ftin'); -- or return false, t where t is an error message table. local inout = out_unit_table.inout -- normally 'out' but can be 'in' for order=out local multiple = out_unit_table.multiple -- table of scaling factors (will not be nil) local combos = out_unit_table.combination -- table of unit tables (will not be nil) local abbr = parms.abbr local abbr_org = parms.abbr_org local disp = parms.disp local want_name = (abbr_org == nil and (disp == 'or' or disp == 'slash')) or not (abbr == 'on' or abbr == inout or abbr == 'mos') local want_link = (parms.lk == 'on' or parms.lk == inout) local mid = parms.opt_flip and parms.mid or '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival and want_name then sep1 = '-' sep2 = '-' end local do_spell = parms.opt_spell_out parms.opt_spell_out = nil -- so the call to cvtround does not spell the value local function make_result(info, isfirst) local fmt, outvalue, sign local results = {} for i = 1, #combos do local tfrac, thisvalue, strforce local out_current = combos[i] out_current.inout = inout local scale = multiple[i] if i == 1 then -- least significant unit ('in' from 'ftin') local decimals out_current.frac = out_unit_table.frac local success, outinfo = cvtround(parms, info, in_unit_table, out_current) if not success then return false, outinfo end if isfirst then out_unit_table.valinfo = { outinfo } -- in case output value of first least significant unit is needed end sign = outinfo.sign tfrac = outinfo.fraction_table if outinfo.is_scientific then strforce = outinfo.show decimals = '' elseif tfrac then decimals = '' else local show = outinfo.show -- number as a string in local language local p1, p2 = show:find(numdot, 1, true) decimals = p1 and show:sub(p2 + 1) or '' -- text after numdot, if any end fmt = '%.' .. ulen(decimals) .. 'f' -- to reproduce precision if decimals == '' then if tfrac then outvalue = floor(outinfo.raw_absvalue) -- integer part only; fraction added later else outvalue = floor(outinfo.raw_absvalue + 0.5) -- keep all integer digits of least significant unit end else outvalue = outinfo.absvalue end end if scale then outvalue, thisvalue = divide(outvalue, scale) else thisvalue = outvalue end local id if want_name then if varname then local clean if strforce or tfrac then clean = '.1' -- dummy value to force name for floating point else clean = format(fmt, thisvalue) end id = variable_name(clean, out_current) else local key = 'name2' if parms.opt_adjectival then key = 'name1' elseif tfrac then if thisvalue == 0 then key = 'name1' end elseif parms.opt_singular then if 0 < thisvalue and thisvalue < 1.0001 then key = 'name1' end else if thisvalue == 1 then key = 'name1' end end id = out_current[key] end else id = out_current['symbol'] end if i == 1 and omit_separator(id) then -- Testing the id of the least significant unit should be sufficient. sep1 = '' sep2 = '' end if want_link then local link = out_current.link if link then id = make_link(link, id, out_current) end end local strval local spell_inout = (i == #combos or outvalue == 0) and inout or '' -- trick so the last value processed (first displayed) has uppercase, if requested if strforce and outvalue == 0 then sign = '' -- any sign is in strforce strval = strforce -- show small values in scientific notation; will only use least significant unit elseif tfrac then local wholestr = (thisvalue > 0) and tostring(thisvalue) or nil strval = format_fraction(parms, spell_inout, false, wholestr, tfrac.numstr, tfrac.denstr, do_spell) else strval = (thisvalue == 0) and from_en('0') or with_separator(parms, format(fmt, thisvalue)) if do_spell then strval = spell_number(parms, spell_inout, strval) or strval end end table.insert(results, strval .. sep1 .. id) if outvalue == 0 then break end fmt = '%.0f' -- only least significant unit can have a non-integral value end local reversed, count = {}, #results for i = 1, count do reversed[i] = results[count + 1 - i] end return true, sign .. table.concat(reversed, sep2) end local valinfo = in_unit_table.valinfo local success, result = make_result(valinfo[1], true) if not success then return false, result end local range = parms.range if range then for i = 1, range.n do local success, result2 = make_result(valinfo[i+1]) if not success then return false, result2 end result = range_text(range[i], want_name, parms, result, result2, inout, {spaced=true}) end end return true, result .. mid end local function process(parms, in_unit_table, out_unit_table) -- Return true, s, outunit where s = final wikitext result, -- or return false, t where t is an error message table. linked_pages = {} local success, bad_output local bad_input_mcode = in_unit_table.bad_mcode -- nil if input unit is a valid convert unit local out_unit = parms.out_unit if out_unit == nil or out_unit == '' or type(out_unit) == 'function' then if bad_input_mcode or parms.opt_input_unit_only then bad_output = '' else local getdef = type(out_unit) == 'function' and out_unit or get_default success, out_unit = getdef(in_unit_table.valinfo[1].value, in_unit_table) parms.out_unit = out_unit if not success then bad_output = out_unit end end end if not bad_output and not out_unit_table then success, out_unit_table = lookup(parms, out_unit, 'any_combination') if success then local mismatch = check_mismatch(in_unit_table, out_unit_table) if mismatch then bad_output = mismatch end else bad_output = out_unit_table end end local lhs, rhs local flipped = parms.opt_flip and not bad_input_mcode if bad_output then rhs = (bad_output == '') and '' or message(parms, bad_output) elseif parms.opt_input_unit_only then rhs = '' else local combos -- nil (for 'ft' or 'ftin'), or table of unit tables (for 'm ft') if not out_unit_table.multiple then -- nil/false ('ft' or 'm ft'), or table of factors ('ftin') combos = out_unit_table.combination end local frac = parms.frac -- nil or denominator of fraction for output values if frac then -- Apply fraction to the unit (if only one), or to non-SI units (if a combination), -- except that if a precision is also specified, the fraction only applies to -- the hand unit; that allows the following result: -- {{convert|156|cm|in hand|1|frac=2}} → 156 centimetres (61.4 in; 15.1½ hands) -- However, the following is handled elsewhere as a special case: -- {{convert|156|cm|hand in|1|frac=2}} → 156 centimetres (15.1½ hands; 61½ in) if combos then local precision = parms.precision for _, unit in ipairs(combos) do if unit.builtin == 'hand' or (not precision and not unit.prefixes) then unit.frac = frac end end else out_unit_table.frac = frac end end local outputs = {} local imax = combos and #combos or 1 -- 1 (single unit) or number of unit tables if imax == 1 then parms.opt_order_out = nil -- only useful with an output combination end if not flipped and not parms.opt_order_out then -- Process left side first so any duplicate links (from lk=on) are suppressed -- on right. Example: {{convert|28|e9pc|e9ly|abbr=off|lk=on}} lhs = process_input(parms, in_unit_table) end for i = 1, imax do local success, item local out_current = combos and combos[i] or out_unit_table out_current.inout = 'out' if i == 1 then if imax > 1 and out_current.builtin == 'hand' then out_current.out_next = combos[2] -- built-in hand can influence next unit in a combination end if parms.opt_order_out then out_current.inout = 'in' end end if out_current.multiple then success, item = make_output_multiple(parms, in_unit_table, out_current) else success, item = make_output_single(parms, in_unit_table, out_current) end if not success then return false, item end outputs[i] = item end if parms.opt_order_out then lhs = outputs[1] table.remove(outputs, 1) end local sep = parms.table_joins and parms.table_joins[2] or parms.join_between rhs = table.concat(outputs, sep) end if flipped or not lhs then local input = process_input(parms, in_unit_table) if flipped then lhs = rhs rhs = input else lhs = input end end if parms.join_before then lhs = parms.join_before .. lhs end local wikitext if bad_input_mcode then if bad_input_mcode == '' then wikitext = lhs else wikitext = lhs .. message(parms, bad_input_mcode) end elseif parms.table_joins then wikitext = parms.table_joins[1] .. lhs .. parms.table_joins[2] .. rhs else wikitext = lhs .. parms.joins[1] .. rhs .. parms.joins[2] end if parms.warnings and not bad_input_mcode then wikitext = wikitext .. parms.warnings end return true, get_styles(parms) .. wikitext, out_unit_table end local function main_convert(frame) -- Do convert, and if needed, do it again with higher default precision. local parms = { frame = frame } -- will hold template arguments, after translation set_config(frame.args) local success, result = get_parms(parms, frame:getParent().args) if success then if type(result) ~= 'table' then return tostring(result) end local in_unit_table = result local out_unit_table for _ = 1, 2 do -- use counter so cannot get stuck repeating convert success, result, out_unit_table = process(parms, in_unit_table, out_unit_table) if success and parms.do_convert_again then parms.do_convert_again = false else break end end end -- If input=x gives a problem, the result should be just the user input -- (if x is a property like P123 it has been replaced with ''). -- An unknown input unit would display the input and an error message -- with success == true at this point. -- Also, can have success == false with a message that outputs an empty string. if parms.input_text then if success and not parms.have_problem then return result end local cat if parms.tracking then -- Add a tracking category using the given text as the category sort key. -- There is currently only one type of tracking, but in principle multiple -- items could be tracked, using different sort keys for convenience. cat = wanted_category('tracking', parms.tracking) end return parms.input_text .. (cat or '') end return success and result or message(parms, result) end local function _unit(unitcode, options) -- Helper function for Module:Val to look up a unit. -- Parameter unitcode must be a string to identify the wanted unit. -- Parameter options must be nil or a table with optional fields: -- value = number (for sort key; default value is 1) -- scaled_top = nil for a normal unit, or a number for a unit which is -- the denominator of a per unit (for sort key) -- si = { 'symbol', 'link' } -- (a table with two strings) to make an SI unit -- that will be used for the look up -- link = true if result should be [[linked]] -- sort = 'on' or 'debug' if result should include a sort key in a -- span element ('debug' makes the key visible) -- name = true for the name of the unit instead of the symbol -- us = true for the US spelling of the unit, if any -- Return nil if unitcode is not a non-empty string. -- Otherwise return a table with fields: -- text = requested symbol or name of unit, optionally linked -- scaled_value = input value adjusted by unit scale; used for sort key -- sortspan = span element with sort key like that provided by {{ntsh}}, -- calculated from the result of converting value -- to a base unit with scale 1. -- unknown = true if the unitcode was not known unitcode = strip(unitcode) if unitcode == nil or unitcode == '' then return nil end set_config({}) linked_pages = {} options = options or {} local parms = { abbr = options.name and 'off' or 'on', lk = options.link and 'on' or nil, opt_sp_us = options.us and true or nil, opt_ignore_error = true, -- do not add pages using this function to 'what links here' for Module:Convert/extra opt_sortable_on = options.sort == 'on' or options.sort == 'debug', opt_sortable_debug = options.sort == 'debug', } if options.si then -- Make a dummy table of units (just one unit) for lookup to use. -- This makes lookup recognize any SI prefix in the unitcode. local symbol = options.si[1] or '?' parms.unittable = { [symbol] = { _name1 = symbol, _name2 = symbol, _symbol = symbol, utype = symbol, scale = symbol == 'g' and 0.001 or 1, prefixes = 1, default = symbol, link = options.si[2], }} end local success, unit_table = lookup(parms, unitcode, 'no_combination') if not success then unit_table = setmetatable({ symbol = unitcode, name2 = unitcode, utype = unitcode, scale = 1, default = '', defkey = '', linkey = '' }, unit_mt) end local value = tonumber(options.value) or 1 local clean = tostring(abs(value)) local info = { value = value, altvalue = value, singular = (clean == '1'), clean = clean, show = clean, } unit_table.inout = 'in' unit_table.valinfo = { info } local sortspan, scaled_value if options.sort then sortspan, scaled_value = make_table_or_sort(parms, value, info, unit_table, options.scaled_top) end return { text = make_id(parms, 1, unit_table), sortspan = sortspan, scaled_value = scaled_value, unknown = not success and true or nil, } end return { convert = main_convert, _unit = _unit } cac541bea61c5fbbcb0a2768343935e97587b60a Module:Convert/data 828 584 1157 1156 2023-06-23T00:34:59Z Tasha04 2 1 revision imported Scribunto text/plain -- Conversion data used by [[Module:Convert]] which uses mw.loadData() for -- read-only access to this module so that it is loaded only once per page. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- -- These data tables follow: -- all_units all properties for a unit, including default output -- default_exceptions exceptions for default output ('kg' and 'g' have different defaults) -- link_exceptions exceptions for links ('kg' and 'g' have different links) -- -- These tables are generated by a script which reads the wikitext of a page that -- documents the required properties of each unit; see [[:en:Module:Convert/doc]]. --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local all_units = { ["Gy"] = { _name1 = "gray", _symbol = "Gy", utype = "absorbed radiation dose", scale = 1, prefixes = 1, default = "rad", link = "Gray (unit)", }, ["rad"] = { _name1 = "rad", _symbol = "rad", utype = "absorbed radiation dose", scale = 0.01, prefixes = 1, default = "Gy", link = "Rad (unit)", }, ["cm/s2"] = { name1 = "centimetre per second squared", name1_us = "centimeter per second squared", name2 = "centimetres per second squared", name2_us = "centimeters per second squared", symbol = "cm/s<sup>2</sup>", utype = "acceleration", scale = 0.01, default = "ft/s2", link = "Gal (unit)", }, ["ft/s2"] = { name1 = "foot per second squared", name2 = "feet per second squared", symbol = "ft/s<sup>2</sup>", utype = "acceleration", scale = 0.3048, default = "m/s2", }, ["g0"] = { name1 = "standard gravity", name2 = "standard gravities", symbol = "''g''<sub>0</sub>", utype = "acceleration", scale = 9.80665, default = "m/s2", }, ["g-force"] = { name2 = "''g''", symbol = "''g''", utype = "acceleration", scale = 9.80665, default = "m/s2", link = "g-force", }, ["km/hs"] = { name1 = "kilometre per hour per second", name1_us = "kilometer per hour per second", name2 = "kilometres per hour per second", name2_us = "kilometers per hour per second", symbol = "km/(h⋅s)", utype = "acceleration", scale = 0.27777777777777779, default = "mph/s", link = "Acceleration", }, ["km/s2"] = { name1 = "kilometre per second squared", name1_us = "kilometer per second squared", name2 = "kilometres per second squared", name2_us = "kilometers per second squared", symbol = "km/s<sup>2</sup>", utype = "acceleration", scale = 1000, default = "mph/s", link = "Acceleration", }, ["m/s2"] = { name1 = "metre per second squared", name1_us = "meter per second squared", name2 = "metres per second squared", name2_us = "meters per second squared", symbol = "m/s<sup>2</sup>", utype = "acceleration", scale = 1, default = "ft/s2", }, ["mph/s"] = { name1 = "mile per hour per second", name2 = "miles per hour per second", symbol = "mph/s", utype = "acceleration", scale = 0.44704, default = "km/hs", link = "Acceleration", }, ["km/h/s"] = { target = "km/hs", }, ["standard gravity"] = { target = "g0", }, ["1000sqft"] = { name1 = "thousand square feet", name2 = "thousand square feet", symbol = "1000&nbsp;sq&nbsp;ft", utype = "area", scale = 92.90304, default = "m2", link = "Square foot", }, ["a"] = { _name1 = "are", _symbol = "a", utype = "area", scale = 100, prefixes = 1, default = "sqft", link = "Hectare#Are", }, ["acre"] = { symbol = "acre", usename = 1, utype = "area", scale = 4046.8564224, default = "ha", subdivs = { ["rood"] = { 4, default = "ha" }, ["sqperch"] = { 160, default = "ha" } }, }, ["acre-sing"] = { target = "acre", }, ["arpent"] = { symbol = "arpent", usename = 1, utype = "area", scale = 3418.89, default = "ha", }, ["cda"] = { name1 = "cuerda", symbol = "cda", utype = "area", scale = 3930.395625, default = "ha acre", }, ["daa"] = { name1 = "decare", symbol = "daa", utype = "area", scale = 1000, default = "km2 sqmi", }, ["dunam"] = { symbol = "dunam", usename = 1, utype = "area", scale = 1000, default = "km2 sqmi", }, ["dunum"] = { symbol = "dunum", usename = 1, utype = "area", scale = 1000, default = "km2 sqmi", link = "Dunam", }, ["ha"] = { name1 = "hectare", symbol = "ha", utype = "area", scale = 10000, default = "acre", }, ["hectare"] = { name1 = "hectare", symbol = "ha", usename = 1, utype = "area", scale = 10000, default = "acre", }, ["Irish acre"] = { name1 = "Irish acre", symbol = "Irish&nbsp;acres", utype = "area", scale = 6555.2385024, default = "ha", link = "Acre (Irish)", }, ["m2"] = { _name1 = "square metre", _name1_us= "square meter", _symbol = "m<sup>2</sup>", prefix_position= 8, utype = "area", scale = 1, prefixes = 2, default = "sqft", link = "Square metre", }, ["pondemaat"] = { name1 = "pondemaat", name2 = "pondemaat", symbol = "pond", utype = "area", scale = 3674.363358816, default = "m2", link = ":nl:pondemaat", }, ["pyeong"] = { name2 = "pyeong", symbol = "pyeong", usename = 1, utype = "area", scale = 3.3057851239669422, default = "m2", }, ["rai"] = { name2 = "rai", symbol = "rai", utype = "area", scale = 1600, default = "m2", link = "Rai (unit)", }, ["rood"] = { symbol = "rood", usename = 1, utype = "area", scale = 1011.7141056, default = "sqft m2", subdivs = { ["sqperch"] = { 40, default = "m2" } }, link = "Rood (unit)", }, ["sqfoot"] = { name1 = "square foot", name2 = "square foot", symbol = "sq&nbsp;ft", utype = "area", scale = 0.09290304, default = "m2", }, ["sqft"] = { name1 = "square foot", name2 = "square feet", symbol = "sq&nbsp;ft", utype = "area", scale = 0.09290304, default = "m2", }, ["sqin"] = { name1 = "square inch", name2 = "square inches", symbol = "sq&nbsp;in", utype = "area", scale = 0.00064516, default = "cm2", }, ["sqmi"] = { name1 = "square mile", symbol = "sq&nbsp;mi", utype = "area", scale = 2589988.110336, default = "km2", }, ["sqnmi"] = { name1 = "square nautical mile", symbol = "sq&nbsp;nmi", utype = "area", scale = 3429904, default = "km2 sqmi", link = "Nautical mile", }, ["sqperch"] = { name2 = "perches", symbol = "perch", usename = 1, utype = "area", scale = 25.29285264, default = "m2", link = "Rod (unit)#Area and volume", }, ["sqverst"] = { symbol = "square verst", usename = 1, utype = "area", scale = 1138062.24, default = "km2 sqmi", link = "Verst", }, ["sqyd"] = { name1 = "square yard", symbol = "sq&nbsp;yd", utype = "area", scale = 0.83612736, default = "m2", }, ["tsubo"] = { name2 = "tsubo", symbol = "tsubo", usename = 1, utype = "area", scale = 3.3057851239669422, default = "m2", link = "Japanese units of measurement#Area", }, ["acres"] = { target = "acre", }, ["are"] = { target = "a", }, ["decare"] = { target = "daa", }, ["foot2"] = { target = "sqfoot", }, ["ft2"] = { target = "sqft", }, ["in2"] = { target = "sqin", symbol = "in<sup>2</sup>", }, ["km²"] = { target = "km2", }, ["mi2"] = { target = "sqmi", }, ["million acre"] = { target = "e6acre", }, ["million acres"] = { target = "e6acre", }, ["million hectares"] = { target = "e6ha", }, ["m²"] = { target = "m2", }, ["nmi2"] = { target = "sqnmi", }, ["pond"] = { target = "pondemaat", }, ["sq arp"] = { target = "arpent", }, ["sqkm"] = { target = "km2", }, ["sqm"] = { target = "m2", }, ["square verst"] = { target = "sqverst", }, ["verst2"] = { target = "sqverst", }, ["yd2"] = { target = "sqyd", }, ["m2/ha"] = { name1 = "square metre per hectare", name1_us = "square meter per hectare", name2 = "square metres per hectare", name2_us = "square meters per hectare", symbol = "m<sup>2</sup>/ha", utype = "area per unit area", scale = 0.0001, default = "sqft/acre", link = "Basal area", }, ["sqft/acre"] = { name1 = "square foot per acre", name2 = "square feet per acre", symbol = "sq&nbsp;ft/acre", utype = "area per unit area", scale = 2.295684113865932e-5, default = "m2/ha", link = "Basal area", }, ["cent"] = { name1 = "cent", symbol = "¢", utype = "cent", scale = 1, default = "cent", link = "Cent (currency)", }, ["¢"] = { target = "cent", }, ["A.h"] = { name1 = "ampere hour", symbol = "A⋅h", utype = "charge", scale = 3600, default = "coulomb", }, ["coulomb"] = { _name1 = "coulomb", _symbol = "C", utype = "charge", scale = 1, prefixes = 1, default = "e", link = "Coulomb", }, ["e"] = { name1 = "elementary charge", symbol = "''e''", utype = "charge", scale = 1.602176487e-19, default = "coulomb", }, ["g-mol"] = { name1 = "gram-mole", symbol = "g&#8209;mol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["gmol"] = { name1 = "gram-mole", symbol = "gmol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["kmol"] = { name1 = "kilomole", symbol = "kmol", utype = "chemical amount", scale = 1000, default = "lbmol", link = "Mole (unit)", }, ["lb-mol"] = { name1 = "pound-mole", symbol = "lb&#8209;mol", utype = "chemical amount", scale = 453.59237, default = "mol", }, ["lbmol"] = { name1 = "pound-mole", symbol = "lbmol", utype = "chemical amount", scale = 453.59237, default = "mol", }, ["mol"] = { name1 = "mole", symbol = "mol", utype = "chemical amount", scale = 1, default = "lbmol", link = "Mole (unit)", }, ["kgCO2/L"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg(CO<sub>2</sub>)/L", utype = "co2 per unit volume", scale = 1000, default = "lbCO2/USgal", link = "Exhaust gas", }, ["lbCO2/USgal"] = { name1 = "pound per US gallon", name2 = "pounds per US gallon", symbol = "lbCO2/US&nbsp;gal", utype = "co2 per unit volume", scale = 119.82642731689663, default = "kgCO2/L", link = "Exhaust gas", }, ["oz/lb"] = { per = { "oz", "lb" }, utype = "concentration", default = "mg/kg", }, ["mg/kg"] = { per = { "mg", "kg" }, utype = "concentration", default = "oz/lb", }, ["g/dm3"] = { name1 = "gram per cubic decimetre", name1_us = "gram per cubic decimeter", name2 = "grams per cubic decimetre", name2_us = "grams per cubic decimeter", symbol = "g/dm<sup>3</sup>", utype = "density", scale = 1, default = "kg/m3", link = "Density", }, ["g/L"] = { name1 = "gram per litre", name1_us = "gram per liter", name2 = "grams per litre", name2_us = "grams per liter", symbol = "g/L", utype = "density", scale = 1, default = "lb/cuin", link = "Density", }, ["g/mL"] = { name1 = "gram per millilitre", name1_us = "gram per milliliter", name2 = "grams per millilitre", name2_us = "grams per milliliter", symbol = "g/mL", utype = "density", scale = 1000, default = "lb/cuin", link = "Density", }, ["g/ml"] = { name1 = "gram per millilitre", name1_us = "gram per milliliter", name2 = "grams per millilitre", name2_us = "grams per milliliter", symbol = "g/ml", utype = "density", scale = 1000, default = "lb/cuin", link = "Density", }, ["kg/dm3"] = { name1 = "kilogram per cubic decimetre", name1_us = "kilogram per cubic decimeter", name2 = "kilograms per cubic decimetre", name2_us = "kilograms per cubic decimeter", symbol = "kg/dm<sup>3</sup>", utype = "density", scale = 1000, default = "lb/cuft", link = "Density", }, ["kg/L"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg/L", utype = "density", scale = 1000, default = "lb/USgal", link = "Density", }, ["kg/l"] = { name1 = "kilogram per litre", name1_us = "kilogram per liter", name2 = "kilograms per litre", name2_us = "kilograms per liter", symbol = "kg/l", utype = "density", scale = 1000, default = "lb/USgal", link = "Density", }, ["kg/m3"] = { name1 = "kilogram per cubic metre", name1_us = "kilogram per cubic meter", name2 = "kilograms per cubic metre", name2_us = "kilograms per cubic meter", symbol = "kg/m<sup>3</sup>", utype = "density", scale = 1, default = "lb/cuyd", link = "Density", }, ["lb/cuft"] = { name1 = "pound per cubic foot", name2 = "pounds per cubic foot", symbol = "lb/cu&nbsp;ft", utype = "density", scale = 16.018463373960142, default = "g/cm3", link = "Density", }, ["lb/cuin"] = { name1 = "pound per cubic inch", name2 = "pounds per cubic inch", symbol = "lb/cu&nbsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["lb/cuyd"] = { name1 = "pound per cubic yard", name2 = "pounds per cubic yard", symbol = "lb/cu&nbsp;yd", utype = "density", scale = 0.5932764212577829, default = "kg/m3", link = "Density", }, ["lb/impgal"] = { name1 = "pound per imperial gallon", name2 = "pounds per imperial gallon", symbol = "lb/imp&nbsp;gal", utype = "density", scale = 99.776372663101697, default = "kg/L", link = "Density", }, ["lb/in3"] = { name1 = "pound per cubic inch", name2 = "pounds per cubic inch", symbol = "lb/cu&thinsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["lb/U.S.gal"] = { name1 = "pound per U.S. gallon", name2 = "pounds per U.S. gallon", symbol = "lb/U.S.&nbsp;gal", utype = "density", scale = 119.82642731689663, default = "kg/L", link = "Density", }, ["lb/USbu"] = { name1 = "pound per US bushel", name2 = "pounds per US bushel", symbol = "lb/US&nbsp;bu", utype = "density", scale = 12.871859780974471, default = "kg/m3", link = "Bushel", }, ["lb/USgal"] = { name1 = "pound per US gallon", name2 = "pounds per US gallon", symbol = "lb/US&nbsp;gal", utype = "density", scale = 119.82642731689663, default = "kg/L", link = "Density", }, ["lbm/cuin"] = { name1 = "pound mass per cubic inch", name2 = "pounds mass per cubic inch", symbol = "lbm/cu&thinsp;in", utype = "density", scale = 27679.904710203122, default = "g/cm3", link = "Density", }, ["mg/L"] = { name1 = "milligram per litre", name1_us = "milligram per liter", name2 = "milligrams per litre", name2_us = "milligrams per liter", symbol = "mg/L", utype = "density", scale = 0.001, default = "lb/cuin", link = "Density", }, ["oz/cuin"] = { name1 = "ounce per cubic inch", name2 = "ounces per cubic inch", symbol = "oz/cu&nbsp;in", utype = "density", scale = 1729.9940443876951, default = "g/cm3", link = "Density", }, ["g/cm3"] = { per = { "g", "cm3" }, utype = "density", default = "lb/cuin", }, ["g/m3"] = { per = { "g", "m3" }, utype = "density", default = "lb/cuyd", link = "Density", }, ["Mg/m3"] = { per = { "Mg", "m3" }, utype = "density", default = "lb/cuft", }, ["mg/l"] = { per = { "mg", "ll" }, utype = "density", default = "oz/cuin", }, ["μg/dL"] = { per = { "μg", "dL" }, utype = "density", default = "lb/cuin", }, ["μg/l"] = { per = { "μg", "ll" }, utype = "density", default = "oz/cuin", }, ["lb/ft3"] = { target = "lb/cuft", }, ["lb/yd3"] = { target = "lb/cuyd", }, ["lbm/in3"] = { target = "lbm/cuin", }, ["mcg/dL"] = { target = "μg/dL", }, ["oz/in3"] = { target = "oz/cuin", }, ["ug/dL"] = { target = "μg/dL", }, ["ug/l"] = { target = "μg/l", }, ["B.O.T.U."] = { name1 = "Board of Trade Unit", symbol = "B.O.T.U.", utype = "energy", scale = 3600000, default = "MJ", link = "Kilowatt-hour", }, ["bboe"] = { name1 = "barrel of oil equivalent", name2 = "barrels of oil equivalent", symbol = "bboe", utype = "energy", scale = 6117863200, default = "GJ", }, ["BOE"] = { name1 = "barrel of oil equivalent", name2 = "barrels of oil equivalent", symbol = "BOE", utype = "energy", scale = 6117863200, default = "GJ", }, ["BTU"] = { name1 = "British thermal unit", symbol = "BTU", utype = "energy", scale = 1055.05585262, default = "kJ", }, ["Btu"] = { name1 = "British thermal unit", symbol = "Btu", utype = "energy", scale = 1055.05585262, default = "kJ", }, ["BTU-39F"] = { name1 = "British thermal unit (39°F)", name2 = "British thermal units (39°F)", symbol = "BTU<sub>39°F</sub>", utype = "energy", scale = 1059.67, default = "kJ", link = "British thermal unit", }, ["Btu-39F"] = { name1 = "British thermal unit (39°F)", name2 = "British thermal units (39°F)", symbol = "Btu<sub>39°F</sub>", utype = "energy", scale = 1059.67, default = "kJ", link = "British thermal unit", }, ["BTU-59F"] = { name1 = "British thermal unit (59°F)", name2 = "British thermal units (59°F)", symbol = "BTU<sub>59°F</sub>", utype = "energy", scale = 1054.804, default = "kJ", link = "British thermal unit", }, ["Btu-59F"] = { name1 = "British thermal unit (59°F)", name2 = "British thermal units (59°F)", symbol = "Btu<sub>59°F</sub>", utype = "energy", scale = 1054.804, default = "kJ", link = "British thermal unit", }, ["BTU-60F"] = { name1 = "British thermal unit (60°F)", name2 = "British thermal units (60°F)", symbol = "BTU<sub>60°F</sub>", utype = "energy", scale = 1054.68, default = "kJ", link = "British thermal unit", }, ["Btu-60F"] = { name1 = "British thermal unit (60°F)", name2 = "British thermal units (60°F)", symbol = "Btu<sub>60°F</sub>", utype = "energy", scale = 1054.68, default = "kJ", link = "British thermal unit", }, ["BTU-63F"] = { name1 = "British thermal unit (63°F)", name2 = "British thermal units (63°F)", symbol = "BTU<sub>63°F</sub>", utype = "energy", scale = 1054.6, default = "kJ", link = "British thermal unit", }, ["Btu-63F"] = { name1 = "British thermal unit (63°F)", name2 = "British thermal units (63°F)", symbol = "Btu<sub>63°F</sub>", utype = "energy", scale = 1054.6, default = "kJ", link = "British thermal unit", }, ["BTU-ISO"] = { name1 = "British thermal unit (ISO)", name2 = "British thermal units (ISO)", symbol = "BTU<sub>ISO</sub>", utype = "energy", scale = 1055.056, default = "kJ", link = "British thermal unit", }, ["Btu-ISO"] = { target = "BTU-ISO", }, ["BTU-IT"] = { name1 = "British thermal unit (IT)", name2 = "British thermal units (IT)", symbol = "BTU<sub>IT</sub>", utype = "energy", scale = 1055.05585262, default = "kJ", link = "British thermal unit", }, ["Btu-IT"] = { name1 = "British thermal unit (IT)", name2 = "British thermal units (IT)", symbol = "Btu<sub>IT</sub>", utype = "energy", scale = 1055.05585262, default = "kJ", link = "British thermal unit", }, ["BTU-mean"] = { name1 = "British thermal unit (mean)", name2 = "British thermal units (mean)", symbol = "BTU<sub>mean</sub>", utype = "energy", scale = 1055.87, default = "kJ", link = "British thermal unit", }, ["Btu-mean"] = { name1 = "British thermal unit (mean)", name2 = "British thermal units (mean)", symbol = "Btu<sub>mean</sub>", utype = "energy", scale = 1055.87, default = "kJ", link = "British thermal unit", }, ["BTU-th"] = { name1 = "British thermal unit (thermochemical)", name2 = "British thermal units (thermochemical)", symbol = "BTU<sub>th</sub>", utype = "energy", scale = 1054.35026444, default = "kJ", link = "British thermal unit", }, ["Btu-th"] = { name1 = "British thermal unit (thermochemical)", name2 = "British thermal units (thermochemical)", symbol = "Btu<sub>th</sub>", utype = "energy", scale = 1054.35026444, default = "kJ", link = "British thermal unit", }, ["Cal"] = { name1 = "calorie", symbol = "Cal", utype = "energy", scale = 4184, default = "kJ", }, ["cal"] = { name1 = "calorie", symbol = "cal", utype = "energy", scale = 4.184, default = "J", }, ["Cal-15"] = { name1 = "Calorie (15°C)", name2 = "Calories (15°C)", symbol = "Cal<sub>15</sub>", utype = "energy", scale = 4185.8, default = "kJ", link = "Calorie", }, ["cal-15"] = { name1 = "calorie (15°C)", name2 = "calories (15°C)", symbol = "cal<sub>15</sub>", utype = "energy", scale = 4.1858, default = "J", link = "Calorie", }, ["Cal-IT"] = { name1 = "Calorie (International Steam Table)", name2 = "Calories (International Steam Table)", symbol = "Cal<sub>IT</sub>", utype = "energy", scale = 4186.8, default = "kJ", link = "Calorie", }, ["cal-IT"] = { name1 = "calorie (International Steam Table)", name2 = "calories (International Steam Table)", symbol = "cal<sub>IT</sub>", utype = "energy", scale = 4.1868, default = "J", link = "Calorie", }, ["Cal-th"] = { name1 = "Calorie (thermochemical)", name2 = "Calories (thermochemical)", symbol = "Cal<sub>th</sub>", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["cal-th"] = { name1 = "calorie (thermochemical)", name2 = "calories (thermochemical)", symbol = "cal<sub>th</sub>", utype = "energy", scale = 4.184, default = "J", link = "Calorie", }, ["CHU-IT"] = { name1 = "Celsius heat unit (International Table)", name2 = "Celsius heat units (International Table)", symbol = "CHU<sub>IT</sub>", utype = "energy", scale = 1899.100534716, default = "kJ", link = "Conversion of units#Energy", }, ["cufootnaturalgas"] = { name1 = "cubic foot of natural gas", name2 = "cubic foot of natural gas", symbol = "cuftnaturalgas", usename = 1, utype = "energy", scale = 1055055.85262, default = "MJ", link = "Conversion of units#Energy", }, ["cuftnaturalgas"] = { name1 = "cubic foot of natural gas", name2 = "cubic feet of natural gas", symbol = "cuftnaturalgas", usename = 1, utype = "energy", scale = 1055055.85262, default = "MJ", link = "Conversion of units#Energy", }, ["Eh"] = { name1 = "Hartree", symbol = "''E''<sub>h</sub>", utype = "energy", scale = 4.35974417e-18, default = "eV", }, ["erg"] = { symbol = "erg", utype = "energy", scale = 0.0000001, default = "μJ", }, ["eV"] = { name1 = "electronvolt", symbol = "eV", utype = "energy", scale = 1.602176487e-19, default = "aJ", }, ["feV"] = { name1 = "femtoelectronvolt", symbol = "feV", utype = "energy", scale = 1.602176487e-34, default = "yJ", link = "Electronvolt", }, ["foe"] = { symbol = "foe", utype = "energy", scale = 1e44, default = "YJ", link = "Foe (unit)", }, ["ftlb"] = { name1 = "foot-pound", symbol = "ft⋅lb", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftlb-f"] = { name1 = "foot-pound force", name2 = "foot-pounds force", symbol = "ft⋅lb<sub>f</sub>", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftlbf"] = { name1 = "foot-pound force", name2 = "foot-pounds force", symbol = "ft⋅lbf", utype = "energy", alttype = "torque", scale = 1.3558179483314004, default = "J", link = "Foot-pound (energy)", }, ["ftpdl"] = { name1 = "foot-poundal", symbol = "ft⋅pdl", utype = "energy", scale = 0.0421401100938048, default = "J", }, ["GeV"] = { name1 = "gigaelectronvolt", symbol = "GeV", utype = "energy", scale = 1.602176487e-10, default = "nJ", link = "Electronvolt", }, ["gTNT"] = { name2 = "grams of TNT", symbol = "gram of TNT", usename = 1, utype = "energy", scale = 4184, default = "kJ", link = "TNT equivalent", }, ["Gtoe"] = { name1 = "gigatonne of oil equivalent", name2 = "gigatonnes of oil equivalent", symbol = "Gtoe", utype = "energy", scale = 4.1868e19, default = "EJ", link = "Tonne of oil equivalent", }, ["GtonTNT"] = { name2 = "gigatons of TNT", symbol = "gigaton of TNT", usename = 1, utype = "energy", scale = 4.184e18, default = "EJ", link = "TNT equivalent", }, ["GtTNT"] = { name2 = "gigatonnes of TNT", symbol = "gigatonne of TNT", usename = 1, utype = "energy", scale = 4.184e18, default = "EJ", link = "TNT equivalent", }, ["GW.h"] = { name1 = "gigawatt-hour", symbol = "GW⋅h", utype = "energy", scale = 3.6e12, default = "TJ", link = "Kilowatt-hour", }, ["GWh"] = { name1 = "gigawatt-hour", symbol = "GWh", utype = "energy", scale = 3.6e12, default = "TJ", link = "Kilowatt-hour", }, ["hph"] = { name1 = "horsepower-hour", symbol = "hp⋅h", utype = "energy", scale = 2684519.537696172792, default = "kWh", link = "Horsepower", }, ["inlb"] = { name1 = "inch-pound", symbol = "in⋅lb", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inlb-f"] = { name1 = "inch-pound force", name2 = "inch-pounds force", symbol = "in⋅lb<sub>f</sub>", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inlbf"] = { name1 = "inch-pound force", name2 = "inch-pounds force", symbol = "in⋅lbf", utype = "energy", alttype = "torque", scale = 0.1129848290276167, default = "mJ", link = "Foot-pound (energy)", }, ["inoz-f"] = { name1 = "inch-ounce force", name2 = "inch-ounces force", symbol = "in⋅oz<sub>f</sub>", utype = "energy", alttype = "torque", scale = 0.00706155181422604375, default = "mJ", link = "Foot-pound (energy)", }, ["inozf"] = { name1 = "inch-ounce force", name2 = "inch-ounces force", symbol = "in⋅ozf", utype = "energy", alttype = "torque", scale = 0.00706155181422604375, default = "mJ", link = "Foot-pound (energy)", }, ["J"] = { _name1 = "joule", _symbol = "J", utype = "energy", scale = 1, prefixes = 1, default = "cal", link = "Joule", }, ["kBOE"] = { name1 = "kilo barrel of oil equivalent", name2 = "kilo barrels of oil equivalent", symbol = "kBOE", utype = "energy", scale = 6.1178632e12, default = "TJ", link = "Barrel of oil equivalent", }, ["kcal"] = { name1 = "kilocalorie", symbol = "kcal", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["kcal-15"] = { name1 = "kilocalorie (15°C)", name2 = "kilocalories (15°C)", symbol = "kcal<sub>15</sub>", utype = "energy", scale = 4185.8, default = "kJ", link = "Calorie", }, ["kcal-IT"] = { name1 = "kilocalorie (International Steam Table)", name2 = "kilocalories (International Steam Table)", symbol = "kcal<sub>IT</sub>", utype = "energy", scale = 4186.8, default = "kJ", link = "Calorie", }, ["kcal-th"] = { name1 = "kilocalorie (thermochemical)", name2 = "kilocalories (thermochemical)", symbol = "kcal<sub>th</sub>", utype = "energy", scale = 4184, default = "kJ", link = "Calorie", }, ["kerg"] = { name1 = "kiloerg", symbol = "kerg", utype = "energy", scale = 0.0001, default = "mJ", link = "Erg", }, ["keV"] = { name1 = "kiloelectronvolt", symbol = "keV", utype = "energy", scale = 1.602176487e-16, default = "fJ", link = "Electronvolt", }, ["kgTNT"] = { name2 = "kilograms of TNT", symbol = "kilogram of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["kt(TNT)"] = { name1 = "kilotonne", name1_us = "kiloton", symbol = "kt", utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["ktoe"] = { name1 = "kilotonne of oil equivalent", name2 = "kilotonnes of oil equivalent", symbol = "ktoe", utype = "energy", scale = 4.1868e13, default = "TJ", link = "Tonne of oil equivalent", }, ["ktonTNT"] = { name1 = "kiloton of TNT", name2 = "kilotons of TNT", symbol = "kt", utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["ktTNT"] = { name2 = "kilotonnes of TNT", symbol = "kilotonne of TNT", usename = 1, utype = "energy", scale = 4.184e12, default = "TJ", link = "TNT equivalent", }, ["kW.h"] = { name1 = "kilowatt-hour", symbol = "kW⋅h", utype = "energy", scale = 3600000, default = "MJ", }, ["kWh"] = { name1 = "kilowatt-hour", symbol = "kWh", utype = "energy", scale = 3600000, default = "MJ", }, ["Mcal"] = { name1 = "megacalorie", symbol = "Mcal", utype = "energy", scale = 4184000, default = "MJ", link = "Calorie", }, ["mcal"] = { name1 = "millicalorie", symbol = "mcal", utype = "energy", scale = 0.004184, default = "mJ", link = "Calorie", }, ["Mcal-15"] = { name1 = "megacalorie (15°C)", name2 = "megacalories (15°C)", symbol = "Mcal<sub>15</sub>", utype = "energy", scale = 4185800, default = "MJ", link = "Calorie", }, ["mcal-15"] = { name1 = "millicalorie (15°C)", name2 = "millicalories (15°C)", symbol = "mcal<sub>15</sub>", utype = "energy", scale = 0.0041858, default = "mJ", link = "Calorie", }, ["Mcal-IT"] = { name1 = "megacalorie (International Steam Table)", name2 = "megacalories (International Steam Table)", symbol = "Mcal<sub>IT</sub>", utype = "energy", scale = 4186800, default = "MJ", link = "Calorie", }, ["mcal-IT"] = { name1 = "millicalorie (International Steam Table)", name2 = "millicalories (International Steam Table)", symbol = "mcal<sub>IT</sub>", utype = "energy", scale = 0.0041868, default = "mJ", link = "Calorie", }, ["Mcal-th"] = { name1 = "megacalorie (thermochemical)", name2 = "megacalories (thermochemical)", symbol = "Mcal<sub>th</sub>", utype = "energy", scale = 4184000, default = "MJ", link = "Calorie", }, ["mcal-th"] = { name1 = "millicalorie (thermochemical)", name2 = "millicalories (thermochemical)", symbol = "mcal<sub>th</sub>", utype = "energy", scale = 0.004184, default = "mJ", link = "Calorie", }, ["Merg"] = { name1 = "megaerg", symbol = "Merg", utype = "energy", scale = 0.1, default = "J", link = "Erg", }, ["merg"] = { name1 = "millierg", symbol = "merg", utype = "energy", scale = 0.0000000001, default = "μJ", link = "Erg", }, ["MeV"] = { name1 = "megaelectronvolt", symbol = "MeV", utype = "energy", scale = 1.602176487e-13, default = "pJ", link = "Electronvolt", }, ["meV"] = { name1 = "millielectronvolt", symbol = "meV", utype = "energy", scale = 1.602176487e-22, default = "zJ", link = "Electronvolt", }, ["MMBtu"] = { name1 = "million British thermal units", name2 = "million British thermal units", symbol = "MMBtu", utype = "energy", scale = 1055055852.62, default = "GJ", link = "British thermal unit", }, ["Mt(TNT)"] = { name1 = "megatonne", name1_us = "megaton", symbol = "Mt", utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["Mtoe"] = { name1 = "megatonne of oil equivalent", name2 = "megatonnes of oil equivalent", symbol = "Mtoe", utype = "energy", scale = 4.1868e16, default = "PJ", link = "Tonne of oil equivalent", }, ["MtonTNT"] = { name1 = "megaton of TNT", name2 = "megatons of TNT", symbol = "Mt", utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["mtonTNT"] = { name2 = "millitons of TNT", symbol = "milliton of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["MtTNT"] = { name2 = "megatonnes of TNT", symbol = "megatonne of TNT", usename = 1, utype = "energy", scale = 4.184e15, default = "PJ", link = "TNT equivalent", }, ["mtTNT"] = { name2 = "millitonnes of TNT", symbol = "millitonne of TNT", usename = 1, utype = "energy", scale = 4184000, default = "MJ", link = "TNT equivalent", }, ["MW.h"] = { name1 = "megawatt-hour", symbol = "MW⋅h", utype = "energy", scale = 3600000000, default = "GJ", link = "Kilowatt-hour", }, ["mW.h"] = { name1 = "milliwatt-hour", symbol = "mW⋅h", utype = "energy", scale = 3.6, default = "J", link = "Kilowatt-hour", }, ["MWh"] = { name1 = "megawatt-hour", symbol = "MWh", utype = "energy", scale = 3600000000, default = "GJ", link = "Kilowatt-hour", }, ["mWh"] = { name1 = "milliwatt-hour", symbol = "mWh", utype = "energy", scale = 3.6, default = "J", link = "Kilowatt-hour", }, ["neV"] = { name1 = "nanoelectronvolt", symbol = "neV", utype = "energy", scale = 1.602176487e-28, default = "yJ", link = "Electronvolt", }, ["PeV"] = { name1 = "petaelectronvolt", symbol = "PeV", utype = "energy", scale = 0.0001602176487, default = "mJ", link = "Electronvolt", }, ["peV"] = { name1 = "picoelectronvolt", symbol = "peV", utype = "energy", scale = 1.602176487e-31, default = "yJ", link = "Electronvolt", }, ["PSh"] = { name1 = "Pferdestärkenstunde", symbol = "PSh", utype = "energy", scale = 2647795.5, default = "kWh", }, ["quad"] = { name1 = "quadrillion British thermal units", name2 = "quadrillion British thermal units", symbol = "quad", utype = "energy", scale = 1.054804e18, default = "EJ", link = "Quad (unit)", }, ["Ry"] = { name1 = "rydberg", symbol = "Ry", utype = "energy", scale = 2.1798741e-18, default = "eV", link = "Rydberg constant", }, ["scf"] = { name1 = "standard cubic foot", name2 = "standard cubic feet", symbol = "scf", utype = "energy", scale = 2869.2044809344, default = "kJ", }, ["scfoot"] = { name1 = "standard cubic foot", name2 = "standard cubic foot", symbol = "scf", utype = "energy", scale = 2869.2044809344, default = "kJ", }, ["t(TNT)"] = { name1 = "tonne", name1_us = "ton", symbol = "t", utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["TeV"] = { name1 = "teraelectronvolt", symbol = "TeV", utype = "energy", scale = 1.602176487e-7, default = "μJ", link = "Electronvolt", }, ["th"] = { name1 = "thermie", symbol = "th", utype = "energy", scale = 4186800, default = "MJ", link = "Conversion of units#Energy", }, ["thm-EC"] = { name1 = "therm (EC)", name2 = "therms (EC)", symbol = "thm (EC)", utype = "energy", scale = 105506000, default = "MJ", link = "Therm", }, ["thm-UK"] = { name1 = "therm (UK)", name2 = "therms (UK)", symbol = "thm (UK)", utype = "energy", scale = 105505585.257348, default = "MJ", link = "Therm", }, ["thm-US"] = { name1 = "therm (US)", name1_us = "therm (U.S.)", name2 = "therms (US)", name2_us = "therms (U.S.)", symbol = "thm (US)", sym_us = "thm (U.S.)", utype = "energy", scale = 105480400, default = "MJ", link = "Therm", }, ["toe"] = { name1 = "tonne of oil equivalent", name2 = "tonnes of oil equivalent", symbol = "toe", utype = "energy", scale = 41868000000, default = "GJ", }, ["tonTNT"] = { name2 = "tons of TNT", symbol = "ton of TNT", usename = 1, utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["tTNT"] = { name2 = "tonnes of TNT", symbol = "tonne of TNT", usename = 1, utype = "energy", scale = 4184000000, default = "GJ", link = "TNT equivalent", }, ["TtonTNT"] = { name2 = "teratons of TNT", symbol = "teraton of TNT", usename = 1, utype = "energy", scale = 4.184e21, default = "ZJ", link = "TNT equivalent", }, ["TtTNT"] = { name2 = "teratonnes of TNT", symbol = "teratonne of TNT", usename = 1, utype = "energy", scale = 4.184e21, default = "ZJ", link = "TNT equivalent", }, ["TW.h"] = { name1 = "terawatt-hour", symbol = "TW⋅h", utype = "energy", scale = 3.6e15, default = "PJ", link = "Kilowatt-hour", }, ["TWh"] = { name1 = "terawatt-hour", symbol = "TWh", utype = "energy", scale = 3.6e15, default = "PJ", link = "Kilowatt-hour", }, ["W.h"] = { name1 = "watt-hour", symbol = "W⋅h", utype = "energy", scale = 3600, default = "kJ", link = "Kilowatt-hour", }, ["Wh"] = { name1 = "watt-hour", symbol = "Wh", utype = "energy", scale = 3600, default = "kJ", link = "Kilowatt-hour", }, ["μerg"] = { name1 = "microerg", symbol = "μerg", utype = "energy", scale = 1e-13, default = "nJ", link = "Erg", }, ["μeV"] = { name1 = "microelectronvolt", symbol = "μeV", utype = "energy", scale = 1.602176487e-25, default = "yJ", link = "Electronvolt", }, ["μW.h"] = { name1 = "microwatt-hour", symbol = "μW⋅h", utype = "energy", scale = 0.0036, default = "mJ", link = "Kilowatt-hour", }, ["μWh"] = { name1 = "microwatt-hour", symbol = "μWh", utype = "energy", scale = 0.0036, default = "mJ", link = "Kilowatt-hour", }, ["-kW.h"] = { target = "kW.h", link = "Kilowatt hour", }, ["btu"] = { target = "BTU", }, ["Calorie"] = { target = "Cal", }, ["ft.lbf"] = { target = "ftlbf", }, ["ft·lbf"] = { target = "ftlbf", }, ["g-cal-15"] = { target = "cal-15", }, ["g-cal-IT"] = { target = "cal-IT", }, ["g-cal-th"] = { target = "cal-th", }, ["g-kcal-15"] = { target = "kcal-15", }, ["g-kcal-IT"] = { target = "kcal-IT", }, ["g-kcal-th"] = { target = "kcal-th", }, ["g-Mcal-15"] = { target = "Mcal-15", }, ["g-mcal-15"] = { target = "mcal-15", }, ["g-Mcal-IT"] = { target = "Mcal-IT", }, ["g-mcal-IT"] = { target = "mcal-IT", }, ["g-Mcal-th"] = { target = "Mcal-th", }, ["g-mcal-th"] = { target = "mcal-th", }, ["GW-h"] = { target = "GW.h", }, ["GW·h"] = { target = "GW.h", }, ["Hartree"] = { target = "Eh", }, ["hp.h"] = { target = "hph", }, ["in.lb-f"] = { target = "inlb-f", }, ["in.lbf"] = { target = "inlbf", }, ["in.oz-f"] = { target = "inoz-f", }, ["in.ozf"] = { target = "inozf", }, ["kbboe"] = { target = "kBOE", symbol = "kbboe", }, ["kg-cal-15"] = { target = "Cal-15", }, ["kg-cal-IT"] = { target = "Cal-IT", }, ["kg-cal-th"] = { target = "Cal-th", }, ["kW-h"] = { target = "kW.h", }, ["kW·h"] = { target = "kW.h", }, ["MW-h"] = { target = "MW.h", }, ["mW-h"] = { target = "mW.h", }, ["MW·h"] = { target = "MW.h", }, ["TW-h"] = { target = "TW.h", }, ["uerg"] = { target = "μerg", }, ["ueV"] = { target = "μeV", }, ["uW-h"] = { target = "μW.h", }, ["uW.h"] = { target = "μW.h", }, ["uWh"] = { target = "μWh", }, ["W-h"] = { target = "W.h", }, ["eVpar"] = { _name1 = "electronvolt", _symbol = "eV", utype = "energy per chemical amount", scale = 96485.329522144166, prefixes = 1, default = "kcal/mol", link = "Electronvolt", }, ["kcal/mol"] = { per = { "kcal", "mol" }, utype = "energy per chemical amount", default = "kJ/mol", link = "Kilocalorie per mole", }, ["kJ/mol"] = { per = { "kJ", "mol" }, utype = "energy per chemical amount", default = "kcal/mol", link = "Joule per mole", }, ["kWh/100 km"] = { name1 = "kilowatt-hour per 100 kilometres", name1_us = "kilowatt-hour per 100 kilometers", name2 = "kilowatt-hours per 100 kilometres", name2_us = "kilowatt-hours per 100 kilometers", symbol = "kW⋅h/100&nbsp;km", utype = "energy per unit length", scale = 36, default = "MJ/km kWh/mi", link = "Kilowatt-hour", }, ["kWh/100 mi"] = { name1 = "kilowatt-hour per 100 miles", name2 = "kilowatt-hours per 100 miles", symbol = "kW⋅h/100&nbsp;mi", utype = "energy per unit length", scale = 22.3694, default = "mpge", link = "Miles per gallon gasoline equivalent", }, ["MJ/100 km"] = { name1 = "megajoule per 100 kilometres", name1_us = "megajoule per 100 kilometers", name2 = "megajoules per 100 kilometres", name2_us = "megajoules per 100 kilometers", symbol = "MJ/100&nbsp;km", utype = "energy per unit length", scale = 10, default = "BTU/mi", link = "British thermal unit", }, ["mpge"] = { name1 = "mile per gallon gasoline equivalent", name2 = "miles per gallon gasoline equivalent", symbol = "mpg&#8209;e", utype = "energy per unit length", scale = 1.3263314048360777e-5, invert = -1, iscomplex= true, default = "kWh/100 mi", link = "Miles per gallon gasoline equivalent", }, ["BTU/mi"] = { per = { "BTU", "mi" }, utype = "energy per unit length", default = "v > 1525 ! M ! k ! J/km", }, ["kJ/km"] = { per = { "kJ", "km" }, utype = "energy per unit length", default = "BTU/mi", }, ["kWh/km"] = { per = { "-kW.h", "km" }, utype = "energy per unit length", default = "MJ/km kWh/mi", }, ["kWh/mi"] = { per = { "-kW.h", "mi" }, utype = "energy per unit length", default = "kWh/km MJ/km", }, ["MJ/km"] = { per = { "MJ", "km" }, utype = "energy per unit length", default = "BTU/mi", }, ["mpg-e"] = { target = "mpge", }, ["BTU/lb"] = { name1 = "British thermal unit per pound", name2 = "British thermal units per pound", symbol = "BTU/lb", utype = "energy per unit mass", scale = 2326, default = "kJ/kg", link = "British thermal unit", }, ["cal/g"] = { name1 = "calorie per gram", name2 = "calories per gram", symbol = "cal/g", utype = "energy per unit mass", scale = 4184, default = "J/g", }, ["GJ/kg"] = { name1 = "gigajoule per kilogram", name2 = "gigajoules per kilogram", symbol = "GJ/kg", utype = "energy per unit mass", scale = 1e9, default = "ktTNT/t", link = "Specific energy", }, ["J/g"] = { name1 = "joule per gram", name2 = "joules per gram", symbol = "J/g", utype = "energy per unit mass", scale = 1000, default = "kcal/g", link = "Specific energy", }, ["kcal/g"] = { name1 = "kilocalorie per gram", name2 = "kilocalories per gram", symbol = "kcal/g", utype = "energy per unit mass", scale = 4184000, default = "kJ/g", }, ["kJ/g"] = { name1 = "kilojoule per gram", name2 = "kilojoules per gram", symbol = "kJ/g", utype = "energy per unit mass", scale = 1000000, default = "kcal/g", link = "Specific energy", }, ["kJ/kg"] = { name1 = "kilojoule per kilogram", name2 = "kilojoules per kilogram", symbol = "kJ/kg", utype = "energy per unit mass", scale = 1000, default = "BTU/lb", link = "Specific energy", }, ["ktonTNT/MT"] = { name2 = "kilotons of TNT per metric ton", symbol = "kiloton of TNT per metric ton", usename = 1, utype = "energy per unit mass", scale = 4184000000, default = "GJ/kg", link = "TNT equivalent", }, ["ktTNT/t"] = { name2 = "kilotonnes of TNT per tonne", symbol = "kilotonne of TNT per tonne", usename = 1, utype = "energy per unit mass", scale = 4184000000, default = "GJ/kg", link = "TNT equivalent", }, ["MtonTNT/MT"] = { name2 = "megatons of TNT per metric ton", symbol = "megaton of TNT per metric ton", usename = 1, utype = "energy per unit mass", scale = 4.184e12, default = "TJ/kg", link = "TNT equivalent", }, ["MtTNT/MT"] = { name2 = "megatonnes of TNT per tonne", symbol = "megatonne of TNT per tonne", usename = 1, utype = "energy per unit mass", scale = 4.184e12, default = "TJ/kg", link = "TNT equivalent", }, ["TJ/kg"] = { name1 = "terajoule per kilogram", name2 = "terajoules per kilogram", symbol = "TJ/kg", utype = "energy per unit mass", scale = 1e12, default = "MtTNT/MT", link = "Specific energy", }, ["Cal/g"] = { per = { "Cal", "g" }, utype = "energy per unit mass", default = "kJ/g", }, ["BTU/cuft"] = { per = { "BTU", "cuft" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/12USoz(mL)serve"] = { per = { "Cal", "-12USoz(mL)serve" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/12USoz(ml)serve"] = { per = { "Cal", "-12USoz(ml)serve" }, utype = "energy per unit volume", default = "kJ/l", }, ["Cal/12USozserve"] = { per = { "Cal", "-12USozserve" }, utype = "energy per unit volume", default = "kJ/L", }, ["Cal/USoz"] = { per = { "Cal", "USoz" }, utype = "energy per unit volume", default = "kJ/ml", }, ["kJ/L"] = { per = { "kJ", "L" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["kJ/l"] = { per = { "kJ", "ll" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["kJ/ml"] = { per = { "kJ", "ml" }, utype = "energy per unit volume", default = "Cal/USoz", }, ["MJ/m3"] = { per = { "MJ", "m3" }, utype = "energy per unit volume", default = "BTU/cuft", }, ["Sv"] = { _name1 = "sievert", _symbol = "Sv", utype = "equivalent radiation dose", scale = 1, prefixes = 1, default = "rem", link = "Sievert", }, ["rem"] = { _name1 = "rem", _symbol = "rem", utype = "equivalent radiation dose", scale = 0.01, prefixes = 1, default = "Sv", link = "Roentgen equivalent man", }, ["g/km"] = { name1 = "gram per kilometre", name1_us = "gram per kilometer", name2 = "grams per kilometre", name2_us = "grams per kilometer", symbol = "g/km", utype = "exhaust emission", scale = 1e-6, default = "oz/mi", link = "Exhaust gas", }, ["g/mi"] = { name1 = "gram per mile", name2 = "grams per mile", symbol = "g/mi", utype = "exhaust emission", scale = 6.2137119223733397e-7, default = "g/km", link = "Exhaust gas", }, ["gCO2/km"] = { name1 = "gram of CO<sub>2</sub> per kilometre", name1_us = "gram of CO<sub>2</sub> per kilometer", name2 = "grams of CO<sub>2</sub> per kilometre", name2_us = "grams of CO<sub>2</sub> per kilometer", symbol = "g(CO<sub>2</sub>)/km", utype = "exhaust emission", scale = 1e-6, default = "ozCO2/mi", link = "Exhaust gas", }, ["gCO2/mi"] = { name1 = "gram of CO<sub>2</sub> per mile", name2 = "grams of CO<sub>2</sub> per mile", symbol = "g(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 6.2137119223733397e-7, default = "gCO2/km", link = "Exhaust gas", }, ["kg/km"] = { name1 = "kilogram per kilometre", name1_us = "kilogram per kilometer", name2 = "kilograms per kilometre", name2_us = "kilograms per kilometer", symbol = "kg/km", utype = "exhaust emission", scale = 0.001, default = "lb/mi", link = "Exhaust gas", }, ["kgCO2/km"] = { name1 = "kilogram of CO<sub>2</sub> per kilometre", name1_us = "kilogram of CO<sub>2</sub> per kilometer", name2 = "kilograms of CO<sub>2</sub> per kilometre", name2_us = "kilograms of CO<sub>2</sub> per kilometer", symbol = "kg(CO<sub>2</sub>)/km", utype = "exhaust emission", scale = 0.001, default = "lbCO2/mi", link = "Exhaust gas", }, ["lb/mi"] = { name1 = "pound per mile", name2 = "pounds per mile", symbol = "lb/mi", utype = "exhaust emission", scale = 0.00028184923173665794, default = "kg/km", link = "Exhaust gas", }, ["lbCO2/mi"] = { name1 = "pound of CO<sub>2</sub> per mile", name2 = "pounds of CO<sub>2</sub> per mile", symbol = "lb(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 0.00028184923173665794, default = "kgCO2/km", link = "Exhaust gas", }, ["oz/mi"] = { name1 = "ounce per mile", name2 = "ounces per mile", symbol = "oz/mi", utype = "exhaust emission", scale = 1.7615576983541121e-5, default = "g/km", link = "Exhaust gas", }, ["ozCO2/mi"] = { name1 = "ounce of CO<sub>2</sub> per mile", name2 = "ounces of CO<sub>2</sub> per mile", symbol = "oz(CO<sub>2</sub>)/mi", utype = "exhaust emission", scale = 1.7615576983541121e-5, default = "gCO2/km", link = "Exhaust gas", }, ["cuft/a"] = { name1 = "cubic foot per annum", name2 = "cubic feet per annum", symbol = "cu&nbsp;ft/a", utype = "flow", scale = 8.9730672142368242e-10, default = "m3/a", link = "Cubic foot per second", }, ["cuft/d"] = { name1 = "cubic foot per day", name2 = "cubic feet per day", symbol = "cu&nbsp;ft/d", utype = "flow", scale = 3.2774128000000003e-7, default = "m3/d", link = "Cubic foot per second", }, ["cuft/h"] = { name1 = "cubic foot per hour", name2 = "cubic feet per hour", symbol = "cu&nbsp;ft/h", utype = "flow", scale = 7.8657907200000004e-6, default = "m3/h", link = "Cubic foot per second", }, ["cuft/min"] = { name1 = "cubic foot per minute", name2 = "cubic feet per minute", symbol = "cu&nbsp;ft/min", utype = "flow", scale = 0.00047194744319999999, default = "m3/min", }, ["cuft/s"] = { name1 = "cubic foot per second", name2 = "cubic feet per second", symbol = "cu&nbsp;ft/s", utype = "flow", scale = 28316846592e-12, default = "m3/s", }, ["cumi/a"] = { name1 = "cubic mile per annum", name2 = "cubic miles per annum", symbol = "cu&nbsp;mi/a", utype = "flow", scale = 132.08171170940057, default = "km3/a", link = "Cubic foot per second", }, ["cuyd/h"] = { name1 = "cubic yard per hour", name2 = "cubic yards per hour", symbol = "cuyd/h", utype = "flow", scale = 0.00021237634944000001, default = "m3/h", link = "Cubic foot per second", }, ["cuyd/s"] = { name1 = "cubic yard per second", name2 = "cubic yards per second", symbol = "cu&nbsp;yd/s", utype = "flow", scale = 0.76455485798400002, default = "m3/s", }, ["Goilbbl/a"] = { name1 = "billion barrels per year", name2 = "billion barrels per year", symbol = "Gbbl/a", utype = "flow", scale = 5.0380033629933836, default = "v * 1.58987294928 < 10 ! e6 ! e9 ! m3/a", link = "Barrel per day", }, ["impgal/h"] = { name1 = "imperial gallon per hour", name2 = "imperial gallons per hour", symbol = "imp&nbsp;gal/h", utype = "flow", scale = 1.2628027777777779e-6, default = "m3/h", link = "Gallon", }, ["impgal/min"] = { name1 = "imperial gallon per minute", name2 = "imperial gallons per minute", symbol = "imp gal/min", utype = "flow", scale = 7.5768166666666671e-5, default = "m3/s", link = "Gallon", }, ["impgal/s"] = { name1 = "imperial gallon per second", name2 = "imperial gallons per second", symbol = "impgal/s", utype = "flow", scale = 0.00454609, default = "m3/s", link = "Imperial gallons per second", }, ["km3/a"] = { name1 = "cubic kilometre per annum", name1_us = "cubic kilometer per annum", name2 = "cubic kilometres per annum", name2_us = "cubic kilometers per annum", symbol = "km<sup>3</sup>/a", utype = "flow", scale = 31.68808781402895, default = "cumi/a", link = "Cubic metre per second", }, ["km3/d"] = { name1 = "cubic kilometre per day", name1_us = "cubic kilometer per day", name2 = "cubic kilometres per day", name2_us = "cubic kilometers per day", symbol = "km<sup>3</sup>/d", utype = "flow", scale = 11574.074074074075, default = "cuft/d", link = "Cubic metre per second", }, ["koilbbl/a"] = { name1 = "thousand barrels per year", name2 = "thousand barrels per year", symbol = "kbbl/a", utype = "flow", scale = 5.0380033629933841e-6, default = "v * 1.58987294928 < 10 ! ! e3 ! m3/a", link = "Barrel per day", }, ["koilbbl/d"] = { name1 = "thousand barrels per day", name2 = "thousand barrels per day", symbol = "kbbl/d", utype = "flow", scale = 0.0018401307283333335, default = "v * 1.58987294928 < 10 ! ! e3 ! m3/d", link = "Barrel per day", }, ["L/h"] = { name1 = "litre per hour", name1_us = "liter per hour", name2 = "litres per hour", name2_us = "liters per hour", symbol = "L/h", utype = "flow", scale = 2.7777777777777776e-7, default = "impgal/h USgal/h", link = "Cubic metre per second", }, ["L/min"] = { name1 = "litre per minute", name1_us = "liter per minute", name2 = "litres per minute", name2_us = "liters per minute", symbol = "L/min", utype = "flow", scale = 1.6666666666666667e-5, default = "impgal/min USgal/min", link = "Cubic metre per second", }, ["L/s"] = { name1 = "litre per second", name1_us = "liter per second", name2 = "litres per second", name2_us = "liters per second", symbol = "L/s", utype = "flow", scale = 0.001, default = "cuft/s", link = "Cubic metre per second", }, ["m3/a"] = { name1 = "cubic metre per annum", name1_us = "cubic meter per annum", name2 = "cubic metres per annum", name2_us = "cubic meters per annum", symbol = "m<sup>3</sup>/a", utype = "flow", scale = 3.1688087814028947e-8, default = "cuft/a", link = "Cubic metre per second", }, ["m3/d"] = { name1 = "cubic metre per day", name1_us = "cubic meter per day", name2 = "cubic metres per day", name2_us = "cubic meters per day", symbol = "m<sup>3</sup>/d", utype = "flow", scale = 1.1574074074074073e-5, default = "cuft/d", link = "Cubic metre per second", }, ["m3/h"] = { name1 = "cubic metre per hour", name1_us = "cubic meter per hour", name2 = "cubic metres per hour", name2_us = "cubic meters per hour", symbol = "m<sup>3</sup>/h", utype = "flow", scale = 0.00027777777777777778, default = "cuft/h", link = "Cubic metre per second", }, ["m3/min"] = { name1 = "cubic metre per minute", name1_us = "cubic meter per minute", name2 = "cubic metres per minute", name2_us = "cubic meters per minute", symbol = "m<sup>3</sup>/min", utype = "flow", scale = 0.016666666666666666, default = "cuft/min", link = "Cubic metre per second", }, ["m3/s"] = { name1 = "cubic metre per second", name1_us = "cubic meter per second", name2 = "cubic metres per second", name2_us = "cubic meters per second", symbol = "m<sup>3</sup>/s", utype = "flow", scale = 1, default = "cuft/s", }, ["Moilbbl/a"] = { name1 = "million barrels per year", name2 = "million barrels per year", symbol = "Mbbl/a", utype = "flow", scale = 0.0050380033629933837, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3/a", link = "Barrel per day", }, ["Moilbbl/d"] = { name1 = "million barrels per day", name2 = "million barrels per day", symbol = "Mbbl/d", utype = "flow", scale = 1.8401307283333335, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3/d", link = "Barrel per day", }, ["oilbbl/a"] = { name1 = "barrel per year", name2 = "barrels per year", symbol = "bbl/a", utype = "flow", scale = 5.0380033629933841e-9, default = "m3/a", link = "Barrel per day", }, ["oilbbl/d"] = { name1 = "barrel per day", name2 = "barrels per day", symbol = "bbl/d", utype = "flow", scale = 1.8401307283333336e-6, default = "m3/d", }, ["Toilbbl/a"] = { name1 = "trillion barrels per year", name2 = "trillion barrels per year", symbol = "Tbbl/a", utype = "flow", scale = 5038.0033629933832, default = "v * 1.58987294928 < 10 ! e9 ! e12 ! m3/a", link = "Barrel per day", }, ["U.S.gal/d"] = { name1 = "U.S. gallon per day", name2 = "U.S. gallons per day", symbol = "U.S.&nbsp;gal/d", utype = "flow", scale = 4.3812636388888893e-8, default = "m3/s", customary= 1, }, ["U.S.gal/h"] = { name1 = "gallon per hour", name2 = "gallons per hour", symbol = "gal/h", utype = "flow", scale = 1.0515032733333334e-6, default = "m3/h", link = "Gallon", customary= 2, }, ["U.S.gal/min"] = { name1 = "U.S. gallon per minute", name2 = "U.S. gallons per minute", symbol = "U.S.&nbsp;gal/min", utype = "flow", scale = 6.3090196400000003e-5, default = "m3/s", link = "Gallon", }, ["USgal/a"] = { name1 = "US gallon per year", name2 = "US gallons per year", symbol = "US&nbsp;gal/a", utype = "flow", scale = 1.1995246102365199e-10, default = "m3/s", }, ["USgal/d"] = { name1 = "US gallon per day", name2 = "US gallons per day", symbol = "US&nbsp;gal/d", utype = "flow", scale = 4.3812636388888893e-8, default = "m3/s", }, ["USgal/h"] = { name1 = "gallon per hour", name2 = "gallons per hour", symbol = "gal/h", utype = "flow", scale = 1.0515032733333334e-6, default = "m3/h", link = "Gallon", customary= 1, }, ["USgal/min"] = { name1 = "US gallon per minute", name2 = "US gallons per minute", symbol = "US&nbsp;gal/min", utype = "flow", scale = 6.3090196400000003e-5, default = "m3/s", link = "Gallon", }, ["USgal/s"] = { name1 = "US gallon per second", name1_us = "U.S. gallon per second", name2 = "US gallons per second", name2_us = "U.S. gallons per second", symbol = "USgal/s", utype = "flow", scale = 0.003785411784, default = "m3/s", link = "US gallons per second", }, ["ft3/a"] = { target = "cuft/a", }, ["ft3/d"] = { target = "cuft/d", }, ["ft3/h"] = { target = "cuft/h", }, ["ft3/s"] = { target = "cuft/s", }, ["Gcuft/a"] = { target = "e9cuft/a", }, ["Gcuft/d"] = { target = "e9cuft/d", }, ["kcuft/a"] = { target = "e3cuft/a", }, ["kcuft/d"] = { target = "e3cuft/d", }, ["kcuft/s"] = { target = "e3cuft/s", }, ["Mcuft/a"] = { target = "e6cuft/a", }, ["Mcuft/d"] = { target = "e6cuft/d", }, ["Mcuft/s"] = { target = "e6cuft/s", }, ["m³/s"] = { target = "m3/s", }, ["Tcuft/a"] = { target = "e12cuft/a", }, ["Tcuft/d"] = { target = "e12cuft/d", }, ["u.s.gal/min"] = { target = "U.S.gal/min", }, ["usgal/min"] = { target = "USgal/min", }, ["-LTf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LTf", utype = "force", scale = 9964.01641818352, default = "kN", }, ["-STf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "STf", utype = "force", scale = 8896.443230521, default = "kN", }, ["dyn"] = { name1 = "dyne", symbol = "dyn", utype = "force", scale = 0.00001, default = "gr-f", }, ["g-f"] = { name1 = "gram-force", name2 = "grams-force", symbol = "g<sub>f</sub>", utype = "force", scale = 0.00980665, default = "mN oz-f", link = "Kilogram-force", }, ["gf"] = { name1 = "gram-force", name2 = "grams-force", symbol = "gf", utype = "force", scale = 0.00980665, default = "mN ozf", link = "Kilogram-force", }, ["gr-f"] = { name1 = "grain-force", name2 = "grains-force", symbol = "gr<sub>f</sub>", utype = "force", scale = 0.0006354602307515, default = "μN", link = "Pound (force)", }, ["grf"] = { name1 = "grain-force", name2 = "grains-force", symbol = "grf", utype = "force", scale = 0.0006354602307515, default = "μN", link = "Pound (force)", }, ["kdyn"] = { name1 = "kilodyne", symbol = "kdyn", utype = "force", scale = 0.01, default = "oz-f", link = "Dyne", }, ["kg-f"] = { name1 = "kilogram-force", name2 = "kilograms-force", symbol = "kg<sub>f</sub>", utype = "force", scale = 9.80665, default = "N lb-f", }, ["kgf"] = { name1 = "kilogram-force", name2 = "kilograms-force", symbol = "kgf", utype = "force", scale = 9.80665, default = "N lbf", }, ["kp"] = { name1 = "kilopond", symbol = "kp", utype = "force", scale = 9.80665, default = "N lb-f", link = "Kilogram-force", }, ["L/T-f"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "L/T<sub>f</sub>", utype = "force", scale = 9964.01641818352, default = "kN", }, ["L/Tf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "L/Tf", utype = "force", scale = 9964.01641818352, default = "kN", }, ["lb-f"] = { name1 = "pound-force", name2 = "pounds-force", symbol = "lb<sub>f</sub>", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["lbf"] = { name1 = "pound-force", name2 = "pounds-force", symbol = "lbf", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["lb(f)"] = { name1 = "pound", symbol = "lb", utype = "force", scale = 4.4482216152605, default = "N", link = "Pound (force)", }, ["LT-f"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LT<sub>f</sub>", utype = "force", scale = 9964.01641818352, default = "kN", }, ["LTf"] = { name1 = "long ton-force", name2 = "long tons-force", symbol = "LTf", usename = 1, utype = "force", scale = 9964.01641818352, default = "kN", }, ["Mdyn"] = { name1 = "megadyne", symbol = "Mdyn", utype = "force", scale = 10, default = "lb-f", link = "Dyne", }, ["mdyn"] = { name1 = "millidyne", symbol = "mdyn", utype = "force", scale = 0.00000001, default = "gr-f", link = "Dyne", }, ["mg-f"] = { name1 = "milligram-force", name2 = "milligrams-force", symbol = "mg<sub>f</sub>", utype = "force", scale = 0.00000980665, default = "μN gr-f", link = "Kilogram-force", }, ["mgf"] = { name1 = "milligram-force", name2 = "milligrams-force", symbol = "mgf", utype = "force", scale = 0.00000980665, default = "μN grf", link = "Kilogram-force", }, ["Mp"] = { name1 = "megapond", symbol = "Mp", utype = "force", scale = 9806.65, default = "kN LT-f ST-f", link = "Kilogram-force", }, ["mp"] = { name1 = "millipond", symbol = "mp", utype = "force", scale = 0.00000980665, default = "μN gr-f", link = "Kilogram-force", }, ["N"] = { _name1 = "newton", _symbol = "N", utype = "force", scale = 1, prefixes = 1, default = "lb-f", link = "Newton (unit)", }, ["oz-f"] = { name1 = "ounce-force", name2 = "ounces-force", symbol = "oz<sub>f</sub>", utype = "force", scale = 0.2780138203095378125, default = "mN", link = "Pound (force)", }, ["ozf"] = { name1 = "ounce-force", name2 = "ounces-force", symbol = "ozf", utype = "force", scale = 0.2780138203095378125, default = "mN", link = "Pound (force)", }, ["p"] = { name1 = "pond", symbol = "p", utype = "force", scale = 0.00980665, default = "mN oz-f", link = "Kilogram-force", }, ["pdl"] = { name1 = "poundal", symbol = "pdl", utype = "force", scale = 0.138254954376, default = "N", }, ["S/T-f"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "S/T<sub>f</sub>", utype = "force", scale = 8896.443230521, default = "kN", }, ["S/Tf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "S/Tf", utype = "force", scale = 8896.443230521, default = "kN", }, ["ST-f"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "ST<sub>f</sub>", utype = "force", scale = 8896.443230521, default = "kN", }, ["STf"] = { name1 = "short ton-force", name2 = "short tons-force", symbol = "STf", usename = 1, utype = "force", scale = 8896.443230521, default = "kN", }, ["t-f"] = { name1 = "tonne-force", name2 = "tonnes-force", symbol = "t<sub>f</sub>", utype = "force", scale = 9806.65, default = "kN LT-f ST-f", link = "Ton-force#Tonne-force", }, ["tf"] = { name1 = "tonne-force", name2 = "tonnes-force", symbol = "tf", utype = "force", scale = 9806.65, default = "kN LTf STf", link = "Ton-force#Tonne-force", }, ["dyne"] = { target = "dyn", }, ["newtons"] = { target = "N", }, ["poundal"] = { target = "pdl", }, ["tonne-force"] = { target = "tf", }, ["impgal/mi"] = { per = { "@impgal", "mi" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km USgal/mi", }, ["km/L"] = { per = { "km", "L" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "mpgimp mpgus", }, ["km/l"] = { per = { "km", "ll" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "mpgimp mpgus", }, ["L/100 km"] = { per = { "L", "100km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|L/100&nbsp;km]]", }, ["l/100 km"] = { per = { "ll", "100km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|l/100&nbsp;km]]", }, ["L/km"] = { per = { "L", "km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", }, ["l/km"] = { per = { "ll", "km" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "mpgimp mpgus", }, ["mi/impqt"] = { per = { "mi", "impqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/U.S.qt"] = { per = { "mi", "U.S.qt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/USqt"] = { per = { "mi", "USqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mi/usqt"] = { per = { "mi", "usqt" }, utype = "fuel efficiency", invert = -1, iscomplex= true, default = "km/L", }, ["mpgimp"] = { per = { "mi", "@impgal" }, symbol = "mpg<sub>&#8209;imp</sub>", utype = "fuel efficiency", invert = -1, iscomplex= true, default = "L/100 km+mpgus", symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[Imperial units|imp]]</sub>", }, ["mpgus"] = { per = { "mi", "+USgal" }, symbol = "mpg<sub>&#8209;US</sub>", utype = "fuel efficiency", invert = -1, iscomplex= true, default = "L/100 km+mpgimp", symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|US]]</sub>", }, ["U.S.gal/mi"] = { per = { "*U.S.gal", "mi" }, sp_us = true, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km impgal/mi", }, ["usgal/mi"] = { per = { "+USgal", "mi" }, utype = "fuel efficiency", invert = 1, iscomplex= true, default = "L/km impgal/mi", }, ["L/100km"] = { target = "L/100 km", }, ["l/100km"] = { target = "l/100 km", }, ["mpg"] = { shouldbe = "Use %{mpgus%} for miles per US gallon or %{mpgimp%} for miles per imperial gallon (not %{mpg%})", }, ["mpgU.S."] = { target = "mpgus", symbol = "mpg<sub>&#8209;U.S.</sub>", sp_us = true, symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|U.S.]]</sub>", }, ["mpgu.s."] = { target = "mpgus", symbol = "mpg<sub>&#8209;U.S.</sub>", sp_us = true, symlink = "[[Fuel economy in automobiles#Units of measure|mpg]]<sub>&#8209;[[United States customary units|U.S.]]</sub>", }, ["mpgUS"] = { target = "mpgus", }, ["USgal/mi"] = { target = "usgal/mi", }, ["kPa/m"] = { per = { "kPa", "-m-frac" }, utype = "fracture gradient", default = "psi/ft", }, ["psi/ft"] = { per = { "psi", "-ft-frac" }, utype = "fracture gradient", default = "kPa/m", }, ["cm/km"] = { name1 = "centimetre per kilometre", name1_us = "centimeter per kilometer", name2 = "centimetres per kilometre", name2_us = "centimeters per kilometer", symbol = "cm/km", utype = "gradient", scale = 0.00001, default = "ft/mi", link = "Grade (slope)", }, ["ft/mi"] = { name1 = "foot per mile", name2 = "feet per mile", symbol = "ft/mi", utype = "gradient", scale = 0.00018939393939393939, default = "v < 5.28 ! c ! ! m/km", link = "Grade (slope)", }, ["ft/nmi"] = { name1 = "foot per nautical mile", name2 = "feet per nautical mile", symbol = "ft/nmi", utype = "gradient", scale = 0.00016457883369330455, default = "v < 6.076 ! c ! ! m/km", link = "Grade (slope)", }, ["in/ft"] = { name1 = "inch per foot", name2 = "inches per foot", symbol = "in/ft", utype = "gradient", scale = 0.083333333333333329, default = "mm/m", link = "Grade (slope)", }, ["in/mi"] = { name1 = "inch per mile", name2 = "inches per mile", symbol = "in/mi", utype = "gradient", scale = 1.5782828282828283e-5, default = "v < 0.6336 ! m ! c ! m/km", link = "Grade (slope)", }, ["m/km"] = { name1 = "metre per kilometre", name1_us = "meter per kilometer", name2 = "metres per kilometre", name2_us = "meters per kilometer", symbol = "m/km", utype = "gradient", scale = 0.001, default = "ft/mi", link = "Grade (slope)", }, ["mm/km"] = { name1 = "millimetre per kilometre", name1_us = "millimeter per kilometer", name2 = "millimetres per kilometre", name2_us = "millimeters per kilometer", symbol = "mm/km", utype = "gradient", scale = 0.000001, default = "in/mi", link = "Grade (slope)", }, ["mm/m"] = { name1 = "millimetre per metre", name1_us = "millimeter per meter", name2 = "millimetres per metre", name2_us = "millimeters per meter", symbol = "mm/m", utype = "gradient", scale = 0.001, default = "in/ft", link = "Grade (slope)", }, ["admi"] = { name1 = "admiralty mile", symbol = "nmi&nbsp;(admiralty)", utype = "length", scale = 1853.184, default = "km mi", link = "Nautical mile", }, ["AU"] = { name1 = "astronomical unit", symbol = "AU", utype = "length", scale = 149597870700, default = "km mi", }, ["Brnmi"] = { name1 = "British nautical mile", symbol = "(Brit)&nbsp;nmi", utype = "length", scale = 1853.184, default = "km mi", link = "Nautical mile", }, ["bu"] = { name2 = "bu", symbol = "bu", usename = 1, utype = "length", scale = 0.0030303030303030303, default = "mm", link = "Japanese units of measurement#Length", }, ["ch"] = { name1 = "chain", symbol = "ch", utype = "length", scale = 20.1168, default = "ft m", subdivs = { ["ft"] = { 66, default = "m" }, ["yd"] = { 22, default = "m" } }, link = "Chain (unit)", }, ["chlk"] = { name1 = "[[Chain (unit)|chain]]", symbol = "[[Chain (unit)|ch]]", utype = "length", scale = 20.1168, default = "ft m", link = "", }, ["chain"] = { symbol = "chain", usename = 1, utype = "length", scale = 20.1168, default = "ft m", subdivs = { ["ft"] = { 66, default = "m" }, ["yd"] = { 22, default = "m" } }, link = "Chain (unit)", }, ["chainlk"] = { symbol = "[[Chain (unit)|chain]]", usename = 1, utype = "length", scale = 20.1168, default = "ft m", link = "", }, ["dpcm"] = { name2 = "dot/cm", symbol = "dot/cm", utype = "length", scale = 100, invert = -1, iscomplex= true, default = "dpi", link = "Dots per inch", }, ["dpi"] = { name2 = "DPI", symbol = "DPI", utype = "length", scale = 39.370078740157481, invert = -1, iscomplex= true, default = "pitch", link = "Dots per inch", }, ["fathom"] = { symbol = "fathom", usename = 1, utype = "length", scale = 1.8288, default = "ft m", }, ["foot"] = { name1 = "foot", name2 = "foot", symbol = "ft", utype = "length", scale = 0.3048, default = "m", subdivs = { ["in"] = { 12, default = "m" } }, link = "Foot (unit)", }, ["ft"] = { name1 = "foot", name2 = "feet", symbol = "ft", utype = "length", scale = 0.3048, exception= "integer_more_precision", default = "m", subdivs = { ["in"] = { 12, default = "m" } }, link = "Foot (unit)", }, ["furlong"] = { symbol = "furlong", usename = 1, utype = "length", scale = 201.168, default = "ft m", }, ["Gly"] = { name1 = "gigalight-year", symbol = "Gly", utype = "length", scale = 9.4607304725808e24, default = "Mpc", link = "Light-year#Definitions", }, ["Gpc"] = { name1 = "gigaparsec", symbol = "Gpc", utype = "length", scale = 3.0856775814671916e25, default = "Gly", link = "Parsec#Megaparsecs and gigaparsecs", }, ["hand"] = { name1 = "hand", symbol = "h", utype = "length", builtin = "hand", scale = 0.1016, iscomplex= true, default = "in cm", link = "Hand (unit)", }, ["in"] = { name1 = "inch", name2 = "inches", symbol = "in", utype = "length", scale = 0.0254, exception= "subunit_more_precision", default = "mm", }, ["inabbreviated"] = { name2 = "in", symbol = "in", utype = "length", scale = 0.0254, default = "mm", link = "Inch", }, ["kly"] = { name1 = "kilolight-year", symbol = "kly", utype = "length", scale = 9.4607304725808e18, default = "pc", link = "Light-year#Definitions", }, ["kpc"] = { name1 = "kiloparsec", symbol = "kpc", utype = "length", scale = 3.0856775814671916e19, default = "kly", link = "Parsec#Parsecs and kiloparsecs", }, ["LD"] = { name1 = "lunar distance", symbol = "LD", utype = "length", scale = 384403000, default = "km mi", link = "Lunar distance (astronomy)", }, ["league"] = { symbol = "league", usename = 1, utype = "length", scale = 4828.032, default = "km", link = "League (unit)", }, ["ly"] = { name1 = "light-year", symbol = "ly", utype = "length", scale = 9.4607304725808e15, default = "AU", }, ["m"] = { _name1 = "metre", _name1_us= "meter", _symbol = "m", utype = "length", scale = 1, prefixes = 1, default = "v > 0 and v < 3 ! ftin ! ft", link = "Metre", }, ["mi"] = { name1 = "mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", subdivs = { ["ch"] = { 80, default = "km" }, ["chlk"] = { 80, default = "km" }, ["chain"] = { 80, default = "km" }, ["chainlk"] = { 80, default = "km" }, ["ft"] = { 5280, default = "km" }, ["furlong"] = { 8, default = "km" }, ["yd"] = { 1760, default = "km" } }, }, ["mil"] = { symbol = "mil", usename = 1, utype = "length", scale = 0.0000254, default = "mm", link = "Thousandth of an inch", }, ["Mly"] = { name1 = "megalight-year", symbol = "Mly", utype = "length", scale = 9.4607304725808e21, default = "kpc", link = "Light-year#Definitions", }, ["Mpc"] = { name1 = "megaparsec", symbol = "Mpc", utype = "length", scale = 3.0856775814671916e22, default = "Mly", link = "Parsec#Megaparsecs and gigaparsecs", }, ["NM"] = { name1 = "nautical mile", symbol = "NM", utype = "length", scale = 1852, default = "km mi", }, ["nmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1852, default = "km mi", }, ["oldUKnmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1853.184, default = "km mi", }, ["oldUSnmi"] = { name1 = "nautical mile", symbol = "nmi", utype = "length", scale = 1853.24496, default = "km mi", }, ["pc"] = { name1 = "parsec", symbol = "pc", utype = "length", scale = 3.0856775814671916e16, default = "ly", }, ["perch"] = { name2 = "perches", symbol = "perch", usename = 1, utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["pitch"] = { name2 = "μm", symbol = "μm", utype = "length", scale = 1e-6, default = "dpi", defkey = "pitch", linkey = "pitch", link = "Dots per inch", }, ["pole"] = { symbol = "pole", usename = 1, utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["pre1954U.S.nmi"] = { name1 = "(pre-1954&nbsp;U.S.) nautical mile", symbol = "(pre&#8209;1954&nbsp;U.S.) nmi", utype = "length", scale = 1853.24496, default = "km mi", link = "Nautical mile", }, ["pre1954USnmi"] = { name1 = "(pre-1954&nbsp;US) nautical mile", name1_us = "(pre-1954&nbsp;U.S.) nautical mile", symbol = "(pre&#8209;1954&nbsp;US) nmi", sym_us = "(pre&#8209;1954&nbsp;U.S.) nmi", utype = "length", scale = 1853.24496, default = "km mi", link = "Nautical mile", }, ["rd"] = { name1 = "rod", symbol = "rd", utype = "length", scale = 5.0292, default = "ft m", link = "Rod (unit)", }, ["royal cubit"] = { name1 = "royal cubit", symbol = "cu", utype = "length", scale = 0.524, default = "mm", }, ["rtkm"] = { name1 = "route kilometre", name1_us = "route kilometer", symbol = "km", utype = "length", scale = 1000, default = "mi", link = "Kilometre", }, ["rtmi"] = { name1 = "route mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", link = "Mile", }, ["shaku"] = { name2 = "shaku", symbol = "shaku", usename = 1, utype = "length", scale = 0.30303030303030304, default = "m", link = "Shaku (unit)", }, ["sm"] = { name1 = "smoot", symbol = "sm", utype = "length", scale = 1.70180, default = "m", link = "Smoot (unit)", }, ["smi"] = { name1 = "statute mile", symbol = "mi", utype = "length", scale = 1609.344, default = "km", subdivs = { ["chain"] = { 80, default = "km" } }, }, ["solar radius"] = { name1 = "solar radius", name2 = "solar radii", symbol = "''R''<sub>☉</sub>", utype = "length", scale = 695700e3, default = "km", }, ["sun"] = { name2 = "sun", symbol = "sun", usename = 1, utype = "length", scale = 0.030303030303030304, default = "mm", link = "Japanese units of measurement#Length", }, ["thou"] = { name2 = "thou", symbol = "thou", usename = 1, utype = "length", scale = 0.0000254, default = "mm", link = "Thousandth of an inch", }, ["verst"] = { symbol = "verst", usename = 1, utype = "length", scale = 1066.8, default = "km mi", }, ["yd"] = { name1 = "yard", symbol = "yd", utype = "length", scale = 0.9144, default = "m", subdivs = { ["ft"] = { 3, default = "m" } }, }, ["μin"] = { name1 = "microinch", name2 = "microinches", symbol = "μin", utype = "length", scale = 0.0000000254, default = "nm", link = "SI prefix#Non-metric units", }, ["Å"] = { name1 = "ångström", symbol = "Å", utype = "length", scale = 0.0000000001, default = "in", }, ["Hz"] = { _name1 = "hertz", _name2 = "hertz", _symbol = "Hz", utype = "length", scale = 3.3356409519815204e-9, invert = -1, iscomplex= true, prefixes = 1, default = "m", link = "Hertz", }, ["rpm"] = { name1 = "revolution per minute", name2 = "revolutions per minute", symbol = "rpm", utype = "length", scale = 5.5594015866358675e-11, invert = -1, iscomplex= true, default = "Hz", link = "Revolutions per minute", }, ["-ft-frac"] = { target = "ft", link = "Fracture gradient", }, ["-in-stiff"] = { target = "in", link = "Stiffness", }, ["-m-frac"] = { target = "m", link = "Fracture gradient", }, ["-m-stiff"] = { target = "m", link = "Stiffness", }, ["100km"] = { target = "km", multiplier= 100, }, ["100mi"] = { target = "mi", multiplier= 100, }, ["100miles"] = { target = "mi", symbol = "miles", multiplier= 100, }, ["admiralty nmi"] = { target = "oldUKnmi", }, ["angstrom"] = { target = "Å", }, ["au"] = { target = "AU", symbol = "au", }, ["feet"] = { target = "ft", }, ["hands"] = { target = "hand", }, ["inch"] = { target = "in", }, ["inches"] = { target = "in", }, ["light-year"] = { target = "ly", }, ["meter"] = { target = "m", sp_us = true, }, ["meters"] = { target = "m", sp_us = true, }, ["metre"] = { target = "m", }, ["metres"] = { target = "m", }, ["micrometre"] = { target = "μm", }, ["micron"] = { target = "μm", default = "μin", }, ["mile"] = { target = "mi", }, ["miles"] = { target = "mi", }, ["parsec"] = { target = "pc", }, ["rod"] = { target = "rd", }, ["smoot"] = { target = "sm", }, ["uin"] = { target = "μin", }, ["yard"] = { target = "yd", }, ["yards"] = { target = "yd", }, ["yds"] = { target = "yd", }, ["dtex"] = { name1 = "decitex", name2 = "decitex", symbol = "dtex", utype = "linear density", scale = 1e-7, default = "lb/yd", link = "Units of textile measurement#Units", }, ["kg/cm"] = { name1 = "kilogram per centimetre", name1_us = "kilogram per centimeter", name2 = "kilograms per centimetre", name2_us = "kilograms per centimeter", symbol = "kg/cm", utype = "linear density", scale = 100, default = "lb/yd", link = "Linear density", }, ["kg/m"] = { name1 = "kilogram per metre", name1_us = "kilogram per meter", name2 = "kilograms per metre", name2_us = "kilograms per meter", symbol = "kg/m", utype = "linear density", scale = 1, default = "lb/yd", link = "Linear density", }, ["lb/ft"] = { name1 = "pound per foot", name2 = "pounds per foot", symbol = "lb/ft", utype = "linear density", scale = 1.4881639435695539, default = "kg/m", link = "Linear density", }, ["lb/yd"] = { name1 = "pound per yard", name2 = "pounds per yard", symbol = "lb/yd", utype = "linear density", scale = 0.49605464785651798, default = "kg/m", link = "Linear density", }, ["G"] = { _name1 = "gauss", _name2 = "gauss", _symbol = "G", utype = "magnetic field strength", scale = 0.0001, prefixes = 1, default = "T", link = "Gauss (unit)", }, ["T"] = { _name1 = "tesla", _symbol = "T", utype = "magnetic field strength", scale = 1, prefixes = 1, default = "G", link = "Tesla (unit)", }, ["A/m"] = { name1 = "ampere per metre", name1_us = "ampere per meter", name2 = "amperes per metre", name2_us = "amperes per meter", symbol = "A/m", utype = "magnetizing field", scale = 1, default = "Oe", }, ["kA/m"] = { name1 = "kiloampere per metre", name1_us = "kiloampere per meter", name2 = "kiloamperes per metre", name2_us = "kiloamperes per meter", symbol = "kA/m", utype = "magnetizing field", scale = 1000, default = "kOe", link = "Ampere per metre", }, ["MA/m"] = { name1 = "megaampere per metre", name1_us = "megaampere per meter", name2 = "megaamperes per metre", name2_us = "megaamperes per meter", symbol = "MA/m", utype = "magnetizing field", scale = 1e6, default = "kOe", link = "Ampere per metre", }, ["Oe"] = { _name1 = "oersted", _symbol = "Oe", utype = "magnetizing field", scale = 79.5774715, prefixes = 1, default = "kA/m", link = "Oersted", }, ["-Lcwt"] = { name1 = "hundredweight", name2 = "hundredweight", symbol = "cwt", utype = "mass", scale = 50.80234544, default = "lb", }, ["-Scwt"] = { name1 = "hundredweight", name2 = "hundredweight", symbol = "cwt", utype = "mass", scale = 45.359237, default = "lb", }, ["-ST"] = { name1 = "short ton", symbol = "ST", utype = "mass", scale = 907.18474, default = "t", }, ["carat"] = { symbol = "carat", usename = 1, utype = "mass", scale = 0.0002, default = "g", link = "Carat (mass)", }, ["drachm"] = { name1_us = "dram", symbol = "drachm", usename = 1, utype = "mass", scale = 0.001771845195, default = "g", link = "Dram (unit)", }, ["dram"] = { target = "drachm", }, ["dwt"] = { name1 = "pennyweight", symbol = "dwt", utype = "mass", scale = 0.00155517384, default = "oz g", }, ["DWton"] = { symbol = "deadweight ton", usename = 1, utype = "mass", scale = 1016.0469088, default = "DWtonne", link = "Deadweight tonnage", }, ["DWtonne"] = { name1_us = "deadweight metric ton", symbol = "deadweight tonne", sym_us = "~deadweight metric ton", usename = 1, utype = "mass", scale = 1000, default = "DWton", link = "Deadweight tonnage", }, ["g"] = { _name1 = "gram", _symbol = "g", utype = "mass", scale = 0.001, prefixes = 1, default = "oz", link = "Gram", }, ["gr"] = { name1 = "grain", symbol = "gr", utype = "mass", scale = 0.00006479891, default = "g", link = "Grain (unit)", }, ["Gt"] = { name1 = "gigatonne", symbol = "Gt", utype = "mass", scale = 1000000000000, default = "LT ST", link = "Tonne", }, ["impgalh2o"] = { name1 = "imperial gallon of water", name2 = "imperial gallons of water", symbol = "imp&nbsp;gal H<sub>2</sub>O", utype = "mass", scale = 4.5359236999999499, default = "lb kg", link = "Imperial gallon", }, ["kt"] = { name1 = "kilotonne", symbol = "kt", utype = "mass", scale = 1000000, default = "LT ST", link = "Tonne", }, ["lb"] = { name1 = "pound", symbol = "lb", utype = "mass", scale = 0.45359237, exception= "integer_more_precision", default = "kg", subdivs = { ["oz"] = { 16, default = "kg" } }, link = "Pound (mass)", }, ["Lcwt"] = { name1 = "long hundredweight", name2 = "long hundredweight", symbol = "Lcwt", usename = 1, utype = "mass", scale = 50.80234544, default = "lb", subdivs = { ["qtr"] = { 4, default = "kg" }, ["st"] = { 8, default = "kg" } }, link = "Hundredweight", }, ["long cwt"] = { name1 = "long hundredweight", name2 = "long hundredweight", symbol = "long&nbsp;cwt", utype = "mass", scale = 50.80234544, default = "lb kg", subdivs = { ["qtr"] = { 4, default = "kg" } }, link = "Hundredweight", }, ["long qtr"] = { name1 = "long quarter", symbol = "long&nbsp;qtr", utype = "mass", scale = 12.70058636, default = "lb kg", }, ["LT"] = { symbol = "long ton", usename = 1, utype = "mass", scale = 1016.0469088, default = "t", subdivs = { ["Lcwt"] = { 20, default = "t", unit = "-Lcwt" } }, }, ["lt"] = { name1 = "long ton", symbol = "LT", utype = "mass", scale = 1016.0469088, default = "t", subdivs = { ["Lcwt"] = { 20, default = "t", unit = "-Lcwt" } }, }, ["metric ton"] = { symbol = "metric ton", usename = 1, utype = "mass", scale = 1000, default = "long ton", link = "Tonne", }, ["MT"] = { name1 = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "LT ST", link = "Tonne", }, ["Mt"] = { name1 = "megatonne", symbol = "Mt", utype = "mass", scale = 1000000000, default = "LT ST", link = "Tonne", }, ["oz"] = { name1 = "ounce", symbol = "oz", utype = "mass", scale = 0.028349523125, default = "g", }, ["ozt"] = { name1 = "troy ounce", symbol = "ozt", utype = "mass", scale = 0.0311034768, default = "oz g", }, ["pdr"] = { name1 = "pounder", symbol = "pdr", utype = "mass", scale = 0.45359237, default = "kg", link = "Pound (mass)", }, ["qtr"] = { name1 = "quarter", symbol = "qtr", utype = "mass", scale = 12.70058636, default = "lb kg", subdivs = { ["lb"] = { 28, default = "kg" } }, link = "Long quarter", }, ["Scwt"] = { name1 = "short hundredweight", name2 = "short hundredweight", symbol = "Scwt", usename = 1, utype = "mass", scale = 45.359237, default = "lb", link = "Hundredweight", }, ["short cwt"] = { name1 = "short hundredweight", name2 = "short hundredweight", symbol = "short&nbsp;cwt", utype = "mass", scale = 45.359237, default = "lb kg", link = "Hundredweight", }, ["short qtr"] = { name1 = "short quarter", symbol = "short&nbsp;qtr", utype = "mass", scale = 11.33980925, default = "lb kg", }, ["ST"] = { symbol = "short ton", usename = 1, utype = "mass", scale = 907.18474, default = "t", subdivs = { ["Scwt"] = { 20, default = "t", unit = "-Scwt" } }, }, ["shtn"] = { name1 = "short ton", symbol = "sh&nbsp;tn", utype = "mass", scale = 907.18474, default = "t", }, ["shton"] = { symbol = "ton", usename = 1, utype = "mass", scale = 907.18474, default = "t", }, ["solar mass"] = { name1 = "solar mass", name2 = "solar masses", symbol = "''M''<sub>☉</sub>", utype = "mass", scale = 1.98855e30, default = "kg", }, ["st"] = { name1 = "stone", name2 = "stone", symbol = "st", utype = "mass", scale = 6.35029318, default = "lb kg", subdivs = { ["lb"] = { 14, default = "kg lb" } }, link = "Stone (unit)", }, ["t"] = { name1 = "tonne", name1_us = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "LT ST", }, ["tonne"] = { name1 = "tonne", name1_us = "metric ton", symbol = "t", utype = "mass", scale = 1000, default = "shton", }, ["troy pound"] = { symbol = "troy pound", usename = 1, utype = "mass", scale = 0.3732417216, default = "lb kg", link = "Troy weight", }, ["usgalh2o"] = { name1 = "US gallon of water", name1_us = "U.S. gallon of water", name2 = "US gallons of water", name2_us = "U.S. gallons of water", symbol = "US&nbsp;gal H<sub>2</sub>O", utype = "mass", scale = 3.7776215836051126, default = "lb kg", link = "United States customary units#Fluid volume", }, ["viss"] = { name2 = "viss", symbol = "viss", utype = "mass", scale = 1.632932532, default = "kg", link = "Myanmar units of measurement#Mass", }, ["billion tonne"] = { target = "e9t", }, ["kilogram"] = { target = "kg", }, ["kilotonne"] = { target = "kt", }, ["lbs"] = { target = "lb", }, ["lbt"] = { target = "troy pound", }, ["lcwt"] = { target = "Lcwt", }, ["long ton"] = { target = "LT", }, ["mcg"] = { target = "μg", }, ["million tonne"] = { target = "e6t", }, ["scwt"] = { target = "Scwt", }, ["short ton"] = { target = "ST", }, ["stone"] = { target = "st", }, ["thousand tonne"] = { target = "e3t", }, ["tonnes"] = { target = "t", }, ["kg/kW"] = { name1 = "kilogram per kilowatt", name2 = "kilograms per kilowatt", symbol = "kg/kW", utype = "mass per unit power", scale = 0.001, default = "lb/hp", link = "Kilowatt", }, ["lb/hp"] = { name1 = "pound per horsepower", name2 = "pounds per horsepower", symbol = "lb/hp", utype = "mass per unit power", scale = 0.00060827738784176115, default = "kg/kW", link = "Horsepower", }, ["kg/h"] = { per = { "kg", "h" }, utype = "mass per unit time", default = "lb/h", }, ["lb/h"] = { per = { "lb", "h" }, utype = "mass per unit time", default = "kg/h", }, ["g-mol/d"] = { name1 = "gram-mole per day", name2 = "gram-moles per day", symbol = "g&#8209;mol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["g-mol/h"] = { name1 = "gram-mole per hour", name2 = "gram-moles per hour", symbol = "g&#8209;mol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["g-mol/min"] = { name1 = "gram-mole per minute", name2 = "gram-moles per minute", symbol = "g&#8209;mol/min", utype = "molar rate", scale = 0.016666666666666666, default = "g-mol/s", link = "Mole (unit)", }, ["g-mol/s"] = { name1 = "gram-mole per second", name2 = "gram-moles per second", symbol = "g&#8209;mol/s", utype = "molar rate", scale = 1, default = "lb-mol/min", link = "Mole (unit)", }, ["gmol/d"] = { name1 = "gram-mole per day", name2 = "gram-moles per day", symbol = "gmol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["gmol/h"] = { name1 = "gram-mole per hour", name2 = "gram-moles per hour", symbol = "gmol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["gmol/min"] = { name1 = "gram-mole per minute", name2 = "gram-moles per minute", symbol = "gmol/min", utype = "molar rate", scale = 0.016666666666666666, default = "gmol/s", link = "Mole (unit)", }, ["gmol/s"] = { name1 = "gram-mole per second", name2 = "gram-moles per second", symbol = "gmol/s", utype = "molar rate", scale = 1, default = "lbmol/min", link = "Mole (unit)", }, ["kmol/d"] = { name1 = "kilomole per day", name2 = "kilomoles per day", symbol = "kmol/d", utype = "molar rate", scale = 0.011574074074074073, default = "mmol/s", link = "Mole (unit)", }, ["kmol/h"] = { name1 = "kilomole per hour", name2 = "kilomoles per hour", symbol = "kmol/h", utype = "molar rate", scale = 0.27777777777777779, default = "mol/s", link = "Mole (unit)", }, ["kmol/min"] = { name1 = "kilomole per minute", name2 = "kilomoles per minute", symbol = "kmol/min", utype = "molar rate", scale = 16.666666666666668, default = "mol/s", link = "Kilomole (unit)", }, ["kmol/s"] = { name1 = "kilomole per second", name2 = "kilomoles per second", symbol = "kmol/s", utype = "molar rate", scale = 1000, default = "lb-mol/s", link = "Mole (unit)", }, ["lb-mol/d"] = { name1 = "pound-mole per day", name2 = "pound-moles per day", symbol = "lb&#8209;mol/d", utype = "molar rate", scale = 0.0052499116898148141, default = "mmol/s", link = "Pound-mole", }, ["lb-mol/h"] = { name1 = "pound-mole per hour", name2 = "pound-moles per hour", symbol = "lb&#8209;mol/h", utype = "molar rate", scale = 0.12599788055555555, default = "mol/s", link = "Pound-mole", }, ["lb-mol/min"] = { name1 = "pound-mole per minute", name2 = "pound-moles per minute", symbol = "lb&#8209;mol/min", utype = "molar rate", scale = 7.5598728333333334, default = "mol/s", link = "Pound-mole", }, ["lb-mol/s"] = { name1 = "pound-mole per second", name2 = "pound-moles per second", symbol = "lb&#8209;mol/s", utype = "molar rate", scale = 453.59237, default = "kmol/s", link = "Pound-mole", }, ["lbmol/d"] = { name1 = "pound-mole per day", name2 = "pound-moles per day", symbol = "lbmol/d", utype = "molar rate", scale = 0.0052499116898148141, default = "mmol/s", link = "Pound-mole", }, ["lbmol/h"] = { name1 = "pound-mole per hour", name2 = "pound-moles per hour", symbol = "lbmol/h", utype = "molar rate", scale = 0.12599788055555555, default = "mol/s", link = "Pound-mole", }, ["lbmol/min"] = { name1 = "pound-mole per minute", name2 = "pound-moles per minute", symbol = "lbmol/min", utype = "molar rate", scale = 7.5598728333333334, default = "mol/s", link = "Pound-mole", }, ["lbmol/s"] = { name1 = "pound-mole per second", name2 = "pound-moles per second", symbol = "lbmol/s", utype = "molar rate", scale = 453.59237, default = "kmol/s", link = "Pound-mole", }, ["mmol/s"] = { name1 = "millimole per second", name2 = "millimoles per second", symbol = "mmol/s", utype = "molar rate", scale = 0.001, default = "lb-mol/d", link = "Mole (unit)", }, ["mol/d"] = { name1 = "mole per day", name2 = "moles per day", symbol = "mol/d", utype = "molar rate", scale = 1.1574074074074073e-5, default = "μmol/s", link = "Mole (unit)", }, ["mol/h"] = { name1 = "mole per hour", name2 = "moles per hour", symbol = "mol/h", utype = "molar rate", scale = 0.00027777777777777778, default = "mmol/s", link = "Mole (unit)", }, ["mol/min"] = { name1 = "mole per minute", name2 = "moles per minute", symbol = "mol/min", utype = "molar rate", scale = 0.016666666666666666, default = "mol/s", link = "Mole (unit)", }, ["mol/s"] = { name1 = "mole per second", name2 = "moles per second", symbol = "mol/s", utype = "molar rate", scale = 1, default = "lb-mol/min", link = "Mole (unit)", }, ["μmol/s"] = { name1 = "micromole per second", name2 = "micromoles per second", symbol = "μmol/s", utype = "molar rate", scale = 0.000001, default = "lb-mol/d", link = "Mole (unit)", }, ["umol/s"] = { target = "μmol/s", }, ["/acre"] = { name1 = "per acre", name2 = "per acre", symbol = "/acre", utype = "per unit area", scale = 0.00024710538146716532, default = "/ha", link = "Acre", }, ["/ha"] = { name1 = "per hectare", name2 = "per hectare", symbol = "/ha", utype = "per unit area", scale = 100e-6, default = "/acre", link = "Hectare", }, ["/sqcm"] = { name1 = "per square centimetre", name1_us = "per square centimeter", name2 = "per square centimetre", name2_us = "per square centimeter", symbol = "/cm<sup>2</sup>", utype = "per unit area", scale = 1e4, default = "/sqin", link = "Square centimetre", }, ["/sqin"] = { name1 = "per square inch", name2 = "per square inch", symbol = "/in<sup>2</sup>", utype = "per unit area", scale = 1550.0031000062002, default = "/sqcm", link = "Square inch", }, ["/sqkm"] = { name1 = "per square kilometre", name1_us = "per square kilometer", name2 = "per square kilometre", name2_us = "per square kilometer", symbol = "/km<sup>2</sup>", utype = "per unit area", scale = 1e-6, default = "/sqmi", link = "Square kilometre", }, ["/sqmi"] = { name1 = "per square mile", name2 = "per square mile", symbol = "/sq&nbsp;mi", utype = "per unit area", scale = 3.8610215854244582e-7, default = "/sqkm", link = "Square mile", }, ["PD/acre"] = { name1 = "inhabitant per acre", name2 = "inhabitants per acre", symbol = "/acre", utype = "per unit area", scale = 0.00024710538146716532, default = "PD/ha", link = "Acre", }, ["PD/ha"] = { name1 = "inhabitant per hectare", name2 = "inhabitants per hectare", symbol = "/ha", utype = "per unit area", scale = 100e-6, default = "PD/acre", link = "Hectare", }, ["PD/sqkm"] = { name1 = "inhabitant per square kilometre", name1_us = "inhabitant per square kilometer", name2 = "inhabitants per square kilometre", name2_us = "inhabitants per square kilometer", symbol = "/km<sup>2</sup>", utype = "per unit area", scale = 1e-6, default = "PD/sqmi", link = "Square kilometre", }, ["PD/sqmi"] = { name1 = "inhabitant per square mile", name2 = "inhabitants per square mile", symbol = "/sq&nbsp;mi", utype = "per unit area", scale = 3.8610215854244582e-7, default = "PD/sqkm", link = "Square mile", }, ["/cm2"] = { target = "/sqcm", }, ["/in2"] = { target = "/sqin", }, ["/km2"] = { target = "/sqkm", }, ["pd/acre"] = { target = "PD/acre", }, ["pd/ha"] = { target = "PD/ha", }, ["PD/km2"] = { target = "PD/sqkm", }, ["pd/km2"] = { target = "PD/sqkm", }, ["PD/km²"] = { target = "PD/sqkm", }, ["pd/sqkm"] = { target = "PD/sqkm", }, ["pd/sqmi"] = { target = "PD/sqmi", }, ["/l"] = { name1 = "per litre", name1_us = "per liter", name2 = "per litre", name2_us = "per liter", symbol = "/l", utype = "per unit volume", scale = 1000, default = "/usgal", link = "Litre", }, ["/L"] = { name1 = "per litre", name1_us = "per liter", name2 = "per litre", name2_us = "per liter", symbol = "/L", utype = "per unit volume", scale = 1000, default = "/usgal", link = "Litre", }, ["/USgal"] = { name1 = "per gallon", name2 = "per gallon", symbol = "/gal", utype = "per unit volume", scale = 264.172052, default = "/L", link = "US gallon", customary= 2, }, ["/usgal"] = { target = "/USgal", }, ["bhp"] = { name1 = "brake horsepower", name2 = "brake horsepower", symbol = "bhp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Brake horsepower", }, ["Cal/d"] = { name1 = "large calorie per day", name2 = "large calories per day", symbol = "Cal/d", utype = "power", scale = 0.048425925925925928, default = "kJ/d", link = "Calorie", }, ["Cal/h"] = { name1 = "large calorie per hour", name2 = "large calories per hour", symbol = "Cal/h", utype = "power", scale = 1.1622222222222223, default = "kJ/h", link = "Calorie", }, ["cal/h"] = { name1 = "calorie per hour", name2 = "calories per hour", symbol = "cal/h", utype = "power", scale = 0.0011622222222222223, default = "W", link = "Calorie", }, ["CV"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "CV", utype = "power", scale = 735.49875, default = "kW", }, ["hk"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "hk", utype = "power", scale = 735.49875, default = "kW", }, ["hp"] = { name1 = "horsepower", name2 = "horsepower", symbol = "hp", utype = "power", scale = 745.69987158227022, default = "kW", }, ["hp-electric"] = { name1 = "electric horsepower", name2 = "electric horsepower", symbol = "hp", utype = "power", scale = 746, default = "kW", link = "Horsepower#Electrical horsepower", }, ["hp-electrical"] = { name1 = "electrical horsepower", name2 = "electrical horsepower", symbol = "hp", utype = "power", scale = 746, default = "kW", link = "Horsepower#Electrical horsepower", }, ["hp-metric"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "hp", utype = "power", scale = 735.49875, default = "kW", }, ["ihp"] = { name1 = "indicated horsepower", name2 = "indicated horsepower", symbol = "ihp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Indicated horsepower", }, ["kcal/h"] = { name1 = "kilocalorie per hour", name2 = "kilocalories per hour", symbol = "kcal/h", utype = "power", scale = 1.1622222222222223, default = "kW", link = "Calorie", }, ["kJ/d"] = { name1 = "kilojoule per day", name2 = "kilojoules per day", symbol = "kJ/d", utype = "power", scale = 0.011574074074074073, default = "Cal/d", link = "Kilojoule", }, ["kJ/h"] = { name1 = "kilojoule per hour", name2 = "kilojoules per hour", symbol = "kJ/h", utype = "power", scale = 0.27777777777777779, default = "W", link = "Kilojoule", }, ["PS"] = { name1 = "metric horsepower", name2 = "metric horsepower", symbol = "PS", utype = "power", scale = 735.49875, default = "kW", }, ["shp"] = { name1 = "shaft horsepower", name2 = "shaft horsepower", symbol = "shp", utype = "power", scale = 745.69987158227022, default = "kW", link = "Horsepower#Shaft horsepower", }, ["W"] = { _name1 = "watt", _symbol = "W", utype = "power", scale = 1, prefixes = 1, default = "hp", link = "Watt", }, ["BTU/h"] = { per = { "BTU", "h" }, utype = "power", default = "W", }, ["Btu/h"] = { per = { "Btu", "h" }, utype = "power", default = "W", }, ["BHP"] = { target = "bhp", }, ["btu/h"] = { target = "BTU/h", }, ["HP"] = { target = "hp", }, ["Hp"] = { target = "hp", }, ["hp-mechanical"] = { target = "hp", }, ["IHP"] = { target = "ihp", }, ["SHP"] = { target = "shp", }, ["whp"] = { target = "hp", }, ["hp/lb"] = { name1 = "horsepower per pound", name2 = "horsepower per pound", symbol = "hp/lb", utype = "power per unit mass", scale = 1643.986806, default = "kW/kg", link = "Power-to-weight ratio", }, ["hp/LT"] = { name1 = "horsepower per long ton", name2 = "horsepower per long ton", symbol = "hp/LT", utype = "power per unit mass", scale = 0.73392268125000004, default = "kW/t", link = "Power-to-weight ratio", }, ["hp/ST"] = { name1 = "horsepower per short ton", name2 = "horsepower per short ton", symbol = "hp/ST", utype = "power per unit mass", scale = 0.821993403, default = "kW/t", link = "Power-to-weight ratio", }, ["hp/t"] = { name1 = "horsepower per tonne", name2 = "horsepower per tonne", symbol = "hp/t", utype = "power per unit mass", scale = 0.74569987158227022, default = "kW/t", link = "Power-to-weight ratio", }, ["kW/kg"] = { name1 = "kilowatt per kilogram", name2 = "kilowatts per kilogram", symbol = "kW/kg", utype = "power per unit mass", scale = 1000, default = "hp/lb", link = "Power-to-weight ratio", }, ["kW/t"] = { name1 = "kilowatt per tonne", name2 = "kilowatts per tonne", symbol = "kW/t", utype = "power per unit mass", scale = 1, default = "PS/t", link = "Power-to-weight ratio", }, ["PS/t"] = { name1 = "metric horsepower per tonne", name2 = "metric horsepower per tonne", symbol = "PS/t", utype = "power per unit mass", scale = 0.73549875, default = "kW/t", link = "Power-to-weight ratio", }, ["shp/lb"] = { name1 = "shaft horsepower per pound", name2 = "shaft horsepower per pound", symbol = "shp/lb", utype = "power per unit mass", scale = 1643.986806, default = "kW/kg", link = "Power-to-weight ratio", }, ["hp/tonne"] = { target = "hp/t", symbol = "hp/tonne", default = "kW/tonne", }, ["kW/tonne"] = { target = "kW/t", symbol = "kW/tonne", }, ["-lb/in2"] = { name1 = "pound per square inch", name2 = "pounds per square inch", symbol = "lb/in<sup>2</sup>", utype = "pressure", scale = 6894.7572931683608, default = "kPa kgf/cm2", }, ["atm"] = { name1 = "standard atmosphere", symbol = "atm", utype = "pressure", scale = 101325, default = "kPa", link = "Atmosphere (unit)", }, ["Ba"] = { name1 = "barye", symbol = "Ba", utype = "pressure", scale = 0.1, default = "Pa", }, ["bar"] = { symbol = "bar", utype = "pressure", scale = 100000, default = "kPa", link = "Bar (unit)", }, ["dbar"] = { name1 = "decibar", symbol = "dbar", utype = "pressure", scale = 10000, default = "kPa", link = "Bar (unit)", }, ["inHg"] = { name1 = "inch of mercury", name2 = "inches of mercury", symbol = "inHg", utype = "pressure", scale = 3386.388640341, default = "kPa", }, ["kBa"] = { name1 = "kilobarye", symbol = "kBa", utype = "pressure", scale = 100, default = "hPa", link = "Barye", }, ["kg-f/cm2"] = { name1 = "kilogram-force per square centimetre", name1_us = "kilogram-force per square centimeter", name2 = "kilograms-force per square centimetre", name2_us = "kilograms-force per square centimeter", symbol = "kg<sub>f</sub>/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["kg/cm2"] = { name1 = "kilogram per square centimetre", name1_us = "kilogram per square centimeter", name2 = "kilograms per square centimetre", name2_us = "kilograms per square centimeter", symbol = "kg/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["kgf/cm2"] = { name1 = "kilogram-force per square centimetre", name1_us = "kilogram-force per square centimeter", name2 = "kilograms-force per square centimetre", name2_us = "kilograms-force per square centimeter", symbol = "kgf/cm<sup>2</sup>", utype = "pressure", scale = 98066.5, default = "psi", link = "Kilogram-force", }, ["ksi"] = { name1 = "kilopound per square inch", name2 = "kilopounds per square inch", symbol = "ksi", utype = "pressure", scale = 6894757.2931683613, default = "MPa", link = "Pound per square inch", }, ["lbf/in2"] = { name1 = "pound-force per square inch", name2 = "pounds-force per square inch", symbol = "lbf/in<sup>2</sup>", utype = "pressure", scale = 6894.7572931683608, default = "kPa kgf/cm2", }, ["mb"] = { name1 = "millibar", symbol = "mb", utype = "pressure", scale = 100, default = "hPa", link = "Bar (unit)", }, ["mbar"] = { name1 = "millibar", symbol = "mbar", utype = "pressure", scale = 100, default = "hPa", link = "Bar (unit)", }, ["mmHg"] = { name1 = "millimetre of mercury", name1_us = "millimeter of mercury", name2 = "millimetres of mercury", name2_us = "millimeters of mercury", symbol = "mmHg", utype = "pressure", scale = 133.322387415, default = "kPa", }, ["Pa"] = { _name1 = "pascal", _symbol = "Pa", utype = "pressure", scale = 1, prefixes = 1, default = "psi", link = "Pascal (unit)", }, ["psf"] = { name1 = "pound per square foot", name2 = "pounds per square foot", symbol = "psf", utype = "pressure", scale = 47.880258980335839, default = "kPa", link = "Pound per square inch", }, ["psi"] = { name1 = "pound per square inch", name2 = "pounds per square inch", symbol = "psi", utype = "pressure", scale = 6894.7572931683608, default = "kPa", }, ["Torr"] = { name1 = "torr", symbol = "Torr", utype = "pressure", scale = 133.32236842105263, default = "kPa", }, ["N/cm2"] = { per = { "N", "cm2" }, utype = "pressure", default = "psi", }, ["N/m2"] = { per = { "N", "m2" }, utype = "pressure", default = "psi", }, ["g/cm2"] = { per = { "g", "cm2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["g/m2"] = { per = { "g", "m2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["kg/ha"] = { per = { "kg", "ha" }, utype = "pressure", default = "lb/acre", multiplier= 9.80665, }, ["kg/m2"] = { per = { "kg", "m2" }, utype = "pressure", default = "lb/sqft", multiplier= 9.80665, }, ["lb/1000sqft"] = { per = { "lb", "1000sqft" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["lb/acre"] = { per = { "lb", "acre" }, utype = "pressure", default = "kg/ha", multiplier= 9.80665, }, ["lb/sqft"] = { per = { "lb", "sqft" }, utype = "pressure", default = "kg/m2", multiplier= 9.80665, }, ["lb/sqyd"] = { per = { "lb", "sqyd" }, utype = "pressure", default = "kg/m2", multiplier= 9.80665, }, ["LT/acre"] = { per = { "LT", "acre" }, utype = "pressure", default = "t/ha", multiplier= 9.80665, }, ["MT/ha"] = { per = { "MT", "ha" }, utype = "pressure", default = "LT/acre ST/acre", multiplier= 9.80665, }, ["oz/sqft"] = { per = { "oz", "sqft" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["oz/sqyd"] = { per = { "oz", "sqyd" }, utype = "pressure", default = "g/m2", multiplier= 9.80665, }, ["ST/acre"] = { per = { "ST", "acre" }, utype = "pressure", default = "t/ha", multiplier= 9.80665, }, ["t/ha"] = { per = { "t", "ha" }, utype = "pressure", default = "LT/acre ST/acre", multiplier= 9.80665, }, ["tonne/acre"] = { per = { "tonne", "acre" }, utype = "pressure", default = "tonne/ha", multiplier= 9.80665, }, ["tonne/ha"] = { per = { "tonne", "ha" }, utype = "pressure", default = "tonne/acre", multiplier= 9.80665, }, ["kgfpsqcm"] = { target = "kgf/cm2", }, ["kgpsqcm"] = { target = "kg/cm2", }, ["kN/m2"] = { target = "kPa", }, ["lb/in2"] = { target = "lbf/in2", }, ["torr"] = { target = "Torr", }, ["Bq"] = { _name1 = "becquerel", _symbol = "Bq", utype = "radioactivity", scale = 1, prefixes = 1, default = "pCi", link = "Becquerel", }, ["Ci"] = { _name1 = "curie", _symbol = "Ci", utype = "radioactivity", scale = 3.7e10, prefixes = 1, default = "GBq", link = "Curie (unit)", }, ["Rd"] = { _name1 = "rutherford", _symbol = "Rd", utype = "radioactivity", scale = 1e6, prefixes = 1, default = "MBq", link = "Rutherford (unit)", }, ["cm/h"] = { name1 = "centimetre per hour", name1_us = "centimeter per hour", name2 = "centimetres per hour", name2_us = "centimeters per hour", symbol = "cm/h", utype = "speed", scale = 2.7777777777777775e-6, default = "in/h", link = "Metre per second", }, ["cm/s"] = { name1 = "centimetre per second", name1_us = "centimeter per second", name2 = "centimetres per second", name2_us = "centimeters per second", symbol = "cm/s", utype = "speed", scale = 0.01, default = "in/s", link = "Metre per second", }, ["cm/year"] = { name1 = "centimetre per year", name1_us = "centimeter per year", name2 = "centimetres per year", name2_us = "centimeters per year", symbol = "cm/year", utype = "speed", scale = 3.168873850681143e-10, default = "in/year", link = "Orders of magnitude (speed)", }, ["foot/s"] = { name1 = "foot per second", name2 = "foot per second", symbol = "ft/s", utype = "speed", scale = 0.3048, default = "m/s", }, ["ft/min"] = { name1 = "foot per minute", name2 = "feet per minute", symbol = "ft/min", utype = "speed", scale = 0.00508, default = "m/min", link = "Feet per second", }, ["ft/s"] = { name1 = "foot per second", name2 = "feet per second", symbol = "ft/s", utype = "speed", scale = 0.3048, default = "m/s", link = "Feet per second", }, ["furlong per fortnight"] = { name2 = "furlongs per fortnight", symbol = "furlong per fortnight", usename = 1, utype = "speed", scale = 0.00016630952380952381, default = "km/h mph", link = "FFF system", }, ["in/h"] = { name1 = "inch per hour", name2 = "inches per hour", symbol = "in/h", utype = "speed", scale = 7.0555555555555559e-6, default = "cm/h", link = "Inch", }, ["in/s"] = { name1 = "inch per second", name2 = "inches per second", symbol = "in/s", utype = "speed", scale = 0.0254, default = "cm/s", link = "Inch", }, ["in/year"] = { name1 = "inch per year", name2 = "inches per year", symbol = "in/year", utype = "speed", scale = 8.0489395807301024e-10, default = "cm/year", link = "Orders of magnitude (speed)", }, ["isp"] = { name1 = "second", symbol = "s", utype = "speed", scale = 9.80665, default = "km/s", link = "Specific impulse", }, ["km/d"] = { name1 = "kilometre per day", name1_us = "kilometer per day", name2 = "kilometres per day", name2_us = "kilometers per day", symbol = "km/d", utype = "speed", scale = 1.1574074074074074e-2, default = "mi/d", link = "Orders of magnitude (speed)", }, ["km/h"] = { name1 = "kilometre per hour", name1_us = "kilometer per hour", name2 = "kilometres per hour", name2_us = "kilometers per hour", symbol = "km/h", utype = "speed", scale = 0.27777777777777779, default = "mph", link = "Kilometres per hour", }, ["km/s"] = { name1 = "kilometre per second", name1_us = "kilometer per second", name2 = "kilometres per second", name2_us = "kilometers per second", symbol = "km/s", utype = "speed", scale = 1000, default = "mi/s", link = "Metre per second", }, ["kn"] = { name1 = "knot", symbol = "kn", utype = "speed", scale = 0.51444444444444448, default = "km/h mph", link = "Knot (unit)", }, ["kNs/kg"] = { name2 = "kN&#8209;s/kg", symbol = "kN&#8209;s/kg", utype = "speed", scale = 1000, default = "isp", link = "Specific impulse", }, ["m/min"] = { name1 = "metre per minute", name1_us = "meter per minute", name2 = "metres per minute", name2_us = "meters per minute", symbol = "m/min", utype = "speed", scale = 0.016666666666666666, default = "ft/min", link = "Metre per second", }, ["m/s"] = { name1 = "metre per second", name1_us = "meter per second", name2 = "metres per second", name2_us = "meters per second", symbol = "m/s", utype = "speed", scale = 1, default = "ft/s", }, ["Mach"] = { name2 = "Mach", symbol = "Mach", utype = "speed", builtin = "mach", scale = 0, iscomplex= true, default = "km/h mph", link = "Mach number", }, ["mi/d"] = { name1 = "mile per day", name2 = "miles per day", symbol = "mi/d", utype = "speed", scale = 1.8626666666666667e-2, default = "km/d", link = "Orders of magnitude (speed)", }, ["mi/s"] = { name1 = "mile per second", name2 = "miles per second", symbol = "mi/s", utype = "speed", scale = 1609.344, default = "km/s", link = "Mile", }, ["mm/h"] = { name1 = "millimetre per hour", name1_us = "millimeter per hour", name2 = "millimetres per hour", name2_us = "millimeters per hour", symbol = "mm/h", utype = "speed", scale = 2.7777777777777781e-7, default = "in/h", link = "Metre per second", }, ["mph"] = { name1 = "mile per hour", name2 = "miles per hour", symbol = "mph", utype = "speed", scale = 0.44704, default = "km/h", link = "Miles per hour", }, ["Ns/kg"] = { name2 = "N&#8209;s/kg", symbol = "N&#8209;s/kg", utype = "speed", scale = 1, default = "isp", link = "Specific impulse", }, ["si tsfc"] = { name2 = "g/(kN⋅s)", symbol = "g/(kN⋅s)", utype = "speed", scale = 9.9999628621379242e-7, invert = -1, iscomplex= true, default = "tsfc", link = "Thrust specific fuel consumption", }, ["tsfc"] = { name2 = "lb/(lbf⋅h)", symbol = "lb/(lbf⋅h)", utype = "speed", scale = 2.832545036049801e-5, invert = -1, iscomplex= true, default = "si tsfc", link = "Thrust specific fuel consumption", }, ["cm/y"] = { target = "cm/year", }, ["cm/yr"] = { target = "cm/year", }, ["in/y"] = { target = "in/year", }, ["in/yr"] = { target = "in/year", }, ["knot"] = { target = "kn", }, ["knots"] = { target = "kn", }, ["kph"] = { target = "km/h", }, ["mi/h"] = { target = "mph", }, ["mm/s"] = { per = { "mm", "s" }, utype = "speed", default = "in/s", link = "Metre per second", }, ["C"] = { name1 = "degree Celsius", name2 = "degrees Celsius", symbol = "°C", usesymbol= 1, utype = "temperature", scale = 1, offset = -273.15, iscomplex= true, istemperature= true, default = "F", link = "Celsius", }, ["F"] = { name1 = "degree Fahrenheit", name2 = "degrees Fahrenheit", symbol = "°F", usesymbol= 1, utype = "temperature", scale = 0.55555555555555558, offset = 32-273.15*(9/5), iscomplex= true, istemperature= true, default = "C", link = "Fahrenheit", }, ["K"] = { _name1 = "kelvin", _symbol = "K", usesymbol= 1, utype = "temperature", scale = 1, offset = 0, iscomplex= true, istemperature= true, prefixes = 1, default = "C F", link = "Kelvin", }, ["keVT"] = { name1 = "kiloelectronvolt", symbol = "keV", utype = "temperature", scale = 11.604505e6, offset = 0, iscomplex= true, default = "MK", link = "Electronvolt", }, ["R"] = { name1 = "degree Rankine", name2 = "degrees Rankine", symbol = "°R", usesymbol= 1, utype = "temperature", scale = 0.55555555555555558, offset = 0, iscomplex= true, istemperature= true, default = "K F C", link = "Rankine scale", }, ["Celsius"] = { target = "C", }, ["°C"] = { target = "C", }, ["°F"] = { target = "F", }, ["°R"] = { target = "R", }, ["C-change"] = { name1 = "degree Celsius change", name2 = "degrees Celsius change", symbol = "°C", usesymbol= 1, utype = "temperature change", scale = 1, default = "F-change", link = "Celsius", }, ["F-change"] = { name1 = "degree Fahrenheit change", name2 = "degrees Fahrenheit change", symbol = "°F", usesymbol= 1, utype = "temperature change", scale = 0.55555555555555558, default = "C-change", link = "Fahrenheit", }, ["K-change"] = { name1 = "kelvin change", name2 = "kelvins change", symbol = "K", usesymbol= 1, utype = "temperature change", scale = 1, default = "F-change", link = "Kelvin", }, ["°C-change"] = { target = "C-change", }, ["°F-change"] = { target = "F-change", }, ["century"] = { name1 = "century", name2 = "centuries", symbol = "ha", utype = "time", scale = 3155760000, default = "Gs", }, ["d"] = { name1 = "day", symbol = "d", utype = "time", scale = 86400, default = "ks", }, ["decade"] = { name1 = "decade", symbol = "daa", utype = "time", scale = 315576000, default = "Ms", }, ["dog year"] = { name1 = "dog year", symbol = "dog yr", utype = "time", scale = 220903200, default = "years", link = "List of unusual units of measurement#Dog year", }, ["fortnight"] = { symbol = "fortnight", usename = 1, utype = "time", scale = 1209600, default = "week", }, ["h"] = { name1 = "hour", symbol = "h", utype = "time", scale = 3600, default = "ks", }, ["long billion year"] = { name1 = "billion years", name2 = "billion years", symbol = "Ta", utype = "time", scale = 31557600000000000000, default = "Es", link = "Annum", }, ["millennium"] = { name1 = "millennium", name2 = "millennia", symbol = "ka", utype = "time", scale = 31557600000, default = "Gs", }, ["milliard year"] = { name1 = "milliard years", name2 = "milliard years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["million year"] = { name1 = "million years", name2 = "million years", symbol = "Ma", utype = "time", scale = 31557600000000, default = "Ts", link = "Annum", }, ["min"] = { name1 = "minute", symbol = "min", utype = "time", scale = 60, default = "s", }, ["month"] = { symbol = "month", usename = 1, utype = "time", scale = 2629800, default = "Ms", }, ["months"] = { name1 = "month", symbol = "mo", utype = "time", scale = 2629800, default = "year", }, ["s"] = { _name1 = "second", _symbol = "s", utype = "time", scale = 1, prefixes = 1, default = "v < 7200 ! min ! h", link = "Second", }, ["short billion year"] = { name1 = "billion years", name2 = "billion years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["short trillion year"] = { name1 = "trillion years", name2 = "trillion years", symbol = "Ta", utype = "time", scale = 31557600000000000000, default = "Es", link = "Annum", }, ["thousand million year"] = { name1 = "thousand million years", name2 = "thousand million years", symbol = "Ga", utype = "time", scale = 31557600000000000, default = "Ps", link = "Annum", }, ["wk"] = { symbol = "week", usename = 1, utype = "time", scale = 604800, default = "Ms", }, ["year"] = { name1 = "year", symbol = "a", utype = "time", scale = 31557600, default = "Ms", link = "Annum", }, ["years"] = { name1 = "year", symbol = "yr", utype = "time", scale = 31557600, default = "Ms", link = "Annum", }, ["byr"] = { target = "short billion year", }, ["day"] = { target = "d", }, ["days"] = { target = "d", }, ["dog yr"] = { target = "dog year", }, ["Gyr"] = { target = "thousand million year", }, ["hour"] = { target = "h", }, ["hours"] = { target = "h", }, ["kMyr"] = { target = "thousand million year", }, ["kmyr"] = { target = "thousand million year", }, ["kyr"] = { target = "millennium", }, ["long byr"] = { target = "long billion year", }, ["minute"] = { target = "min", }, ["minutes"] = { target = "min", }, ["mth"] = { target = "month", }, ["Myr"] = { target = "million year", }, ["myr"] = { target = "million year", }, ["sec"] = { target = "s", }, ["second"] = { target = "s", }, ["seconds"] = { target = "s", }, ["tmyr"] = { target = "thousand million year", }, ["tryr"] = { target = "short trillion year", }, ["tyr"] = { target = "millennium", }, ["week"] = { target = "wk", }, ["weeks"] = { target = "wk", }, ["yr"] = { target = "year", }, ["kg.m"] = { name1 = "kilogram metre", name1_us = "kilogram meter", symbol = "kg⋅m", utype = "torque", scale = 9.80665, default = "Nm lbft", link = "Kilogram metre (torque)", }, ["kgf.m"] = { name1 = "kilogram force-metre", name1_us = "kilogram force-meter", symbol = "kgf⋅m", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["kgm"] = { name1 = "kilogram metre", name1_us = "kilogram meter", symbol = "kg⋅m", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["kpm"] = { name1 = "kilopond metre", name1_us = "kilopond meter", symbol = "kp⋅m", utype = "torque", scale = 9.80665, default = "Nm lbft", link = "Kilogram metre (torque)", }, ["lb-fft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "ft⋅lb<sub>f</sub>", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lb.ft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "lb⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lb.in"] = { name1 = "pound force-inch", symbol = "lb⋅in", utype = "torque", scale = 0.1129848290276167, default = "mN.m", link = "Pound-foot (torque)", }, ["lbfft"] = { name1 = "pound force-foot", name2 = "pound force-feet", symbol = "lbf⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["lbft"] = { name1 = "pound-foot", name2 = "pound-feet", symbol = "lb⋅ft", utype = "torque", scale = 1.3558179483314004, default = "Nm", link = "Pound-foot (torque)", }, ["m.kg-f"] = { name1 = "metre kilogram-force", name1_us = "meter kilogram-force", name2 = "metre kilograms-force", name2_us = "meter kilograms-force", symbol = "m⋅kg<sub>f</sub>", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["m.kgf"] = { name1 = "metre kilogram-force", name1_us = "meter kilogram-force", name2 = "metre kilograms-force", name2_us = "meter kilograms-force", symbol = "m⋅kgf", utype = "torque", scale = 9.80665, default = "Nm lbfft", link = "Kilogram metre (torque)", }, ["mN.m"] = { name1 = "millinewton-metre", name1_us = "millinewton-meter", symbol = "mN⋅m", utype = "torque", scale = 0.001, default = "lb.in", link = "Newton-metre", }, ["Nm"] = { _name1 = "newton-metre", _name1_us= "newton-meter", _symbol = "N⋅m", utype = "torque", alttype = "energy", scale = 1, prefixes = 1, default = "lbfft", link = "Newton-metre", }, ["kN/m"] = { per = { "kN", "-m-stiff" }, utype = "torque", default = "lbf/in", }, ["lbf/in"] = { per = { "lbf", "-in-stiff" }, utype = "torque", default = "kN/m", }, ["lb-f.ft"] = { target = "lb-fft", }, ["lbf.ft"] = { target = "lbfft", }, ["lbf·ft"] = { target = "lbfft", }, ["lb·ft"] = { target = "lb.ft", }, ["mkg-f"] = { target = "m.kg-f", }, ["mkgf"] = { target = "m.kgf", }, ["N.m"] = { target = "Nm", }, ["N·m"] = { target = "Nm", }, ["ton-mile"] = { symbol = "ton-mile", usename = 1, utype = "transportation", scale = 1.4599723182105602, default = "tkm", }, ["tkm"] = { name1 = "tonne-kilometre", name1_us = "tonne-kilometer", symbol = "tkm", utype = "transportation", scale = 1, default = "ton-mile", }, ["-12USoz(mL)serve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;mL) serving", utype = "volume", scale = 0.00035488235475000004, default = "mL", link = "Beverage can#Standard sizes", }, ["-12USoz(ml)serve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz (355&nbsp;ml) serving", utype = "volume", scale = 0.00035488235475000004, default = "ml", link = "Beverage can#Standard sizes", }, ["-12USozserve"] = { name1_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz serving", symbol = "12&nbsp;US&nbsp;fl&nbsp;oz serving", sym_us = "12&nbsp;U.S.&nbsp;fl&nbsp;oz serving", utype = "volume", scale = 0.00035488235475000004, default = "mL", link = "Beverage can#Standard sizes", }, ["acre-foot"] = { name1 = "acre-foot", name2 = "acre-foot", symbol = "acre⋅ft", utype = "volume", scale = 1233.48183754752, default = "m3", }, ["acre-ft"] = { name1 = "acre-foot", name2 = "acre-feet", symbol = "acre⋅ft", utype = "volume", scale = 1233.48183754752, default = "m3", }, ["AUtbsp"] = { name1 = "Australian tablespoon", symbol = "AU&nbsp;tbsp", utype = "volume", scale = 0.000020, default = "ml", }, ["Bcuft"] = { name1 = "billion cubic foot", name2 = "billion cubic feet", symbol = "billion cu&nbsp;ft", utype = "volume", scale = 28316846.592, default = "Gl", link = "Cubic foot", }, ["bdft"] = { name1 = "board foot", name2 = "board feet", symbol = "bd&nbsp;ft", utype = "volume", scale = 0.0023597372167, default = "m3", }, ["board feet"] = { name2 = "board feet", symbol = "board foot", usename = 1, utype = "volume", scale = 0.0023597372167, default = "m3", }, ["board foot"] = { name2 = "board foot", symbol = "board foot", usename = 1, utype = "volume", scale = 0.0023597372167, default = "m3", }, ["cc"] = { name1 = "cubic centimetre", name1_us = "cubic centimeter", symbol = "cc", utype = "volume", scale = 0.000001, default = "cuin", }, ["CID"] = { name1 = "cubic inch", name2 = "cubic inches", symbol = "cu&nbsp;in", utype = "volume", scale = 0.000016387064, default = "cc", link = "Cubic inch#Engine displacement", }, ["cord"] = { symbol = "cord", utype = "volume", scale = 3.624556363776, default = "m3", link = "Cord (unit)", }, ["cufoot"] = { name1 = "cubic foot", name2 = "cubic foot", symbol = "cu&nbsp;ft", utype = "volume", scale = 0.028316846592, default = "m3", }, ["cuft"] = { name1 = "cubic foot", name2 = "cubic feet", symbol = "cu&nbsp;ft", utype = "volume", scale = 0.028316846592, default = "m3", }, ["cuin"] = { name1 = "cubic inch", name2 = "cubic inches", symbol = "cu&nbsp;in", utype = "volume", scale = 0.000016387064, default = "cm3", }, ["cumi"] = { name1 = "cubic mile", symbol = "cu&nbsp;mi", utype = "volume", scale = 4168181825.440579584, default = "km3", }, ["cuyd"] = { name1 = "cubic yard", symbol = "cu&nbsp;yd", utype = "volume", scale = 0.764554857984, default = "m3", }, ["firkin"] = { symbol = "firkin", usename = 1, utype = "volume", scale = 0.04091481, default = "L impgal USgal", link = "Firkin (unit)", }, ["foot3"] = { target = "cufoot", }, ["Goilbbl"] = { name1 = "billion barrels", name2 = "billion barrels", symbol = "Gbbl", utype = "volume", scale = 158987294.928, default = "v * 1.58987294928 < 10 ! e6 ! e9 ! m3", link = "Barrel (unit)#Oil barrel", }, ["gr water"] = { name1 = "grains water", name2 = "grains water", symbol = "gr H<sub>2</sub>O", utype = "volume", scale = 0.00000006479891, default = "cm3", link = "Grain (unit)", }, ["grt"] = { name1 = "gross register ton", symbol = "grt", utype = "volume", scale = 2.8316846592, default = "m3", link = "Gross register tonnage", }, ["impbbl"] = { name1 = "imperial barrel", symbol = "imp&nbsp;bbl", utype = "volume", scale = 0.16365924, default = "L impgal USgal", link = "Barrel (unit)", }, ["impbsh"] = { name1 = "imperial bushel", symbol = "imp&nbsp;bsh", utype = "volume", scale = 0.03636872, default = "L impgal USdrygal", }, ["impbu"] = { name1 = "imperial bushel", symbol = "imp&nbsp;bu", utype = "volume", scale = 0.03636872, default = "m3", }, ["impgal"] = { name1 = "imperial gallon", symbol = "imp&nbsp;gal", utype = "volume", scale = 0.00454609, default = "L USgal", }, ["impgi"] = { name1 = "gill", symbol = "gi", utype = "volume", scale = 0.0001420653125, default = "ml USoz", link = "Gill (unit)", }, ["impkenning"] = { name1 = "imperial kenning", symbol = "kenning", utype = "volume", scale = 0.01818436, default = "L USdrygal", link = "Kenning (unit)", }, ["impoz"] = { name1 = "imperial fluid ounce", symbol = "imp&nbsp;fl&nbsp;oz", utype = "volume", scale = 0.0000284130625, default = "ml USoz", }, ["imppk"] = { name1 = "imperial peck", symbol = "pk", utype = "volume", scale = 0.00909218, default = "L USdrygal", link = "Peck", }, ["imppt"] = { name1 = "imperial pint", symbol = "imp&nbsp;pt", utype = "volume", scale = 0.00056826125, default = "L", }, ["impqt"] = { name1 = "imperial quart", symbol = "imp&nbsp;qt", utype = "volume", scale = 0.0011365225, default = "ml USoz", customary= 3, }, ["kilderkin"] = { symbol = "kilderkin", usename = 1, utype = "volume", scale = 0.08182962, default = "L impgal USgal", }, ["koilbbl"] = { name1 = "thousand barrels", name2 = "thousand barrels", symbol = "kbbl", utype = "volume", scale = 158.987294928, default = "v * 1.58987294928 < 10 ! ! e3 ! m3", link = "Barrel (unit)#Oil barrel", }, ["L"] = { _name1 = "litre", _name1_us= "liter", _symbol = "L", utype = "volume", scale = 0.001, prefixes = 1, default = "impgal USgal", link = "Litre", }, ["l"] = { _name1 = "litre", _name1_us= "liter", _symbol = "l", utype = "volume", scale = 0.001, prefixes = 1, default = "impgal USgal", link = "Litre", }, ["ll"] = { name1 = "litre", name1_us = "liter", symbol = "l", utype = "volume", scale = 0.001, default = "impgal USgal", }, ["m3"] = { _name1 = "cubic metre", _name1_us= "cubic meter", _symbol = "m<sup>3</sup>", prefix_position= 7, utype = "volume", scale = 1, prefixes = 3, default = "cuft", link = "Cubic metre", }, ["Mbbl"] = { name1 = "thousand barrels", name2 = "thousand barrels", symbol = "Mbbl", utype = "volume", scale = 158.987294928, default = "v * 1.58987294928 < 10 ! e3 ! ! m3", link = "Barrel (unit)#Oil barrel", }, ["MMoilbbl"] = { name1 = "million barrels", name2 = "million barrels", symbol = "MMbbl", utype = "volume", scale = 158987.294928, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3", link = "Barrel (unit)#Oil barrel", }, ["Moilbbl"] = { name1 = "million barrels", name2 = "million barrels", symbol = "Mbbl", utype = "volume", scale = 158987.294928, default = "v * 1.58987294928 < 10 ! e3 ! e6 ! m3", link = "Barrel (unit)#Oil barrel", }, ["MTON"] = { name1 = "measurement ton", symbol = "MTON", utype = "volume", scale = 1.13267386368, default = "m3", }, ["MUSgal"] = { name1 = "million US gallons", name1_us = "million U.S. gallons", name2 = "million US gallons", name2_us = "million U.S. gallons", symbol = "million US&nbsp;gal", sym_us = "million U.S.&nbsp;gal", utype = "volume", scale = 3785.411784, default = "Ml", link = "US gallon", }, ["oilbbl"] = { name1 = "barrel", symbol = "bbl", utype = "volume", scale = 0.158987294928, default = "m3", link = "Barrel (unit)#Oil barrel", }, ["stere"] = { symbol = "stere", usename = 1, utype = "volume", scale = 1, default = "cuft", }, ["Toilbbl"] = { name1 = "trillion barrels", name2 = "trillion barrels", symbol = "Tbbl", utype = "volume", scale = 158987294928, default = "v * 1.58987294928 < 10 ! e9 ! e12 ! m3", link = "Barrel (unit)#Oil barrel", }, ["USbbl"] = { name1 = "US barrel", name1_us = "U.S. barrel", symbol = "US&nbsp;bbl", sym_us = "U.S.&nbsp;bbl", utype = "volume", scale = 0.119240471196, default = "L USgal impgal", link = "Barrel (unit)", }, ["USbeerbbl"] = { name1 = "US beer barrel", name1_us = "U.S. beer barrel", symbol = "US&nbsp;bbl", sym_us = "U.S.&nbsp;bbl", utype = "volume", scale = 0.117347765304, default = "L USgal impgal", link = "Barrel (unit)", }, ["USbsh"] = { name1 = "US bushel", name1_us = "U.S. bushel", symbol = "US&nbsp;bsh", sym_us = "U.S.&nbsp;bsh", utype = "volume", scale = 0.03523907016688, default = "L USdrygal impgal", link = "Bushel", }, ["USbu"] = { name1 = "US bushel", name1_us = "U.S. bushel", symbol = "US&nbsp;bu", sym_us = "U.S.&nbsp;bu", utype = "volume", scale = 0.03523907016688, default = "L USdrygal impgal", link = "Bushel", }, ["USdrybbl"] = { name1 = "US dry barrel", name1_us = "U.S. dry barrel", symbol = "US&nbsp;dry&nbsp;bbl", sym_us = "U.S.&nbsp;dry&nbsp;bbl", utype = "volume", scale = 0.11562819898508, default = "m3", link = "Barrel (unit)", }, ["USdrygal"] = { name1 = "US dry gallon", name1_us = "U.S. dry gallon", symbol = "US&nbsp;dry&nbsp;gal", sym_us = "U.S.&nbsp;dry&nbsp;gal", utype = "volume", scale = 0.00440488377086, default = "L", link = "Gallon", }, ["USdrypt"] = { name1 = "US dry pint", name1_us = "U.S. dry pint", symbol = "US&nbsp;dry&nbsp;pt", sym_us = "U.S.&nbsp;dry&nbsp;pt", utype = "volume", scale = 0.0005506104713575, default = "ml", link = "Pint", }, ["USdryqt"] = { name1 = "US dry quart", name1_us = "U.S. dry quart", symbol = "US&nbsp;dry&nbsp;qt", sym_us = "U.S.&nbsp;dry&nbsp;qt", utype = "volume", scale = 0.001101220942715, default = "ml", link = "Quart", }, ["USflgal"] = { name1 = "US gallon", name1_us = "U.S. gallon", symbol = "US fl gal", sym_us = "U.S.&nbsp;fl&nbsp;gal", utype = "volume", scale = 0.003785411784, default = "L impgal", link = "Gallon", }, ["USgal"] = { name1 = "US gallon", name1_us = "U.S. gallon", symbol = "US&nbsp;gal", sym_us = "U.S.&nbsp;gal", utype = "volume", scale = 0.003785411784, default = "L impgal", }, ["USgi"] = { name1 = "gill", symbol = "gi", utype = "volume", scale = 0.0001182941183, default = "ml impoz", link = "Gill (unit)", }, ["USkenning"] = { name1 = "US kenning", name1_us = "U.S. kenning", symbol = "US&nbsp;kenning", sym_us = "U.S.&nbsp;kenning", utype = "volume", scale = 0.01761953508344, default = "L impgal", link = "Kenning (unit)", }, ["USmin"] = { name1 = "US minim", name1_us = "U.S. minim", symbol = "US&nbsp;min", sym_us = "U.S.&nbsp;min", utype = "volume", scale = 0.000000061611519921875, default = "ml", link = "Minim (unit)", }, ["USoz"] = { name1 = "US fluid ounce", name1_us = "U.S. fluid ounce", symbol = "US&nbsp;fl&nbsp;oz", sym_us = "U.S.&nbsp;fl&nbsp;oz", utype = "volume", scale = 0.0000295735295625, default = "ml", }, ["USpk"] = { name1 = "US peck", name1_us = "U.S. peck", symbol = "US&nbsp;pk", sym_us = "U.S.&nbsp;pk", utype = "volume", scale = 0.00880976754172, default = "L impgal", link = "Peck", }, ["USpt"] = { name1 = "US pint", name1_us = "U.S. pint", symbol = "US&nbsp;pt", sym_us = "U.S.&nbsp;pt", utype = "volume", scale = 0.000473176473, default = "L imppt", link = "Pint", }, ["USqt"] = { name1 = "US quart", name1_us = "U.S. quart", symbol = "US&nbsp;qt", sym_us = "U.S.&nbsp;qt", utype = "volume", scale = 0.000946352946, default = "ml", link = "Quart", customary= 1, }, ["USquart"] = { name1 = "US quart", name1_us = "U.S. quart", symbol = "US&nbsp;qt", sym_us = "U.S.&nbsp;qt", utype = "volume", scale = 0.000946352946, default = "ml impoz", link = "Quart", }, ["UStbsp"] = { name1 = "US tablespoon", name1_us = "U.S. tablespoon", symbol = "US&nbsp;tbsp", sym_us = "U.S.&nbsp;tbsp", utype = "volume", scale = 1.4786764781250001e-5, default = "ml", }, ["winecase"] = { symbol = "case", usename = 1, utype = "volume", scale = 0.009, default = "L", link = "Case (goods)", }, ["*U.S.drygal"] = { target = "USdrygal", sp_us = true, customary= 2, }, ["*U.S.gal"] = { target = "USgal", sp_us = true, customary= 2, }, ["+USdrygal"] = { target = "USdrygal", customary= 1, }, ["+usfloz"] = { target = "USoz", link = "Fluid ounce", customary= 1, }, ["+USgal"] = { target = "USgal", customary= 1, }, ["+USoz"] = { target = "USoz", customary= 1, }, ["@impgal"] = { target = "impgal", link = "Gallon", customary= 3, }, ["acre feet"] = { target = "acre-ft", }, ["acre foot"] = { target = "acre-foot", }, ["acre ft"] = { target = "acre-ft", }, ["acre-feet"] = { target = "acre-ft", }, ["acre.foot"] = { target = "acre-foot", }, ["acre.ft"] = { target = "acre-ft", }, ["acre·ft"] = { target = "acre-ft", }, ["bushels"] = { target = "USbsh", }, ["cid"] = { target = "CID", }, ["ft3"] = { target = "cuft", }, ["gal"] = { target = "USgal", }, ["gallon"] = { shouldbe = "Use %{USgal%} for US gallons or %{impgal%} for imperial gallons (not %{gallon%})", }, ["gallons"] = { shouldbe = "Use %{USgal%} for US gallons or %{impgal%} for imperial gallons (not %{gallons%})", }, ["Gcuft"] = { target = "e9cuft", }, ["impfloz"] = { target = "impoz", }, ["Impgal"] = { target = "impgal", }, ["in3"] = { target = "cuin", symbol = "in<sup>3</sup>", }, ["hm³"] = { target = "hm3", }, ["kcuft"] = { target = "e3cuft", }, ["kcum"] = { target = "e3m3", }, ["km³"] = { target = "km3", }, ["liter"] = { target = "L", sp_us = true, }, ["liters"] = { target = "L", sp_us = true, }, ["litre"] = { target = "L", }, ["litres"] = { target = "L", }, ["Mcuft"] = { target = "e6cuft", }, ["Mcum"] = { target = "e6m3", }, ["Mft3"] = { target = "e6cuft", }, ["mi3"] = { target = "cumi", }, ["m³"] = { target = "m3", }, ["Pcuft"] = { target = "e15cuft", }, ["pt"] = { shouldbe = "Use %{USpt%} for US pints or %{imppt%} for imperial pints (not %{pt%})", }, ["qt"] = { shouldbe = "Use %{USqt%} for US quarts or %{impqt%} for imperial quarts (not %{qt%})", }, ["Tcuft"] = { target = "e12cuft", }, ["Tft3"] = { target = "e12cuft", }, ["U.S.bbl"] = { target = "USbbl", sp_us = true, default = "L U.S.gal impgal", }, ["U.S.beerbbl"] = { target = "USbeerbbl", sp_us = true, default = "L U.S.gal impgal", }, ["U.S.bsh"] = { target = "USbsh", sp_us = true, default = "L U.S.drygal impgal", }, ["U.S.bu"] = { target = "USbu", sp_us = true, default = "L U.S.drygal impgal", }, ["U.S.drybbl"] = { target = "USdrybbl", sp_us = true, }, ["U.S.drygal"] = { target = "USdrygal", sp_us = true, }, ["U.S.drypt"] = { target = "USdrypt", sp_us = true, }, ["U.S.dryqt"] = { target = "USdryqt", sp_us = true, }, ["U.S.flgal"] = { target = "USflgal", sp_us = true, }, ["U.S.floz"] = { target = "USoz", sp_us = true, }, ["U.S.gal"] = { target = "USgal", sp_us = true, link = "U.S. gallon", }, ["u.s.gal"] = { target = "USgal", sp_us = true, link = "U.S. gallon", }, ["U.S.gi"] = { target = "USgi", sp_us = true, }, ["U.S.kenning"] = { target = "USkenning", sp_us = true, }, ["U.S.oz"] = { target = "USoz", sp_us = true, }, ["U.S.pk"] = { target = "USpk", sp_us = true, }, ["U.S.pt"] = { target = "USpt", sp_us = true, }, ["U.S.qt"] = { target = "USqt", sp_us = true, default = "L impqt", customary= 2, }, ["usbbl"] = { target = "USbbl", }, ["usbeerbbl"] = { target = "USbeerbbl", }, ["usbsh"] = { target = "USbsh", }, ["usbu"] = { target = "USbu", }, ["usdrybbl"] = { target = "USdrybbl", }, ["usdrygal"] = { target = "USdrygal", }, ["usdrypt"] = { target = "USdrypt", }, ["usdryqt"] = { target = "USdryqt", }, ["USfloz"] = { target = "USoz", }, ["usfloz"] = { target = "USoz", }, ["USGAL"] = { target = "USgal", }, ["usgal"] = { target = "USgal", }, ["usgi"] = { target = "USgi", }, ["uskenning"] = { target = "USkenning", }, ["usoz"] = { target = "USoz", }, ["uspk"] = { target = "USpk", }, ["uspt"] = { target = "USpt", }, ["usqt"] = { target = "USqt", }, ["yd3"] = { target = "cuyd", }, ["cuft/sqmi"] = { per = { "cuft", "sqmi" }, utype = "volume per unit area", default = "m3/km2", }, ["m3/ha"] = { name1 = "cubic metre per hectare", name1_us = "cubic meter per hectare", name2 = "cubic metres per hectare", name2_us = "cubic meters per hectare", symbol = "m<sup>3</sup>/ha", utype = "volume per unit area", scale = 0.0001, default = "USbu/acre", link = "Hectare", }, ["m3/km2"] = { per = { "m3", "km2" }, utype = "volume per unit area", default = "cuft/sqmi", }, ["U.S.gal/acre"] = { per = { "U.S.gal", "acre" }, utype = "volume per unit area", default = "m3/km2", }, ["USbu/acre"] = { name2 = "US bushels per acre", symbol = "US bushel per acre", usename = 1, utype = "volume per unit area", scale = 8.7077638761350888e-6, default = "m3/ha", link = "Bushel", }, ["USgal/acre"] = { per = { "USgal", "acre" }, utype = "volume per unit area", default = "m3/km2", }, ["cuyd/mi"] = { per = { "cuyd", "mi" }, utype = "volume per unit length", default = "m3/km", }, ["m3/km"] = { per = { "m3", "km" }, utype = "volume per unit length", default = "cuyd/mi", }, ["mich"] = { combination= { "ch", "mi" }, multiple = { 80 }, utype = "length", }, ["michlk"] = { combination= { "chlk", "mi" }, multiple = { 80 }, utype = "length", }, ["michainlk"] = { combination= { "chainlk", "mi" }, multiple = { 80 }, utype = "length", }, ["miyd"] = { combination= { "yd", "mi" }, multiple = { 1760 }, utype = "length", }, ["miydftin"] = { combination= { "in", "ft", "yd", "mi" }, multiple = { 12, 3, 1760 }, utype = "length", }, ["mift"] = { combination= { "ft", "mi" }, multiple = { 5280 }, utype = "length", }, ["ydftin"] = { combination= { "in", "ft", "yd" }, multiple = { 12, 3 }, utype = "length", }, ["ydft"] = { combination= { "ft", "yd" }, multiple = { 3 }, utype = "length", }, ["ftin"] = { combination= { "in", "ft" }, multiple = { 12 }, utype = "length", }, ["footin"] = { combination= { "in", "foot" }, multiple = { 12 }, utype = "length", }, ["handin"] = { combination= { "in", "hand" }, multiple = { 4 }, utype = "length", }, ["lboz"] = { combination= { "oz", "lb" }, multiple = { 16 }, utype = "mass", }, ["stlb"] = { combination= { "lb", "st" }, multiple = { 14 }, utype = "mass", }, ["stlboz"] = { combination= { "oz", "lb", "st" }, multiple = { 16, 14 }, utype = "mass", }, ["st and lb"] = { combination= { "lb", "st" }, multiple = { 14 }, utype = "mass", }, ["GN LTf"] = { combination= { "GN", "-LTf" }, utype = "force", }, ["GN LTf STf"] = { combination= { "GN", "-LTf", "-STf" }, utype = "force", }, ["GN STf"] = { combination= { "GN", "-STf" }, utype = "force", }, ["GN STf LTf"] = { combination= { "GN", "-STf", "-LTf" }, utype = "force", }, ["kN LTf"] = { combination= { "kN", "-LTf" }, utype = "force", }, ["kN LTf STf"] = { combination= { "kN", "-LTf", "-STf" }, utype = "force", }, ["kN STf"] = { combination= { "kN", "-STf" }, utype = "force", }, ["kN STf LTf"] = { combination= { "kN", "-STf", "-LTf" }, utype = "force", }, ["LTf STf"] = { combination= { "-LTf", "-STf" }, utype = "force", }, ["MN LTf"] = { combination= { "MN", "-LTf" }, utype = "force", }, ["MN LTf STf"] = { combination= { "MN", "-LTf", "-STf" }, utype = "force", }, ["MN STf"] = { combination= { "MN", "-STf" }, utype = "force", }, ["MN STf LTf"] = { combination= { "MN", "-STf", "-LTf" }, utype = "force", }, ["STf LTf"] = { combination= { "-STf", "-LTf" }, utype = "force", }, ["L/100 km mpgimp"] = { combination= { "L/100 km", "mpgimp" }, utype = "fuel efficiency", }, ["l/100 km mpgimp"] = { combination= { "l/100 km", "mpgimp" }, utype = "fuel efficiency", }, ["L/100 km mpgUS"] = { combination= { "L/100 km", "mpgus" }, utype = "fuel efficiency", }, ["L/100 km mpgus"] = { combination= { "L/100 km", "mpgus" }, utype = "fuel efficiency", }, ["l/100 km mpgus"] = { combination= { "l/100 km", "mpgus" }, utype = "fuel efficiency", }, ["mpgimp L/100 km"] = { combination= { "mpgimp", "L/100 km" }, utype = "fuel efficiency", }, ["LT ST t"] = { combination= { "lt", "-ST", "t" }, utype = "mass", }, ["LT t ST"] = { combination= { "lt", "t", "-ST" }, utype = "mass", }, ["ST LT t"] = { combination= { "-ST", "lt", "t" }, utype = "mass", }, ["ST t LT"] = { combination= { "-ST", "t", "lt" }, utype = "mass", }, ["t LT ST"] = { combination= { "t", "lt", "-ST" }, utype = "mass", }, ["ton"] = { combination= { "LT", "ST" }, utype = "mass", }, ["kPa kg/cm2"] = { combination= { "kPa", "kgf/cm2" }, utype = "pressure", }, ["kPa lb/in2"] = { combination= { "kPa", "-lb/in2" }, utype = "pressure", }, ["floz"] = { combination= { "impoz", "USoz" }, utype = "volume", }, } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local default_exceptions = { -- Prefixed units with a default different from that of the base unit. -- Each key item is a prefixed symbol (unitcode for engineering notation). ["cm<sup>2</sup>"] = "sqin", ["dm<sup>2</sup>"] = "sqin", ["e3acre"] = "km2", ["e3m2"] = "e6sqft", ["e6acre"] = "km2", ["e6ha"] = "e6acre", ["e6km2"] = "e6sqmi", ["e6m2"] = "e6sqft", ["e6sqft"] = "v * 9.290304 < 100 ! e3 ! e6 ! m2", ["e6sqmi"] = "e6km2", ["hm<sup>2</sup>"] = "acre", ["km<sup>2</sup>"] = "sqmi", ["mm<sup>2</sup>"] = "sqin", ["aJ"] = "eV", ["e3BTU"] = "MJ", ["e6BTU"] = "GJ", ["EJ"] = "kWh", ["fJ"] = "keV", ["GJ"] = "kWh", ["MJ"] = "kWh", ["PJ"] = "kWh", ["pJ"] = "MeV", ["TJ"] = "kWh", ["YJ"] = "kWh", ["yJ"] = "μeV", ["ZJ"] = "kWh", ["zJ"] = "meV", ["e12cuft/a"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3/a", ["e12cuft/d"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3/d", ["e12m3/a"] = "Tcuft/a", ["e12m3/d"] = "Tcuft/d", ["e3cuft/a"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/a", ["e3cuft/d"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/d", ["e3cuft/s"] = "v * 2.8316846592 < 100 ! ! e3 ! m3/s", ["e3m3/a"] = "v < 28.316846592 ! k ! M ! cuft/a", ["e3m3/d"] = "v < 28.316846592 ! k ! M ! cuft/d", ["e3m3/s"] = "v < 28.316846592 ! k ! M ! cuft/s", ["e3USgal/a"] = "v * 3.785411784 < 1000 ! ! e3 ! m3/a", ["e6cuft/a"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/a", ["e6cuft/d"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/d", ["e6cuft/s"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3/s", ["e6m3/a"] = "v < 28.316846592 ! M ! G ! cuft/a", ["e6m3/d"] = "v < 28.316846592 ! M ! G ! cuft/d", ["e6m3/s"] = "v < 28.316846592 ! e6 ! e9 ! cuft/s", ["e6USgal/a"] = "v * 3.785411784 < 1000 ! e3 ! e6 ! m3/a", ["e9cuft/a"] = "m3/a", ["e9cuft/d"] = "v * 2.8316846592 < 100 ! e6 ! e9 ! m3/d", ["e9m3/a"] = "v < 28.316846592 ! G ! T ! cuft/a", ["e9m3/d"] = "v < 28.316846592 ! G ! T ! cuft/d", ["e9m3/s"] = "v < 28.316846592 ! e9 ! e12 ! cuft/s", ["e9USgal/a"] = "v * 3.785411784 < 1000 ! e6 ! e9 ! m3/a", ["e9USgal/s"] = "v * 3.785411784 < 1000 ! e6 ! e9 ! m3/s", ["nN"] = "gr-f", ["μN"] = "gr-f", ["mN"] = "oz-f", ["am"] = "in", ["cm"] = "in", ["dam"] = "ft", ["dm"] = "in", ["e12km"] = "e12mi", ["e12mi"] = "e12km", ["e3AU"] = "ly", ["e3km"] = "e3mi", ["e3mi"] = "e3km", ["e6km"] = "e6mi", ["e6mi"] = "e6km", ["e9km"] = "AU", ["e9mi"] = "e9km", ["Em"] = "mi", ["fm"] = "in", ["Gm"] = "mi", ["hm"] = "ft", ["km"] = "mi", ["mm"] = "in", ["Mm"] = "mi", ["nm"] = "in", ["Pm"] = "mi", ["pm"] = "in", ["Tm"] = "mi", ["Ym"] = "mi", ["ym"] = "in", ["Zm"] = "mi", ["zm"] = "in", ["μm"] = "in", ["e12lb"] = "v * 4.5359237 < 10 ! Mt ! Gt", ["e3lb"] = "v * 4.5359237 < 10 ! kg ! t", ["e3ozt"] = "v * 0.311034768 < 10 ! kg ! t", ["e3t"] = "LT ST", ["e6carat"] = "t", ["e6lb"] = "v * 4.5359237 < 10 ! t ! kilotonne", ["e6ozt"] = "lb kg", ["e6ST"] = "Mt", ["e6t"] = "LT ST", ["e9lb"] = "v * 4.5359237 < 10 ! kilotonne ! Mt", ["e9t"] = "LT ST", ["Gg"] = "lb", ["kg"] = "lb", ["mg"] = "gr", ["Mg"] = "LT ST", ["ng"] = "gr", ["μg"] = "gr", ["mBq"] = "fCi", ["kBq"] = "nCi", ["MBq"] = "μCi", ["GBq"] = "mCi", ["TBq"] = "Ci", ["PBq"] = "kCi", ["EBq"] = "kCi", ["fCi"] = "mBq", ["pCi"] = "Bq", ["nCi"] = "Bq", ["μCi"] = "kBq", ["mCi"] = "MBq", ["kCi"] = "TBq", ["MCi"] = "PBq", ["ns"] = "μs", ["μs"] = "ms", ["ms"] = "s", ["ks"] = "h", ["Ms"] = "week", ["Gs"] = "decade", ["Ts"] = "millennium", ["Ps"] = "million year", ["Es"] = "thousand million year", ["MK"] = "keVT", ["cL"] = "impoz usoz", ["cl"] = "impoz usoz", ["cm<sup>3</sup>"] = "cuin", ["dL"] = "impoz usoz", ["dl"] = "impoz usoz", ["mm<sup>3</sup>"] = "cuin", ["dm<sup>3</sup>"] = "cuin", ["e12cuft"] = "v * 2.8316846592 < 100 ! e9 ! e12 ! m3", ["e12impgal"] = "v * 4.54609 < 1000 ! T ! P ! l", ["e12m3"] = "v < 28.316846592 ! T ! P ! cuft", ["e12U.S.gal"] = "v * 3.785411784 < 1000 ! T ! P ! l", ["e12USgal"] = "v * 3.785411784 < 1000 ! T ! P ! l", ["e15cuft"] = "v * 2.8316846592 < 100 ! e12 ! e15 ! m3", ["e15m3"] = "Pcuft", ["e3bdft"] = "v * 0.23597372167 < 100 ! e3 ! e6 ! m3", ["e3cuft"] = "v * 2.8316846592 < 100 ! ! e3 ! m3", ["e3impgal"] = "v * 4.54609 < 1000 ! k ! M ! l", ["e3m3"] = "v < 28.316846592 ! k ! M ! cuft", ["e3U.S.gal"] = "v * 3.785411784 < 1000 ! k ! M ! l", ["e3USgal"] = "v * 3.785411784 < 1000 ! k ! M ! l", ["e6bdft"] = "v * 0.23597372167 < 100 ! e3 ! e6 ! m3", ["e6cuft"] = "v * 2.8316846592 < 100 ! e3 ! e6 ! m3", ["e6cuyd"] = "v * 7.64554857984 < 10 ! e3 ! e6 ! m3", ["e6impgal"] = "v * 4.54609 < 1000 ! M ! G ! l", ["e6L"] = "USgal", ["e6m3"] = "v < 28.316846592 ! M ! G ! cuft", ["e6U.S.gal"] = "v * 3.785411784 < 1000 ! M ! G ! l", ["e6USgal"] = "v * 3.785411784 < 1000 ! M ! G ! l", ["e9bdft"] = "v * 0.23597372167 < 100 ! e6 ! e9 ! m3", ["e9cuft"] = "v * 2.8316846592 < 100 ! e6 ! e9 ! m3", ["e9impgal"] = "v * 4.54609 < 1000 ! G ! T ! l", ["e9m3"] = "v < 28.316846592 ! G ! T ! cuft", ["e9U.S.gal"] = "v * 3.785411784 < 1000 ! G ! T ! l", ["e9USgal"] = "v * 3.785411784 < 1000 ! G ! T ! l", ["GL"] = "cuft", ["Gl"] = "cuft", ["kL"] = "cuft", ["kl"] = "cuft", ["km<sup>3</sup>"] = "cumi", ["mL"] = "impoz usoz", ["ml"] = "impoz usoz", ["Ml"] = "v < 28.316846592 ! e3 ! e6 ! cuft", ["ML"] = "v < 28.316846592 ! e3 ! e6 ! cuft", ["TL"] = "cumi", ["Tl"] = "cumi", ["μL"] = "cuin", ["μl"] = "cuin", } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local link_exceptions = { -- Prefixed units with a linked article different from that of the base unit. -- Each key item is a prefixed symbol (not unitcode). ["mm<sup>2</sup>"] = "Square millimetre", ["cm<sup>2</sup>"] = "Square centimetre", ["dm<sup>2</sup>"] = "Square decimetre", ["km<sup>2</sup>"] = "Square kilometre", ["kJ"] = "Kilojoule", ["MJ"] = "Megajoule", ["GJ"] = "Gigajoule", ["TJ"] = "Terajoule", ["fm"] = "Femtometre", ["pm"] = "Picometre", ["nm"] = "Nanometre", ["μm"] = "Micrometre", ["mm"] = "Millimetre", ["cm"] = "Centimetre", ["dm"] = "Decimetre", ["dam"] = "Decametre", ["hm"] = "Hectometre", ["km"] = "Kilometre", ["Mm"] = "Megametre", ["Gm"] = "Gigametre", ["Tm"] = "Terametre", ["Pm"] = "Petametre", ["Em"] = "Exametre", ["Zm"] = "Zettametre", ["Ym"] = "Yottametre", ["μg"] = "Microgram", ["mg"] = "Milligram", ["kg"] = "Kilogram", ["Mg"] = "Tonne", ["yW"] = "Yoctowatt", ["zW"] = "Zeptowatt", ["aW"] = "Attowatt", ["fW"] = "Femtowatt", ["pW"] = "Picowatt", ["nW"] = "Nanowatt", ["μW"] = "Microwatt", ["mW"] = "Milliwatt", ["kW"] = "Kilowatt", ["MW"] = "Megawatt", ["GW"] = "Gigawatt", ["TW"] = "Terawatt", ["PW"] = "Petawatt", ["EW"] = "Exawatt", ["ZW"] = "Zettawatt", ["YW"] = "Yottawatt", ["as"] = "Attosecond", ["fs"] = "Femtosecond", ["ps"] = "Picosecond", ["ns"] = "Nanosecond", ["μs"] = "Microsecond", ["ms"] = "Millisecond", ["ks"] = "Kilosecond", ["Ms"] = "Megasecond", ["Gs"] = "Gigasecond", ["Ts"] = "Terasecond", ["Ps"] = "Petasecond", ["Es"] = "Exasecond", ["Zs"] = "Zettasecond", ["Ys"] = "Yottasecond", ["mm<sup>3</sup>"] = "Cubic millimetre", ["cm<sup>3</sup>"] = "Cubic centimetre", ["dm<sup>3</sup>"] = "Cubic decimetre", ["dam<sup>3</sup>"] = "Cubic decametre", ["km<sup>3</sup>"] = "Cubic kilometre", ["μL"] = "Microlitre", ["μl"] = "Microlitre", ["mL"] = "Millilitre", ["ml"] = "Millilitre", ["cL"] = "Centilitre", ["cl"] = "Centilitre", ["dL"] = "Decilitre", ["dl"] = "Decilitre", ["daL"] = "Decalitre", ["dal"] = "Decalitre", ["hL"] = "Hectolitre", ["hl"] = "Hectolitre", ["kL"] = "Kilolitre", ["kl"] = "Kilolitre", ["ML"] = "Megalitre", ["Ml"] = "Megalitre", ["GL"] = "Gigalitre", ["Gl"] = "Gigalitre", ["TL"] = "Teralitre", ["Tl"] = "Teralitre", ["PL"] = "Petalitre", ["Pl"] = "Petalitre", } --------------------------------------------------------------------------- -- Do not change the data in this table because it is created by running -- -- a script that reads the wikitext from a wiki page (see note above). -- --------------------------------------------------------------------------- local per_unit_fixups = { -- Automatically created per units of form "x/y" may have their unit type -- changed, for example, "length/time" is changed to "speed". -- Other adjustments can also be specified. ["/area"] = "per unit area", ["/volume"] = "per unit volume", ["area/area"] = "area per unit area", ["energy/length"] = "energy per unit length", ["energy/mass"] = "energy per unit mass", ["energy/time"] = { utype = "power", link = "Power (physics)" }, ["energy/volume"] = "energy per unit volume", ["force/area"] = { utype = "pressure", link = "Pressure" }, ["length/length"] = { utype = "gradient", link = "Grade (slope)" }, ["length/time"] = { utype = "speed", link = "Speed" }, ["length/time/time"] = { utype = "acceleration", link = "Acceleration" }, ["mass/area"] = { utype = "pressure", multiplier = 9.80665 }, ["mass/length"] = "linear density", ["mass/mass"] = "concentration", ["mass/power"] = "mass per unit power", ["mass/time"] = "mass per unit time", ["mass/volume"] = { utype = "density", link = "Density" }, ["power/mass"] = "power per unit mass", ["power/volume"] = { link = "Power density" }, ["pressure/length"] = "fracture gradient", ["speed/time"] = { utype = "acceleration", link = "Acceleration" }, ["volume/area"] = "volume per unit area", ["volume/length"] = "volume per unit length", ["volume/time"] = "flow", } return { all_units = all_units, default_exceptions = default_exceptions, link_exceptions = link_exceptions, per_unit_fixups = per_unit_fixups, } 8d4f7e3d03f55a7683bae4e0b800b77ac91d44a2 Module:Convert/text 828 585 1159 1158 2023-06-23T00:35:00Z Tasha04 2 1 revision imported Scribunto text/plain -- Text used by Module:Convert for enwiki. -- This is a separate module to simplify translation for use on another wiki. -- See [[:en:Template:Convert/Transwiki guide]] if copying to another wiki. -- Some units accept an SI prefix before the unit code, such as "kg" for kilogram. local SIprefixes = { -- The prefix field is what the prefix should be, if different from the prefix used. ['Q'] = { exponent = 30, name = 'quetta', }, ['R'] = { exponent = 27, name = 'ronna', }, ['Y'] = { exponent = 24, name = 'yotta', }, ['Z'] = { exponent = 21, name = 'zetta', }, ['E'] = { exponent = 18, name = 'exa' , }, ['P'] = { exponent = 15, name = 'peta' , }, ['T'] = { exponent = 12, name = 'tera' , }, ['G'] = { exponent = 9, name = 'giga' , }, ['M'] = { exponent = 6, name = 'mega' , }, ['k'] = { exponent = 3, name = 'kilo' , }, ['h'] = { exponent = 2, name = 'hecto', }, ['da']= { exponent = 1, name = 'deca' , name_us = 'deka' }, ['d'] = { exponent = -1, name = 'deci' , }, ['c'] = { exponent = -2, name = 'centi', }, ['m'] = { exponent = -3, name = 'milli', }, ['μ'] = { exponent = -6, name = 'micro', }, -- key = 'GREEK SMALL LETTER MU' (U+03BC) utf-8 CE BC ['µ'] = { exponent = -6, name = 'micro', prefix = 'μ' }, -- key = 'MICRO SIGN' (U+00B5) utf-8 C2 B5 ['u'] = { exponent = -6, name = 'micro', prefix = 'μ' }, -- not an SI prefix, but allow for people typing this ['n'] = { exponent = -9, name = 'nano' , }, ['p'] = { exponent =-12, name = 'pico' , }, ['f'] = { exponent =-15, name = 'femto', }, ['a'] = { exponent =-18, name = 'atto' , }, ['z'] = { exponent =-21, name = 'zepto', }, ['y'] = { exponent =-24, name = 'yocto', }, ['r'] = { exponent =-27, name = 'ronto', }, ['q'] = { exponent =-30, name = 'quecto', }, } -- Some units can be qualified with one of the following prefixes, when linked. local customary_units = { { "US", link = "United States customary units" }, { "U.S.", link = "United States customary units" }, { "imperial", link = "Imperial units" }, { "imp", link = "Imperial units" }, } -- Names when using engineering notation (a prefix of "eN" where N is a number; example "e6km"). -- key = { "name", link = "article title", exponent = numeric_key_value } -- If lk=on and link is defined, the name of the number will appear as a link. local eng_scales = { ["3"] = { "thousand", exponent = 3 }, ["6"] = { "million", exponent = 6 }, ["9"] = { "billion", link = "1000000000 (number)", exponent = 9 }, ["12"] = { "trillion", link = "1000000000000 (number)", exponent = 12 }, ["15"] = { "quadrillion", link = "1000000000000000 (number)", exponent = 15 }, } local all_categories = { unit = "[[Category:Convert errors]]", option = "[[Category:Convert errors]]", warning = '[[Category:Convert invalid options]]', tracking = '[[Category:Convert tracking]]', } -- For some error messages, the following puts the wanted style around -- each unit code marked like '...%{ft%}...'. local unitcode_regex = '%%([{}])' local unitcode_replace = { ['{'] = '"', ['}'] = '"' } -- no longer need the more elaborate substitute used before 2013-09-28 -- All messages that may be displayed if a problem occurs. local all_messages = { -- Message format string: $1=title, $2=text, $3=category, $4=anchor. -- Each displayed message starts with "Convert:" so can easily locate by searching article. cvt_format = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[<i>[[Help:Convert messages#$4|<span title="Convert: $1">convert: $2</span>]]</i>]</sup>$3<span class="error"></span>', cvt_format2 = '<sup class="noprint Inline-Template" style="white-space:nowrap;">[[Help:Convert messages#$4|<span title="Convert: $1">$2</span>]]</sup>$3<span class="error"></span>', cvt_format_preview = '<strong class="error">Error in convert: $1 [[Help:Convert messages#$4|(help)]]</strong>$3', -- Each of following messages is a table: -- { [1] = 'title', -- mouseover title text -- [2] = 'text', -- link text displayed in article -- [3] = 'category key', -- key to lookup category in all_categories -- [4] = 'anchor', -- anchor for link to relevant section on help page -- regex = gsub_regex, -- replace = gsub_table, -- } Mouseover title text Link text CatKey Anchor cvt_bad_input = { 'input "$1" must be a number and unit' , 'invalid input' , 'option', 'invalid_input' }, cvt_bad_num = { 'Value "$1" must be a number' , 'invalid number' , 'option', 'invalid_number' }, cvt_big_prec = { 'Precision "$1" is too large' , 'precision too large' , 'option', 'precision_too_large' }, cvt_invalid_num = { 'Number has overflowed' , 'number overflow' , 'option', 'number_overflow' }, cvt_no_num = { 'Needs the number to be converted' , 'needs a number' , 'option', 'needs_number' }, cvt_no_num2 = { 'Needs another number for a range' , 'needs another number', 'option', 'needs_another_number' }, cvt_bad_altitude = { '"$1" needs an integer' , 'invalid altitude' , 'option', 'invalid_altitude' }, cvt_bad_frac = { '"$1" needs an integer above 1' , 'invalid fraction' , 'option', 'invalid_fraction' }, cvt_bad_prec = { 'Precision "$1" must be an integer' , 'invalid precision' , 'option', 'invalid_precision' }, cvt_bad_sigfig = { '"$1" needs a positive integer' , 'invalid sigfig' , 'option', 'invalid_sigfig' }, cvt_empty_option = { 'Ignored empty option "$1"' , 'empty option' , 'option', 'empty_option' }, cvt_deprecated = { 'Option "$1" is deprecated' , '*' , 'option', 'deprecated_option', format = 'cvt_format2', nowarn = true }, cvt_no_spell = { 'Spelling is not available' , 'bug, ask for help' , 'option', 'ask_for_help' }, cvt_unknown_option = { 'Ignored invalid option "$1"' , 'invalid option' , 'option', 'invalid_option' }, cvt_wd_fail = { 'Unable to access Wikidata' , 'wikidata problem' , 'option', 'wikidata_problem' }, cvt_bad_default = { 'Unit "$1" has an invalid default' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_bad_unit = { 'Unit "$1" is invalid here' , 'unit invalid here' , 'unit' , 'unit_invalid_here' }, cvt_no_default = { 'Unit "$1" has no default output unit' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_no_unit = { 'Needs name of unit' , 'needs unit name' , 'unit' , 'needs_unit_name' }, cvt_unknown = { 'Unit name "$1" is not known' , 'unknown unit' , 'unit' , 'unknown_unit' }, cvt_should_be = { '$1' , 'ambiguous unit' , 'unit' , 'ambiguous_unit', regex = unitcode_regex, replace = unitcode_replace }, cvt_mismatch = { 'Cannot convert "$1" to "$2"' , 'unit mismatch' , 'unit' , 'unit_mismatch' }, cvt_bug_convert = { 'Bug: Cannot convert between specified units', 'bug, ask for help' , 'unit' , 'ask_for_help' }, cvt_lookup = { 'Unit "$1" is incorrectly defined' , 'bug, ask for help' , 'unit' , 'ask_for_help' }, } -- Text to join input value/unit with output value/unit. local disp_joins = { -- [1]=before output, [2]=after output, [3]=between outputs in a combination; default "; " -- [wantname] gives default abbr=off ["or"] = { " or " , "" , " or ", wantname = true }, ["sqbr-sp"] = { " [" , "]" }, ["sqbr-nbsp"] = { "&nbsp;[" , "]" }, ["comma"] = { ", " , "" , ", " }, ["semicolon"] = { "; " , "" }, ["slash-sp"] = { " / " , "" , wantname = true }, ["slash-nbsp"] = { "&nbsp;/ ", "" , wantname = true }, ["slash-nosp"] = { "/" , "" , wantname = true }, ["b"] = { " (" , ")" }, ["(or)"] = { " (" , ")", " or " }, ["br"] = { "<br />" , "" , wantname = true }, ["br()"] = { "<br />(" , ")", wantname = true }, } -- Text to separate values in a range. local range_types = { -- Specifying a table requires either: -- * "off" and "on" values (for "abbr=off" and "abbr=on"), or -- * "input" and "output" values (for LHS and RHS); -- other fields are optional. -- When "adj=on|abbr=off" applies, spaces in range text are replaced with hyphens. -- With "exception = true", that also occurs with "adj=on|abbr=on". -- If "adj" is defined here, that text (unchanged) is used with "adj=on". ["+"] = " + ", [","] = ",&nbsp;", [", and"] = ", and ", [", or"] = ", or ", ["by"] = " by ", ["-"] = "–", ["to about"] = " to about ", ["and"] = { off = " and ", on = " and ", exception = true }, ["and(-)"] = { input = " and ", output = "–" }, ["or"] = { off = " or " , on = " or " , exception = true }, ["to"] = { off = " to " , on = " to " , exception = true }, ["to(-)"] = { input = "&nbsp;to ", output = "–" }, ["+/-"] = { off = "&nbsp;±&nbsp;", on = "&nbsp;±&nbsp;", adj = "&nbsp;±&nbsp;", is_range_change = true }, ["by(x)"] = { input = " by ", output = " ×&nbsp;", out_range_x = true }, ["x"] = { off = " by ", on = " ×&nbsp;", abbr_range_x = true }, ["xx"] = "&nbsp;×&nbsp;", ["*"] = "×", ["/"] = "&thinsp;/&thinsp;", -- for a table of high/low temperatures with {{convert|83|/|63|F|disp=br()|abbr=values}} } local range_aliases = { -- ["alternative name for a range"] = "standard range name" ["–"] = "-", ["&ndash;"] = "-", ["×"] = "x", ["&times;"] = "x", ["±"] = "+/-", ["&plusmn;"] = "+/-", } -- Convert accepts range text delimited with whitespace, for example, {{convert|1 to 2|ft}}. -- In addition, the following "words" are accepted without spaces, for example, {{convert|1-2|ft}}. -- Words must be in correct order for searching, for example, 'x' after 'xx'. local range_words = { '-', '–', 'xx', 'x', '*' } local ranges = { types = range_types, aliases = range_aliases, words = range_words, } -- Valid option names. local en_option_name = { -- ["local text for option name"] = "en name used in this module" ["$"] = "$", ["abbr"] = "abbr", ["adj"] = "adj", ["altitude_ft"] = "altitude_ft", ["altitude_m"] = "altitude_m", ["comma"] = "comma", ["debug"] = "debug", ["disp"] = "disp", ["frac"] = "frac", ["input"] = "input", ["lang"] = "lang", ["lk"] = "lk", ["order"] = "order", ["qid"] = "qid", ["qual"] = "qual", ["qualifier"] = "qual", ["round"] = "round", ["sigfig"] = "sigfig", ["sing"] = "adj", -- "sing" is an old alias for "adj" ["sortable"] = "sortable", ["sp"] = "sp", ["spell"] = "spell", ["stylein"] = "stylein", ["styleout"] = "styleout", ["tracking"] = "tracking", } -- Valid option values. -- Convention: parms.opt_xxx refers to an option that is set here -- (not intended to be set by the template which invokes this module). -- Example: At enwiki, "abbr" includes: -- ["values"] = "opt_values" -- As a result, if the template uses abbr=values, Module:Convert sets: -- parms["opt_values"] = true -- parms["abbr"] = nil -- Therefore parms.abbr will be nil, or will have one of the listed values -- that do not start with "opt_". -- An option value of form "xxx?" is the same as "xxx" but shows the input as deprecated. local en_option_value = { ["$"] = 'TEXT', -- TEXT should be a currency symbol that will be used instead of "$" ["abbr"] = { -- ["local text for option value"] = "en value used in this module" ["def"] = "", -- ignored (some wrapper templates call convert with "abbr=def" to mean "default abbreviation") ["h"] = "on", -- abbr=on + use "h" for hand unit (default) ["hh"] = "opt_hand_hh", -- abbr=on + use "hh" for hand unit ["in"] = "in", -- use symbol for LHS unit ["none"] = "off", -- old name for "off" ["off"] = "off", -- use name for all units ["on"] = "on", -- use symbol for all units ["out"] = "out", -- use symbol for RHS unit (default) ["unit"] = "unit", -- abbr=on but abbreviate units only: e6km → million km (not ×10⁶ km) ["values"] = "opt_values", -- show only input and output numbers, not units ["~"] = "opt_also_symbol", -- show input unit symbol as well as name }, ["adj"] = { ["mid"] = "opt_adjectival, opt_adj_mid", -- adj=on with user-specified text after input unit (between input and output) ["off"] = "", -- ignored (off is the default) ["on"] = "opt_adjectival", -- unit name is singular and hyphenated ["pre"] = "opt_one_preunit", -- user-specified text before input unit ["ri0"] = "opt_ri=0", -- round input with precision = 0 ["ri1"] = "opt_ri=1", -- round input with precision = 1 ["ri2"] = "opt_ri=2", -- round input with precision = 2 ["ri3"] = "opt_ri=3", -- round input with precision = 3 }, ["altitude_ft"] = 'INTEGER', ["altitude_m"] = 'INTEGER', ["comma"] = { ["5"] = "opt_comma5", -- only use numsep grouping if 5 or more digits ["gaps"] = "opt_gaps", -- use gaps, not numsep, to separate groups of digits ["gaps3"] = "opt_gaps, opt_gaps3", -- group only in threes rather than default of no gap before a single digit after decimal mark ["off"] = "opt_nocomma", -- no numsep in input or output numbers }, ["debug"] = { ["yes"] = "opt_sortable_debug", -- make the normally hidden sort key visible }, ["disp"] = { ["5"] = "opt_round=5?", -- round output value to nearest 5 ["b"] = "b", -- join: '(...)' ["(or)"] = "(or)", -- join: '(...)' with 'or' between outputs in a combination ["br"] = "br", -- join: '<br />' ["br()"] = "br()", -- join: '<br />(...)' ["comma"] = "comma", -- join: ',' ["flip"] = "opt_flip", -- reverse order of input/output ["number"] = "opt_output_number_only", -- display output value (not input, and not output symbol/name) ["or"] = "or", -- join: 'or' ["out"] = "opt_output_only", ["output number only"] = "opt_output_number_only", ["output only"] = "opt_output_only", ["preunit"] = "opt_two_preunits", -- user-specified text before input and output units ["semicolon"] = "semicolon", -- join: ';' ["sqbr"] = "sqbr", -- join: '[...]' ["table"] = "opt_table", -- output is suitable for a table cell with align="right" ["tablecen"] = "opt_tablecen", -- output is suitable for a table cell with align="center" ["unit"] = "opt_input_unit_only", -- display input symbol/name (not output, and not input value) ["unit or text"] = "opt_input_unit_only, opt_ignore_error", -- display input symbol/name, or given unit code if not known ["unit2"] = "opt_output_unit_only", ["x"] = "x", -- join: <first>...<second> (user-specified text) }, ["frac"] = 'INTEGER', ["input"] = 'TEXT', -- TEXT should be value><space><unitcode> or <wikidata-property-id> ["lang"] = { -- language for output digits (both en and local digits are always accepted for input) ["en"] = "opt_lang_en", -- use en digits for numbers, regardless of local language ["local"] = "opt_lang_local", -- use local digits for numbers (default, although config can change default to en) }, ["lk"] = { ["in"] = "in", -- link LHS unit name or symbol ["off"] = "off", -- do not link: same as default except for hand unit ["on"] = "on", -- link all unit names or symbols (but not twice for the same unit) ["out"] = "out", -- link RHS unit name or symbol }, ["order"] = { ["flip"] = "opt_flip", -- reverse order of input/output ["out"] = "opt_order_out", -- do not show input; instead, use order in output combination, with the first output shown as the input }, ["qid"] = 'TEXT', -- TEXT should be a Wikidata Q item identifier ["qual"] = 'TEXT', -- TEXT should be a Wikidata Q item identifier ["round"] = { ["0.5"] = "opt_round=0.5", -- round output value to nearest 0.5 ["5"] = "opt_round=5", -- round output value to nearest 5 ["10"] = "opt_round=10", -- round output value to nearest 10 (same as but clearer than "|-1") ["25"] = "opt_round=25", -- round output value to nearest 25 ["50"] = "opt_round=50", -- round output value to nearest 50 ["each"] = "opt_round_each", -- using default precision in a range, round each output separately (default uses highest precision of each item in range) }, ["sigfig"] = 'INTEGER', ["sortable"] = { ["off"] = "", -- ignored (off is the default) ["on"] = "opt_sortable_on", -- output sort key for use in a sortable table, based on value from converting to a standard base unit ["debug"] = "opt_sortable_on, opt_sortable_debug", -- |sortable=debug is the same as |sortable=on|debug=yes }, ["sp"] = { ["us"] = "opt_sp_us", -- use U.S. spelling (like "meter" instead of default "metre") }, ["spell"] = { -- only English spelling is supported; not scientific notation; only some fractions ["in"] = "opt_spell_in", -- spell input value in words ["In"] = "opt_spell_in, opt_spell_upper", -- spell input value in words with first letter uppercase ["on"] = "opt_spell_in, opt_spell_out", -- spell input and output values in words ["On"] = "opt_spell_in, opt_spell_out, opt_spell_upper", -- same, with first letter of first word in result uppercase ["us"] = "opt_sp_us", -- use U.S. spelling; same as sp=us so spell=us also works }, ["stylein"] = 'TEXT', ["styleout"] = 'TEXT', ["tracking"] = 'TEXT', } local titles = { ["frac"] = "Fraction/styles.css", ["sfrac"] = "Sfrac/styles.css", } return { SIprefixes = SIprefixes, all_categories = all_categories, all_messages = all_messages, currency = { ['$'] = true, ['£'] = true, ['€'] = true, ['₱'] = true, ['₽'] = true, ['¥'] = true }, customary_units = customary_units, disp_joins = disp_joins, en_option_name = en_option_name, en_option_value = en_option_value, eng_scales = eng_scales, ranges = ranges, titles = titles, } ff98cf24da87736f3469f82401084ca608335d55 Template:Smaller 10 594 1177 1176 2023-06-23T00:35:09Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Small]] {{r from merge}} 2209ecdc4a987eb3d73f648941a3daaed04cd5d5 Module:Exponential search 828 597 1183 1182 2023-06-23T00:35:10Z Tasha04 2 1 revision imported Scribunto text/plain -- This module provides a generic exponential search algorithm. require[[strict]] local checkType = require('libraryUtil').checkType local floor = math.floor local function midPoint(lower, upper) return floor(lower + (upper - lower) / 2) end local function search(testFunc, i, lower, upper) if testFunc(i) then if i + 1 == upper then return i end lower = i if upper then i = midPoint(lower, upper) else i = i * 2 end return search(testFunc, i, lower, upper) else upper = i i = midPoint(lower, upper) return search(testFunc, i, lower, upper) end end return function (testFunc, init) checkType('Exponential search', 1, testFunc, 'function') checkType('Exponential search', 2, init, 'number', true) if init and (init < 1 or init ~= floor(init) or init == math.huge) then error(string.format( "invalid init value '%s' detected in argument #2 to " .. "'Exponential search' (init value must be a positive integer)", tostring(init) ), 2) end init = init or 2 if not testFunc(1) then return nil end return search(testFunc, init, 1, nil) end a9037be0c44536be79b2d7a26155bfb907368ae7 Module:Unicode data/scripts 828 598 1185 1184 2023-06-23T00:35:12Z Tasha04 2 1 revision imported Scribunto text/plain --[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]). --]=] local data = { singles = { [0x000AA] = "Latn", [0x000BA] = "Latn", [0x000D7] = "Zyyy", [0x000F7] = "Zyyy", [0x00374] = "Zyyy", [0x0037E] = "Zyyy", [0x0037F] = "Grek", [0x00384] = "Grek", [0x00385] = "Zyyy", [0x00386] = "Grek", [0x00387] = "Zyyy", [0x0038C] = "Grek", [0x00605] = "Zyyy", [0x0060C] = "Zyyy", [0x0061B] = "Zyyy", [0x0061F] = "Zyyy", [0x00640] = "Zyyy", [0x00670] = "Zinh", [0x006DD] = "Zyyy", [0x0085E] = "Mand", [0x008E2] = "Zyyy", [0x009B2] = "Beng", [0x009D7] = "Beng", [0x00A3C] = "Guru", [0x00A51] = "Guru", [0x00A5E] = "Guru", [0x00AD0] = "Gujr", [0x00B9C] = "Taml", [0x00BD0] = "Taml", [0x00BD7] = "Taml", [0x00C5D] = "Telu", [0x00DBD] = "Sinh", [0x00DCA] = "Sinh", [0x00DD6] = "Sinh", [0x00E3F] = "Zyyy", [0x00E84] = "Laoo", [0x00EA5] = "Laoo", [0x00EC6] = "Laoo", [0x010C7] = "Geor", [0x010CD] = "Geor", [0x010FB] = "Zyyy", [0x01258] = "Ethi", [0x012C0] = "Ethi", [0x0171F] = "Tglg", [0x01804] = "Mong", [0x01805] = "Zyyy", [0x01940] = "Limb", [0x01CD3] = "Zyyy", [0x01CE1] = "Zyyy", [0x01CED] = "Zinh", [0x01CF4] = "Zinh", [0x01CFA] = "Zyyy", [0x01D2B] = "Cyrl", [0x01D78] = "Cyrl", [0x01DBF] = "Grek", [0x01F59] = "Grek", [0x01F5B] = "Grek", [0x01F5D] = "Grek", [0x02071] = "Latn", [0x0207F] = "Latn", [0x02126] = "Grek", [0x02132] = "Latn", [0x0214E] = "Latn", [0x02D27] = "Geor", [0x02D2D] = "Geor", [0x02D7F] = "Tfng", [0x03005] = "Hani", [0x03006] = "Zyyy", [0x03007] = "Hani", [0x030A0] = "Zyyy", [0x032FF] = "Zyyy", [0x0A7D3] = "Latn", [0x0A92E] = "Zyyy", [0x0A92F] = "Kali", [0x0A95F] = "Rjng", [0x0A9CF] = "Zyyy", [0x0AB5B] = "Zyyy", [0x0AB65] = "Grek", [0x0FB3E] = "Hebr", [0x0FDCF] = "Arab", [0x0FEFF] = "Zyyy", [0x0FF70] = "Zyyy", [0x101A0] = "Grek", [0x101FD] = "Zinh", [0x102E0] = "Zinh", [0x1039F] = "Ugar", [0x1056F] = "Aghb", [0x10808] = "Cprt", [0x1083C] = "Cprt", [0x1083F] = "Cprt", [0x1091F] = "Phnx", [0x1093F] = "Lydi", [0x1107F] = "Brah", [0x110CD] = "Kthi", [0x11288] = "Mult", [0x1133B] = "Zinh", [0x11350] = "Gran", [0x11357] = "Gran", [0x118FF] = "Wara", [0x11909] = "Diak", [0x11D3A] = "Gonm", [0x11FB0] = "Lisu", [0x11FFF] = "Taml", [0x16FE0] = "Tang", [0x16FE1] = "Nshu", [0x16FE4] = "Kits", [0x1B000] = "Kana", [0x1B132] = "Hira", [0x1B155] = "Kana", [0x1D4A2] = "Zyyy", [0x1D4BB] = "Zyyy", [0x1D546] = "Zyyy", [0x1E08F] = "Cyrl", [0x1E2FF] = "Wcho", [0x1EE24] = "Arab", [0x1EE27] = "Arab", [0x1EE39] = "Arab", [0x1EE3B] = "Arab", [0x1EE42] = "Arab", [0x1EE47] = "Arab", [0x1EE49] = "Arab", [0x1EE4B] = "Arab", [0x1EE54] = "Arab", [0x1EE57] = "Arab", [0x1EE59] = "Arab", [0x1EE5B] = "Arab", [0x1EE5D] = "Arab", [0x1EE5F] = "Arab", [0x1EE64] = "Arab", [0x1EE7E] = "Arab", [0x1F200] = "Hira", [0x1F7F0] = "Zyyy", [0xE0001] = "Zyyy", }, ranges = { { 0x00000, 0x00040, "Zyyy" }, { 0x00041, 0x0005A, "Latn" }, { 0x0005B, 0x00060, "Zyyy" }, { 0x00061, 0x0007A, "Latn" }, { 0x0007B, 0x000A9, "Zyyy" }, { 0x000AB, 0x000B9, "Zyyy" }, { 0x000BB, 0x000BF, "Zyyy" }, { 0x000C0, 0x000D6, "Latn" }, { 0x000D8, 0x000F6, "Latn" }, { 0x000F8, 0x002B8, "Latn" }, { 0x002B9, 0x002DF, "Zyyy" }, { 0x002E0, 0x002E4, "Latn" }, { 0x002E5, 0x002E9, "Zyyy" }, { 0x002EA, 0x002EB, "Bopo" }, { 0x002EC, 0x002FF, "Zyyy" }, { 0x00300, 0x0036F, "Zinh" }, { 0x00370, 0x00373, "Grek" }, { 0x00375, 0x00377, "Grek" }, { 0x0037A, 0x0037D, "Grek" }, { 0x00388, 0x0038A, "Grek" }, { 0x0038E, 0x003A1, "Grek" }, { 0x003A3, 0x003E1, "Grek" }, { 0x003E2, 0x003EF, "Copt" }, { 0x003F0, 0x003FF, "Grek" }, { 0x00400, 0x00484, "Cyrl" }, { 0x00485, 0x00486, "Zinh" }, { 0x00487, 0x0052F, "Cyrl" }, { 0x00531, 0x00556, "Armn" }, { 0x00559, 0x0058A, "Armn" }, { 0x0058D, 0x0058F, "Armn" }, { 0x00591, 0x005C7, "Hebr" }, { 0x005D0, 0x005EA, "Hebr" }, { 0x005EF, 0x005F4, "Hebr" }, { 0x00600, 0x00604, "Arab" }, { 0x00606, 0x0060B, "Arab" }, { 0x0060D, 0x0061A, "Arab" }, { 0x0061C, 0x0061E, "Arab" }, { 0x00620, 0x0063F, "Arab" }, { 0x00641, 0x0064A, "Arab" }, { 0x0064B, 0x00655, "Zinh" }, { 0x00656, 0x0066F, "Arab" }, { 0x00671, 0x006DC, "Arab" }, { 0x006DE, 0x006FF, "Arab" }, { 0x00700, 0x0070D, "Syrc" }, { 0x0070F, 0x0074A, "Syrc" }, { 0x0074D, 0x0074F, "Syrc" }, { 0x00750, 0x0077F, "Arab" }, { 0x00780, 0x007B1, "Thaa" }, { 0x007C0, 0x007FA, "Nkoo" }, { 0x007FD, 0x007FF, "Nkoo" }, { 0x00800, 0x0082D, "Samr" }, { 0x00830, 0x0083E, "Samr" }, { 0x00840, 0x0085B, "Mand" }, { 0x00860, 0x0086A, "Syrc" }, { 0x00870, 0x0088E, "Arab" }, { 0x00890, 0x00891, "Arab" }, { 0x00898, 0x008E1, "Arab" }, { 0x008E3, 0x008FF, "Arab" }, { 0x00900, 0x00950, "Deva" }, { 0x00951, 0x00954, "Zinh" }, { 0x00955, 0x00963, "Deva" }, { 0x00964, 0x00965, "Zyyy" }, { 0x00966, 0x0097F, "Deva" }, { 0x00980, 0x00983, "Beng" }, { 0x00985, 0x0098C, "Beng" }, { 0x0098F, 0x00990, "Beng" }, { 0x00993, 0x009A8, "Beng" }, { 0x009AA, 0x009B0, "Beng" }, { 0x009B6, 0x009B9, "Beng" }, { 0x009BC, 0x009C4, "Beng" }, { 0x009C7, 0x009C8, "Beng" }, { 0x009CB, 0x009CE, "Beng" }, { 0x009DC, 0x009DD, "Beng" }, { 0x009DF, 0x009E3, "Beng" }, { 0x009E6, 0x009FE, "Beng" }, { 0x00A01, 0x00A03, "Guru" }, { 0x00A05, 0x00A0A, "Guru" }, { 0x00A0F, 0x00A10, "Guru" }, { 0x00A13, 0x00A28, "Guru" }, { 0x00A2A, 0x00A30, "Guru" }, { 0x00A32, 0x00A33, "Guru" }, { 0x00A35, 0x00A36, "Guru" }, { 0x00A38, 0x00A39, "Guru" }, { 0x00A3E, 0x00A42, "Guru" }, { 0x00A47, 0x00A48, "Guru" }, { 0x00A4B, 0x00A4D, "Guru" }, { 0x00A59, 0x00A5C, "Guru" }, { 0x00A66, 0x00A76, "Guru" }, { 0x00A81, 0x00A83, "Gujr" }, { 0x00A85, 0x00A8D, "Gujr" }, { 0x00A8F, 0x00A91, "Gujr" }, { 0x00A93, 0x00AA8, "Gujr" }, { 0x00AAA, 0x00AB0, "Gujr" }, { 0x00AB2, 0x00AB3, "Gujr" }, { 0x00AB5, 0x00AB9, "Gujr" }, { 0x00ABC, 0x00AC5, "Gujr" }, { 0x00AC7, 0x00AC9, "Gujr" }, { 0x00ACB, 0x00ACD, "Gujr" }, { 0x00AE0, 0x00AE3, "Gujr" }, { 0x00AE6, 0x00AF1, "Gujr" }, { 0x00AF9, 0x00AFF, "Gujr" }, { 0x00B01, 0x00B03, "Orya" }, { 0x00B05, 0x00B0C, "Orya" }, { 0x00B0F, 0x00B10, "Orya" }, { 0x00B13, 0x00B28, "Orya" }, { 0x00B2A, 0x00B30, "Orya" }, { 0x00B32, 0x00B33, "Orya" }, { 0x00B35, 0x00B39, "Orya" }, { 0x00B3C, 0x00B44, "Orya" }, { 0x00B47, 0x00B48, "Orya" }, { 0x00B4B, 0x00B4D, "Orya" }, { 0x00B55, 0x00B57, "Orya" }, { 0x00B5C, 0x00B5D, "Orya" }, { 0x00B5F, 0x00B63, "Orya" }, { 0x00B66, 0x00B77, "Orya" }, { 0x00B82, 0x00B83, "Taml" }, { 0x00B85, 0x00B8A, "Taml" }, { 0x00B8E, 0x00B90, "Taml" }, { 0x00B92, 0x00B95, "Taml" }, { 0x00B99, 0x00B9A, "Taml" }, { 0x00B9E, 0x00B9F, "Taml" }, { 0x00BA3, 0x00BA4, "Taml" }, { 0x00BA8, 0x00BAA, "Taml" }, { 0x00BAE, 0x00BB9, "Taml" }, { 0x00BBE, 0x00BC2, "Taml" }, { 0x00BC6, 0x00BC8, "Taml" }, { 0x00BCA, 0x00BCD, "Taml" }, { 0x00BE6, 0x00BFA, "Taml" }, { 0x00C00, 0x00C0C, "Telu" }, { 0x00C0E, 0x00C10, "Telu" }, { 0x00C12, 0x00C28, "Telu" }, { 0x00C2A, 0x00C39, "Telu" }, { 0x00C3C, 0x00C44, "Telu" }, { 0x00C46, 0x00C48, "Telu" }, { 0x00C4A, 0x00C4D, "Telu" }, { 0x00C55, 0x00C56, "Telu" }, { 0x00C58, 0x00C5A, "Telu" }, { 0x00C60, 0x00C63, "Telu" }, { 0x00C66, 0x00C6F, "Telu" }, { 0x00C77, 0x00C7F, "Telu" }, { 0x00C80, 0x00C8C, "Knda" }, { 0x00C8E, 0x00C90, "Knda" }, { 0x00C92, 0x00CA8, "Knda" }, { 0x00CAA, 0x00CB3, "Knda" }, { 0x00CB5, 0x00CB9, "Knda" }, { 0x00CBC, 0x00CC4, "Knda" }, { 0x00CC6, 0x00CC8, "Knda" }, { 0x00CCA, 0x00CCD, "Knda" }, { 0x00CD5, 0x00CD6, "Knda" }, { 0x00CDD, 0x00CDE, "Knda" }, { 0x00CE0, 0x00CE3, "Knda" }, { 0x00CE6, 0x00CEF, "Knda" }, { 0x00CF1, 0x00CF3, "Knda" }, { 0x00D00, 0x00D0C, "Mlym" }, { 0x00D0E, 0x00D10, "Mlym" }, { 0x00D12, 0x00D44, "Mlym" }, { 0x00D46, 0x00D48, "Mlym" }, { 0x00D4A, 0x00D4F, "Mlym" }, { 0x00D54, 0x00D63, "Mlym" }, { 0x00D66, 0x00D7F, "Mlym" }, { 0x00D81, 0x00D83, "Sinh" }, { 0x00D85, 0x00D96, "Sinh" }, { 0x00D9A, 0x00DB1, "Sinh" }, { 0x00DB3, 0x00DBB, "Sinh" }, { 0x00DC0, 0x00DC6, "Sinh" }, { 0x00DCF, 0x00DD4, "Sinh" }, { 0x00DD8, 0x00DDF, "Sinh" }, { 0x00DE6, 0x00DEF, "Sinh" }, { 0x00DF2, 0x00DF4, "Sinh" }, { 0x00E01, 0x00E3A, "Thai" }, { 0x00E40, 0x00E5B, "Thai" }, { 0x00E81, 0x00E82, "Laoo" }, { 0x00E86, 0x00E8A, "Laoo" }, { 0x00E8C, 0x00EA3, "Laoo" }, { 0x00EA7, 0x00EBD, "Laoo" }, { 0x00EC0, 0x00EC4, "Laoo" }, { 0x00EC8, 0x00ECE, "Laoo" }, { 0x00ED0, 0x00ED9, "Laoo" }, { 0x00EDC, 0x00EDF, "Laoo" }, { 0x00F00, 0x00F47, "Tibt" }, { 0x00F49, 0x00F6C, "Tibt" }, { 0x00F71, 0x00F97, "Tibt" }, { 0x00F99, 0x00FBC, "Tibt" }, { 0x00FBE, 0x00FCC, "Tibt" }, { 0x00FCE, 0x00FD4, "Tibt" }, { 0x00FD5, 0x00FD8, "Zyyy" }, { 0x00FD9, 0x00FDA, "Tibt" }, { 0x01000, 0x0109F, "Mymr" }, { 0x010A0, 0x010C5, "Geor" }, { 0x010D0, 0x010FA, "Geor" }, { 0x010FC, 0x010FF, "Geor" }, { 0x01100, 0x011FF, "Hang" }, { 0x01200, 0x01248, "Ethi" }, { 0x0124A, 0x0124D, "Ethi" }, { 0x01250, 0x01256, "Ethi" }, { 0x0125A, 0x0125D, "Ethi" }, { 0x01260, 0x01288, "Ethi" }, { 0x0128A, 0x0128D, "Ethi" }, { 0x01290, 0x012B0, "Ethi" }, { 0x012B2, 0x012B5, "Ethi" }, { 0x012B8, 0x012BE, "Ethi" }, { 0x012C2, 0x012C5, "Ethi" }, { 0x012C8, 0x012D6, "Ethi" }, { 0x012D8, 0x01310, "Ethi" }, { 0x01312, 0x01315, "Ethi" }, { 0x01318, 0x0135A, "Ethi" }, { 0x0135D, 0x0137C, "Ethi" }, { 0x01380, 0x01399, "Ethi" }, { 0x013A0, 0x013F5, "Cher" }, { 0x013F8, 0x013FD, "Cher" }, { 0x01400, 0x0167F, "Cans" }, { 0x01680, 0x0169C, "Ogam" }, { 0x016A0, 0x016EA, "Runr" }, { 0x016EB, 0x016ED, "Zyyy" }, { 0x016EE, 0x016F8, "Runr" }, { 0x01700, 0x01715, "Tglg" }, { 0x01720, 0x01734, "Hano" }, { 0x01735, 0x01736, "Zyyy" }, { 0x01740, 0x01753, "Buhd" }, { 0x01760, 0x0176C, "Tagb" }, { 0x0176E, 0x01770, "Tagb" }, { 0x01772, 0x01773, "Tagb" }, { 0x01780, 0x017DD, "Khmr" }, { 0x017E0, 0x017E9, "Khmr" }, { 0x017F0, 0x017F9, "Khmr" }, { 0x01800, 0x01801, "Mong" }, { 0x01802, 0x01803, "Zyyy" }, { 0x01806, 0x01819, "Mong" }, { 0x01820, 0x01878, "Mong" }, { 0x01880, 0x018AA, "Mong" }, { 0x018B0, 0x018F5, "Cans" }, { 0x01900, 0x0191E, "Limb" }, { 0x01920, 0x0192B, "Limb" }, { 0x01930, 0x0193B, "Limb" }, { 0x01944, 0x0194F, "Limb" }, { 0x01950, 0x0196D, "Tale" }, { 0x01970, 0x01974, "Tale" }, { 0x01980, 0x019AB, "Talu" }, { 0x019B0, 0x019C9, "Talu" }, { 0x019D0, 0x019DA, "Talu" }, { 0x019DE, 0x019DF, "Talu" }, { 0x019E0, 0x019FF, "Khmr" }, { 0x01A00, 0x01A1B, "Bugi" }, { 0x01A1E, 0x01A1F, "Bugi" }, { 0x01A20, 0x01A5E, "Lana" }, { 0x01A60, 0x01A7C, "Lana" }, { 0x01A7F, 0x01A89, "Lana" }, { 0x01A90, 0x01A99, "Lana" }, { 0x01AA0, 0x01AAD, "Lana" }, { 0x01AB0, 0x01ACE, "Zinh" }, { 0x01B00, 0x01B4C, "Bali" }, { 0x01B50, 0x01B7E, "Bali" }, { 0x01B80, 0x01BBF, "Sund" }, { 0x01BC0, 0x01BF3, "Batk" }, { 0x01BFC, 0x01BFF, "Batk" }, { 0x01C00, 0x01C37, "Lepc" }, { 0x01C3B, 0x01C49, "Lepc" }, { 0x01C4D, 0x01C4F, "Lepc" }, { 0x01C50, 0x01C7F, "Olck" }, { 0x01C80, 0x01C88, "Cyrl" }, { 0x01C90, 0x01CBA, "Geor" }, { 0x01CBD, 0x01CBF, "Geor" }, { 0x01CC0, 0x01CC7, "Sund" }, { 0x01CD0, 0x01CD2, "Zinh" }, { 0x01CD4, 0x01CE0, "Zinh" }, { 0x01CE2, 0x01CE8, "Zinh" }, { 0x01CE9, 0x01CEC, "Zyyy" }, { 0x01CEE, 0x01CF3, "Zyyy" }, { 0x01CF5, 0x01CF7, "Zyyy" }, { 0x01CF8, 0x01CF9, "Zinh" }, { 0x01D00, 0x01D25, "Latn" }, { 0x01D26, 0x01D2A, "Grek" }, { 0x01D2C, 0x01D5C, "Latn" }, { 0x01D5D, 0x01D61, "Grek" }, { 0x01D62, 0x01D65, "Latn" }, { 0x01D66, 0x01D6A, "Grek" }, { 0x01D6B, 0x01D77, "Latn" }, { 0x01D79, 0x01DBE, "Latn" }, { 0x01DC0, 0x01DFF, "Zinh" }, { 0x01E00, 0x01EFF, "Latn" }, { 0x01F00, 0x01F15, "Grek" }, { 0x01F18, 0x01F1D, "Grek" }, { 0x01F20, 0x01F45, "Grek" }, { 0x01F48, 0x01F4D, "Grek" }, { 0x01F50, 0x01F57, "Grek" }, { 0x01F5F, 0x01F7D, "Grek" }, { 0x01F80, 0x01FB4, "Grek" }, { 0x01FB6, 0x01FC4, "Grek" }, { 0x01FC6, 0x01FD3, "Grek" }, { 0x01FD6, 0x01FDB, "Grek" }, { 0x01FDD, 0x01FEF, "Grek" }, { 0x01FF2, 0x01FF4, "Grek" }, { 0x01FF6, 0x01FFE, "Grek" }, { 0x02000, 0x0200B, "Zyyy" }, { 0x0200C, 0x0200D, "Zinh" }, { 0x0200E, 0x02064, "Zyyy" }, { 0x02066, 0x02070, "Zyyy" }, { 0x02074, 0x0207E, "Zyyy" }, { 0x02080, 0x0208E, "Zyyy" }, { 0x02090, 0x0209C, "Latn" }, { 0x020A0, 0x020C0, "Zyyy" }, { 0x020D0, 0x020F0, "Zinh" }, { 0x02100, 0x02125, "Zyyy" }, { 0x02127, 0x02129, "Zyyy" }, { 0x0212A, 0x0212B, "Latn" }, { 0x0212C, 0x02131, "Zyyy" }, { 0x02133, 0x0214D, "Zyyy" }, { 0x0214F, 0x0215F, "Zyyy" }, { 0x02160, 0x02188, "Latn" }, { 0x02189, 0x0218B, "Zyyy" }, { 0x02190, 0x02426, "Zyyy" }, { 0x02440, 0x0244A, "Zyyy" }, { 0x02460, 0x027FF, "Zyyy" }, { 0x02800, 0x028FF, "Brai" }, { 0x02900, 0x02B73, "Zyyy" }, { 0x02B76, 0x02B95, "Zyyy" }, { 0x02B97, 0x02BFF, "Zyyy" }, { 0x02C00, 0x02C5F, "Glag" }, { 0x02C60, 0x02C7F, "Latn" }, { 0x02C80, 0x02CF3, "Copt" }, { 0x02CF9, 0x02CFF, "Copt" }, { 0x02D00, 0x02D25, "Geor" }, { 0x02D30, 0x02D67, "Tfng" }, { 0x02D6F, 0x02D70, "Tfng" }, { 0x02D80, 0x02D96, "Ethi" }, { 0x02DA0, 0x02DA6, "Ethi" }, { 0x02DA8, 0x02DAE, "Ethi" }, { 0x02DB0, 0x02DB6, "Ethi" }, { 0x02DB8, 0x02DBE, "Ethi" }, { 0x02DC0, 0x02DC6, "Ethi" }, { 0x02DC8, 0x02DCE, "Ethi" }, { 0x02DD0, 0x02DD6, "Ethi" }, { 0x02DD8, 0x02DDE, "Ethi" }, { 0x02DE0, 0x02DFF, "Cyrl" }, { 0x02E00, 0x02E5D, "Zyyy" }, { 0x02E80, 0x02E99, "Hani" }, { 0x02E9B, 0x02EF3, "Hani" }, { 0x02F00, 0x02FD5, "Hani" }, { 0x02FF0, 0x02FFB, "Zyyy" }, { 0x03000, 0x03004, "Zyyy" }, { 0x03008, 0x03020, "Zyyy" }, { 0x03021, 0x03029, "Hani" }, { 0x0302A, 0x0302D, "Zinh" }, { 0x0302E, 0x0302F, "Hang" }, { 0x03030, 0x03037, "Zyyy" }, { 0x03038, 0x0303B, "Hani" }, { 0x0303C, 0x0303F, "Zyyy" }, { 0x03041, 0x03096, "Hira" }, { 0x03099, 0x0309A, "Zinh" }, { 0x0309B, 0x0309C, "Zyyy" }, { 0x0309D, 0x0309F, "Hira" }, { 0x030A1, 0x030FA, "Kana" }, { 0x030FB, 0x030FC, "Zyyy" }, { 0x030FD, 0x030FF, "Kana" }, { 0x03105, 0x0312F, "Bopo" }, { 0x03131, 0x0318E, "Hang" }, { 0x03190, 0x0319F, "Zyyy" }, { 0x031A0, 0x031BF, "Bopo" }, { 0x031C0, 0x031E3, "Zyyy" }, { 0x031F0, 0x031FF, "Kana" }, { 0x03200, 0x0321E, "Hang" }, { 0x03220, 0x0325F, "Zyyy" }, { 0x03260, 0x0327E, "Hang" }, { 0x0327F, 0x032CF, "Zyyy" }, { 0x032D0, 0x032FE, "Kana" }, { 0x03300, 0x03357, "Kana" }, { 0x03358, 0x033FF, "Zyyy" }, { 0x03400, 0x04DBF, "Hani" }, { 0x04DC0, 0x04DFF, "Zyyy" }, { 0x04E00, 0x09FFF, "Hani" }, { 0x0A000, 0x0A48C, "Yiii" }, { 0x0A490, 0x0A4C6, "Yiii" }, { 0x0A4D0, 0x0A4FF, "Lisu" }, { 0x0A500, 0x0A62B, "Vaii" }, { 0x0A640, 0x0A69F, "Cyrl" }, { 0x0A6A0, 0x0A6F7, "Bamu" }, { 0x0A700, 0x0A721, "Zyyy" }, { 0x0A722, 0x0A787, "Latn" }, { 0x0A788, 0x0A78A, "Zyyy" }, { 0x0A78B, 0x0A7CA, "Latn" }, { 0x0A7D0, 0x0A7D1, "Latn" }, { 0x0A7D5, 0x0A7D9, "Latn" }, { 0x0A7F2, 0x0A7FF, "Latn" }, { 0x0A800, 0x0A82C, "Sylo" }, { 0x0A830, 0x0A839, "Zyyy" }, { 0x0A840, 0x0A877, "Phag" }, { 0x0A880, 0x0A8C5, "Saur" }, { 0x0A8CE, 0x0A8D9, "Saur" }, { 0x0A8E0, 0x0A8FF, "Deva" }, { 0x0A900, 0x0A92D, "Kali" }, { 0x0A930, 0x0A953, "Rjng" }, { 0x0A960, 0x0A97C, "Hang" }, { 0x0A980, 0x0A9CD, "Java" }, { 0x0A9D0, 0x0A9D9, "Java" }, { 0x0A9DE, 0x0A9DF, "Java" }, { 0x0A9E0, 0x0A9FE, "Mymr" }, { 0x0AA00, 0x0AA36, "Cham" }, { 0x0AA40, 0x0AA4D, "Cham" }, { 0x0AA50, 0x0AA59, "Cham" }, { 0x0AA5C, 0x0AA5F, "Cham" }, { 0x0AA60, 0x0AA7F, "Mymr" }, { 0x0AA80, 0x0AAC2, "Tavt" }, { 0x0AADB, 0x0AADF, "Tavt" }, { 0x0AAE0, 0x0AAF6, "Mtei" }, { 0x0AB01, 0x0AB06, "Ethi" }, { 0x0AB09, 0x0AB0E, "Ethi" }, { 0x0AB11, 0x0AB16, "Ethi" }, { 0x0AB20, 0x0AB26, "Ethi" }, { 0x0AB28, 0x0AB2E, "Ethi" }, { 0x0AB30, 0x0AB5A, "Latn" }, { 0x0AB5C, 0x0AB64, "Latn" }, { 0x0AB66, 0x0AB69, "Latn" }, { 0x0AB6A, 0x0AB6B, "Zyyy" }, { 0x0AB70, 0x0ABBF, "Cher" }, { 0x0ABC0, 0x0ABED, "Mtei" }, { 0x0ABF0, 0x0ABF9, "Mtei" }, { 0x0AC00, 0x0D7A3, "Hang" }, { 0x0D7B0, 0x0D7C6, "Hang" }, { 0x0D7CB, 0x0D7FB, "Hang" }, { 0x0F900, 0x0FA6D, "Hani" }, { 0x0FA70, 0x0FAD9, "Hani" }, { 0x0FB00, 0x0FB06, "Latn" }, { 0x0FB13, 0x0FB17, "Armn" }, { 0x0FB1D, 0x0FB36, "Hebr" }, { 0x0FB38, 0x0FB3C, "Hebr" }, { 0x0FB40, 0x0FB41, "Hebr" }, { 0x0FB43, 0x0FB44, "Hebr" }, { 0x0FB46, 0x0FB4F, "Hebr" }, { 0x0FB50, 0x0FBC2, "Arab" }, { 0x0FBD3, 0x0FD3D, "Arab" }, { 0x0FD3E, 0x0FD3F, "Zyyy" }, { 0x0FD40, 0x0FD8F, "Arab" }, { 0x0FD92, 0x0FDC7, "Arab" }, { 0x0FDF0, 0x0FDFF, "Arab" }, { 0x0FE00, 0x0FE0F, "Zinh" }, { 0x0FE10, 0x0FE19, "Zyyy" }, { 0x0FE20, 0x0FE2D, "Zinh" }, { 0x0FE2E, 0x0FE2F, "Cyrl" }, { 0x0FE30, 0x0FE52, "Zyyy" }, { 0x0FE54, 0x0FE66, "Zyyy" }, { 0x0FE68, 0x0FE6B, "Zyyy" }, { 0x0FE70, 0x0FE74, "Arab" }, { 0x0FE76, 0x0FEFC, "Arab" }, { 0x0FF01, 0x0FF20, "Zyyy" }, { 0x0FF21, 0x0FF3A, "Latn" }, { 0x0FF3B, 0x0FF40, "Zyyy" }, { 0x0FF41, 0x0FF5A, "Latn" }, { 0x0FF5B, 0x0FF65, "Zyyy" }, { 0x0FF66, 0x0FF6F, "Kana" }, { 0x0FF71, 0x0FF9D, "Kana" }, { 0x0FF9E, 0x0FF9F, "Zyyy" }, { 0x0FFA0, 0x0FFBE, "Hang" }, { 0x0FFC2, 0x0FFC7, "Hang" }, { 0x0FFCA, 0x0FFCF, "Hang" }, { 0x0FFD2, 0x0FFD7, "Hang" }, { 0x0FFDA, 0x0FFDC, "Hang" }, { 0x0FFE0, 0x0FFE6, "Zyyy" }, { 0x0FFE8, 0x0FFEE, "Zyyy" }, { 0x0FFF9, 0x0FFFD, "Zyyy" }, { 0x10000, 0x1000B, "Linb" }, { 0x1000D, 0x10026, "Linb" }, { 0x10028, 0x1003A, "Linb" }, { 0x1003C, 0x1003D, "Linb" }, { 0x1003F, 0x1004D, "Linb" }, { 0x10050, 0x1005D, "Linb" }, { 0x10080, 0x100FA, "Linb" }, { 0x10100, 0x10102, "Zyyy" }, { 0x10107, 0x10133, "Zyyy" }, { 0x10137, 0x1013F, "Zyyy" }, { 0x10140, 0x1018E, "Grek" }, { 0x10190, 0x1019C, "Zyyy" }, { 0x101D0, 0x101FC, "Zyyy" }, { 0x10280, 0x1029C, "Lyci" }, { 0x102A0, 0x102D0, "Cari" }, { 0x102E1, 0x102FB, "Zyyy" }, { 0x10300, 0x10323, "Ital" }, { 0x1032D, 0x1032F, "Ital" }, { 0x10330, 0x1034A, "Goth" }, { 0x10350, 0x1037A, "Perm" }, { 0x10380, 0x1039D, "Ugar" }, { 0x103A0, 0x103C3, "Xpeo" }, { 0x103C8, 0x103D5, "Xpeo" }, { 0x10400, 0x1044F, "Dsrt" }, { 0x10450, 0x1047F, "Shaw" }, { 0x10480, 0x1049D, "Osma" }, { 0x104A0, 0x104A9, "Osma" }, { 0x104B0, 0x104D3, "Osge" }, { 0x104D8, 0x104FB, "Osge" }, { 0x10500, 0x10527, "Elba" }, { 0x10530, 0x10563, "Aghb" }, { 0x10570, 0x1057A, "Vith" }, { 0x1057C, 0x1058A, "Vith" }, { 0x1058C, 0x10592, "Vith" }, { 0x10594, 0x10595, "Vith" }, { 0x10597, 0x105A1, "Vith" }, { 0x105A3, 0x105B1, "Vith" }, { 0x105B3, 0x105B9, "Vith" }, { 0x105BB, 0x105BC, "Vith" }, { 0x10600, 0x10736, "Lina" }, { 0x10740, 0x10755, "Lina" }, { 0x10760, 0x10767, "Lina" }, { 0x10780, 0x10785, "Latn" }, { 0x10787, 0x107B0, "Latn" }, { 0x107B2, 0x107BA, "Latn" }, { 0x10800, 0x10805, "Cprt" }, { 0x1080A, 0x10835, "Cprt" }, { 0x10837, 0x10838, "Cprt" }, { 0x10840, 0x10855, "Armi" }, { 0x10857, 0x1085F, "Armi" }, { 0x10860, 0x1087F, "Palm" }, { 0x10880, 0x1089E, "Nbat" }, { 0x108A7, 0x108AF, "Nbat" }, { 0x108E0, 0x108F2, "Hatr" }, { 0x108F4, 0x108F5, "Hatr" }, { 0x108FB, 0x108FF, "Hatr" }, { 0x10900, 0x1091B, "Phnx" }, { 0x10920, 0x10939, "Lydi" }, { 0x10980, 0x1099F, "Mero" }, { 0x109A0, 0x109B7, "Merc" }, { 0x109BC, 0x109CF, "Merc" }, { 0x109D2, 0x109FF, "Merc" }, { 0x10A00, 0x10A03, "Khar" }, { 0x10A05, 0x10A06, "Khar" }, { 0x10A0C, 0x10A13, "Khar" }, { 0x10A15, 0x10A17, "Khar" }, { 0x10A19, 0x10A35, "Khar" }, { 0x10A38, 0x10A3A, "Khar" }, { 0x10A3F, 0x10A48, "Khar" }, { 0x10A50, 0x10A58, "Khar" }, { 0x10A60, 0x10A7F, "Sarb" }, { 0x10A80, 0x10A9F, "Narb" }, { 0x10AC0, 0x10AE6, "Mani" }, { 0x10AEB, 0x10AF6, "Mani" }, { 0x10B00, 0x10B35, "Avst" }, { 0x10B39, 0x10B3F, "Avst" }, { 0x10B40, 0x10B55, "Prti" }, { 0x10B58, 0x10B5F, "Prti" }, { 0x10B60, 0x10B72, "Phli" }, { 0x10B78, 0x10B7F, "Phli" }, { 0x10B80, 0x10B91, "Phlp" }, { 0x10B99, 0x10B9C, "Phlp" }, { 0x10BA9, 0x10BAF, "Phlp" }, { 0x10C00, 0x10C48, "Orkh" }, { 0x10C80, 0x10CB2, "Hung" }, { 0x10CC0, 0x10CF2, "Hung" }, { 0x10CFA, 0x10CFF, "Hung" }, { 0x10D00, 0x10D27, "Rohg" }, { 0x10D30, 0x10D39, "Rohg" }, { 0x10E60, 0x10E7E, "Arab" }, { 0x10E80, 0x10EA9, "Yezi" }, { 0x10EAB, 0x10EAD, "Yezi" }, { 0x10EB0, 0x10EB1, "Yezi" }, { 0x10EFD, 0x10EFF, "Arab" }, { 0x10F00, 0x10F27, "Sogo" }, { 0x10F30, 0x10F59, "Sogd" }, { 0x10F70, 0x10F89, "Ougr" }, { 0x10FB0, 0x10FCB, "Chrs" }, { 0x10FE0, 0x10FF6, "Elym" }, { 0x11000, 0x1104D, "Brah" }, { 0x11052, 0x11075, "Brah" }, { 0x11080, 0x110C2, "Kthi" }, { 0x110D0, 0x110E8, "Sora" }, { 0x110F0, 0x110F9, "Sora" }, { 0x11100, 0x11134, "Cakm" }, { 0x11136, 0x11147, "Cakm" }, { 0x11150, 0x11176, "Mahj" }, { 0x11180, 0x111DF, "Shrd" }, { 0x111E1, 0x111F4, "Sinh" }, { 0x11200, 0x11211, "Khoj" }, { 0x11213, 0x11241, "Khoj" }, { 0x11280, 0x11286, "Mult" }, { 0x1128A, 0x1128D, "Mult" }, { 0x1128F, 0x1129D, "Mult" }, { 0x1129F, 0x112A9, "Mult" }, { 0x112B0, 0x112EA, "Sind" }, { 0x112F0, 0x112F9, "Sind" }, { 0x11300, 0x11303, "Gran" }, { 0x11305, 0x1130C, "Gran" }, { 0x1130F, 0x11310, "Gran" }, { 0x11313, 0x11328, "Gran" }, { 0x1132A, 0x11330, "Gran" }, { 0x11332, 0x11333, "Gran" }, { 0x11335, 0x11339, "Gran" }, { 0x1133C, 0x11344, "Gran" }, { 0x11347, 0x11348, "Gran" }, { 0x1134B, 0x1134D, "Gran" }, { 0x1135D, 0x11363, "Gran" }, { 0x11366, 0x1136C, "Gran" }, { 0x11370, 0x11374, "Gran" }, { 0x11400, 0x1145B, "Newa" }, { 0x1145D, 0x11461, "Newa" }, { 0x11480, 0x114C7, "Tirh" }, { 0x114D0, 0x114D9, "Tirh" }, { 0x11580, 0x115B5, "Sidd" }, { 0x115B8, 0x115DD, "Sidd" }, { 0x11600, 0x11644, "Modi" }, { 0x11650, 0x11659, "Modi" }, { 0x11660, 0x1166C, "Mong" }, { 0x11680, 0x116B9, "Takr" }, { 0x116C0, 0x116C9, "Takr" }, { 0x11700, 0x1171A, "Ahom" }, { 0x1171D, 0x1172B, "Ahom" }, { 0x11730, 0x11746, "Ahom" }, { 0x11800, 0x1183B, "Dogr" }, { 0x118A0, 0x118F2, "Wara" }, { 0x11900, 0x11906, "Diak" }, { 0x1190C, 0x11913, "Diak" }, { 0x11915, 0x11916, "Diak" }, { 0x11918, 0x11935, "Diak" }, { 0x11937, 0x11938, "Diak" }, { 0x1193B, 0x11946, "Diak" }, { 0x11950, 0x11959, "Diak" }, { 0x119A0, 0x119A7, "Nand" }, { 0x119AA, 0x119D7, "Nand" }, { 0x119DA, 0x119E4, "Nand" }, { 0x11A00, 0x11A47, "Zanb" }, { 0x11A50, 0x11AA2, "Soyo" }, { 0x11AB0, 0x11ABF, "Cans" }, { 0x11AC0, 0x11AF8, "Pauc" }, { 0x11B00, 0x11B09, "Deva" }, { 0x11C00, 0x11C08, "Bhks" }, { 0x11C0A, 0x11C36, "Bhks" }, { 0x11C38, 0x11C45, "Bhks" }, { 0x11C50, 0x11C6C, "Bhks" }, { 0x11C70, 0x11C8F, "Marc" }, { 0x11C92, 0x11CA7, "Marc" }, { 0x11CA9, 0x11CB6, "Marc" }, { 0x11D00, 0x11D06, "Gonm" }, { 0x11D08, 0x11D09, "Gonm" }, { 0x11D0B, 0x11D36, "Gonm" }, { 0x11D3C, 0x11D3D, "Gonm" }, { 0x11D3F, 0x11D47, "Gonm" }, { 0x11D50, 0x11D59, "Gonm" }, { 0x11D60, 0x11D65, "Gong" }, { 0x11D67, 0x11D68, "Gong" }, { 0x11D6A, 0x11D8E, "Gong" }, { 0x11D90, 0x11D91, "Gong" }, { 0x11D93, 0x11D98, "Gong" }, { 0x11DA0, 0x11DA9, "Gong" }, { 0x11EE0, 0x11EF8, "Maka" }, { 0x11F00, 0x11F10, "Kawi" }, { 0x11F12, 0x11F3A, "Kawi" }, { 0x11F3E, 0x11F59, "Kawi" }, { 0x11FC0, 0x11FF1, "Taml" }, { 0x12000, 0x12399, "Xsux" }, { 0x12400, 0x1246E, "Xsux" }, { 0x12470, 0x12474, "Xsux" }, { 0x12480, 0x12543, "Xsux" }, { 0x12F90, 0x12FF2, "Cpmn" }, { 0x13000, 0x13455, "Egyp" }, { 0x14400, 0x14646, "Hluw" }, { 0x16800, 0x16A38, "Bamu" }, { 0x16A40, 0x16A5E, "Mroo" }, { 0x16A60, 0x16A69, "Mroo" }, { 0x16A6E, 0x16A6F, "Mroo" }, { 0x16A70, 0x16ABE, "Tnsa" }, { 0x16AC0, 0x16AC9, "Tnsa" }, { 0x16AD0, 0x16AED, "Bass" }, { 0x16AF0, 0x16AF5, "Bass" }, { 0x16B00, 0x16B45, "Hmng" }, { 0x16B50, 0x16B59, "Hmng" }, { 0x16B5B, 0x16B61, "Hmng" }, { 0x16B63, 0x16B77, "Hmng" }, { 0x16B7D, 0x16B8F, "Hmng" }, { 0x16E40, 0x16E9A, "Medf" }, { 0x16F00, 0x16F4A, "Plrd" }, { 0x16F4F, 0x16F87, "Plrd" }, { 0x16F8F, 0x16F9F, "Plrd" }, { 0x16FE2, 0x16FE3, "Hani" }, { 0x16FF0, 0x16FF1, "Hani" }, { 0x17000, 0x187F7, "Tang" }, { 0x18800, 0x18AFF, "Tang" }, { 0x18B00, 0x18CD5, "Kits" }, { 0x18D00, 0x18D08, "Tang" }, { 0x1AFF0, 0x1AFF3, "Kana" }, { 0x1AFF5, 0x1AFFB, "Kana" }, { 0x1AFFD, 0x1AFFE, "Kana" }, { 0x1B001, 0x1B11F, "Hira" }, { 0x1B120, 0x1B122, "Kana" }, { 0x1B150, 0x1B152, "Hira" }, { 0x1B164, 0x1B167, "Kana" }, { 0x1B170, 0x1B2FB, "Nshu" }, { 0x1BC00, 0x1BC6A, "Dupl" }, { 0x1BC70, 0x1BC7C, "Dupl" }, { 0x1BC80, 0x1BC88, "Dupl" }, { 0x1BC90, 0x1BC99, "Dupl" }, { 0x1BC9C, 0x1BC9F, "Dupl" }, { 0x1BCA0, 0x1BCA3, "Zyyy" }, { 0x1CF00, 0x1CF2D, "Zinh" }, { 0x1CF30, 0x1CF46, "Zinh" }, { 0x1CF50, 0x1CFC3, "Zyyy" }, { 0x1D000, 0x1D0F5, "Zyyy" }, { 0x1D100, 0x1D126, "Zyyy" }, { 0x1D129, 0x1D166, "Zyyy" }, { 0x1D167, 0x1D169, "Zinh" }, { 0x1D16A, 0x1D17A, "Zyyy" }, { 0x1D17B, 0x1D182, "Zinh" }, { 0x1D183, 0x1D184, "Zyyy" }, { 0x1D185, 0x1D18B, "Zinh" }, { 0x1D18C, 0x1D1A9, "Zyyy" }, { 0x1D1AA, 0x1D1AD, "Zinh" }, { 0x1D1AE, 0x1D1EA, "Zyyy" }, { 0x1D200, 0x1D245, "Grek" }, { 0x1D2C0, 0x1D2D3, "Zyyy" }, { 0x1D2E0, 0x1D2F3, "Zyyy" }, { 0x1D300, 0x1D356, "Zyyy" }, { 0x1D360, 0x1D378, "Zyyy" }, { 0x1D400, 0x1D454, "Zyyy" }, { 0x1D456, 0x1D49C, "Zyyy" }, { 0x1D49E, 0x1D49F, "Zyyy" }, { 0x1D4A5, 0x1D4A6, "Zyyy" }, { 0x1D4A9, 0x1D4AC, "Zyyy" }, { 0x1D4AE, 0x1D4B9, "Zyyy" }, { 0x1D4BD, 0x1D4C3, "Zyyy" }, { 0x1D4C5, 0x1D505, "Zyyy" }, { 0x1D507, 0x1D50A, "Zyyy" }, { 0x1D50D, 0x1D514, "Zyyy" }, { 0x1D516, 0x1D51C, "Zyyy" }, { 0x1D51E, 0x1D539, "Zyyy" }, { 0x1D53B, 0x1D53E, "Zyyy" }, { 0x1D540, 0x1D544, "Zyyy" }, { 0x1D54A, 0x1D550, "Zyyy" }, { 0x1D552, 0x1D6A5, "Zyyy" }, { 0x1D6A8, 0x1D7CB, "Zyyy" }, { 0x1D7CE, 0x1D7FF, "Zyyy" }, { 0x1D800, 0x1DA8B, "Sgnw" }, { 0x1DA9B, 0x1DA9F, "Sgnw" }, { 0x1DAA1, 0x1DAAF, "Sgnw" }, { 0x1DF00, 0x1DF1E, "Latn" }, { 0x1DF25, 0x1DF2A, "Latn" }, { 0x1E000, 0x1E006, "Glag" }, { 0x1E008, 0x1E018, "Glag" }, { 0x1E01B, 0x1E021, "Glag" }, { 0x1E023, 0x1E024, "Glag" }, { 0x1E026, 0x1E02A, "Glag" }, { 0x1E030, 0x1E06D, "Cyrl" }, { 0x1E100, 0x1E12C, "Hmnp" }, { 0x1E130, 0x1E13D, "Hmnp" }, { 0x1E140, 0x1E149, "Hmnp" }, { 0x1E14E, 0x1E14F, "Hmnp" }, { 0x1E290, 0x1E2AE, "Toto" }, { 0x1E2C0, 0x1E2F9, "Wcho" }, { 0x1E4D0, 0x1E4F9, "Nagm" }, { 0x1E7E0, 0x1E7E6, "Ethi" }, { 0x1E7E8, 0x1E7EB, "Ethi" }, { 0x1E7ED, 0x1E7EE, "Ethi" }, { 0x1E7F0, 0x1E7FE, "Ethi" }, { 0x1E800, 0x1E8C4, "Mend" }, { 0x1E8C7, 0x1E8D6, "Mend" }, { 0x1E900, 0x1E94B, "Adlm" }, { 0x1E950, 0x1E959, "Adlm" }, { 0x1E95E, 0x1E95F, "Adlm" }, { 0x1EC71, 0x1ECB4, "Zyyy" }, { 0x1ED01, 0x1ED3D, "Zyyy" }, { 0x1EE00, 0x1EE03, "Arab" }, { 0x1EE05, 0x1EE1F, "Arab" }, { 0x1EE21, 0x1EE22, "Arab" }, { 0x1EE29, 0x1EE32, "Arab" }, { 0x1EE34, 0x1EE37, "Arab" }, { 0x1EE4D, 0x1EE4F, "Arab" }, { 0x1EE51, 0x1EE52, "Arab" }, { 0x1EE61, 0x1EE62, "Arab" }, { 0x1EE67, 0x1EE6A, "Arab" }, { 0x1EE6C, 0x1EE72, "Arab" }, { 0x1EE74, 0x1EE77, "Arab" }, { 0x1EE79, 0x1EE7C, "Arab" }, { 0x1EE80, 0x1EE89, "Arab" }, { 0x1EE8B, 0x1EE9B, "Arab" }, { 0x1EEA1, 0x1EEA3, "Arab" }, { 0x1EEA5, 0x1EEA9, "Arab" }, { 0x1EEAB, 0x1EEBB, "Arab" }, { 0x1EEF0, 0x1EEF1, "Arab" }, { 0x1F000, 0x1F02B, "Zyyy" }, { 0x1F030, 0x1F093, "Zyyy" }, { 0x1F0A0, 0x1F0AE, "Zyyy" }, { 0x1F0B1, 0x1F0BF, "Zyyy" }, { 0x1F0C1, 0x1F0CF, "Zyyy" }, { 0x1F0D1, 0x1F0F5, "Zyyy" }, { 0x1F100, 0x1F1AD, "Zyyy" }, { 0x1F1E6, 0x1F1FF, "Zyyy" }, { 0x1F201, 0x1F202, "Zyyy" }, { 0x1F210, 0x1F23B, "Zyyy" }, { 0x1F240, 0x1F248, "Zyyy" }, { 0x1F250, 0x1F251, "Zyyy" }, { 0x1F260, 0x1F265, "Zyyy" }, { 0x1F300, 0x1F6D7, "Zyyy" }, { 0x1F6DC, 0x1F6EC, "Zyyy" }, { 0x1F6F0, 0x1F6FC, "Zyyy" }, { 0x1F700, 0x1F776, "Zyyy" }, { 0x1F77B, 0x1F7D9, "Zyyy" }, { 0x1F7E0, 0x1F7EB, "Zyyy" }, { 0x1F800, 0x1F80B, "Zyyy" }, { 0x1F810, 0x1F847, "Zyyy" }, { 0x1F850, 0x1F859, "Zyyy" }, { 0x1F860, 0x1F887, "Zyyy" }, { 0x1F890, 0x1F8AD, "Zyyy" }, { 0x1F8B0, 0x1F8B1, "Zyyy" }, { 0x1F900, 0x1FA53, "Zyyy" }, { 0x1FA60, 0x1FA6D, "Zyyy" }, { 0x1FA70, 0x1FA7C, "Zyyy" }, { 0x1FA80, 0x1FA88, "Zyyy" }, { 0x1FA90, 0x1FABD, "Zyyy" }, { 0x1FABF, 0x1FAC5, "Zyyy" }, { 0x1FACE, 0x1FADB, "Zyyy" }, { 0x1FAE0, 0x1FAE8, "Zyyy" }, { 0x1FAF0, 0x1FAF8, "Zyyy" }, { 0x1FB00, 0x1FB92, "Zyyy" }, { 0x1FB94, 0x1FBCA, "Zyyy" }, { 0x1FBF0, 0x1FBF9, "Zyyy" }, { 0x20000, 0x2A6DF, "Hani" }, { 0x2A700, 0x2B739, "Hani" }, { 0x2B740, 0x2B81D, "Hani" }, { 0x2B820, 0x2CEA1, "Hani" }, { 0x2CEB0, 0x2EBE0, "Hani" }, { 0x2F800, 0x2FA1D, "Hani" }, { 0x30000, 0x3134A, "Hani" }, { 0x31350, 0x323AF, "Hani" }, { 0xE0020, 0xE007F, "Zyyy" }, { 0xE0100, 0xE01EF, "Zinh" }, }, -- Scripts.txt gives full names; here we consider them aliases to save space. aliases = { Adlm = "Adlam", Aghb = "Caucasian Albanian", Ahom = "Ahom", Arab = "Arabic", Armi = "Imperial Aramaic", Armn = "Armenian", Avst = "Avestan", Bali = "Balinese", Bamu = "Bamum", Bass = "Bassa Vah", Batk = "Batak", Beng = "Bengali", Bhks = "Bhaiksuki", Bopo = "Bopomofo", Brah = "Brahmi", Brai = "Braille", Bugi = "Buginese", Buhd = "Buhid", Cakm = "Chakma", Cans = "Canadian Aboriginal", Cari = "Carian", Cham = "Cham", Cher = "Cherokee", Chrs = "Chorasmian", Copt = "Coptic", Cpmn = "Cypro Minoan", Cprt = "Cypriot", Cyrl = "Cyrillic", Deva = "Devanagari", Diak = "Dives Akuru", Dogr = "Dogra", Dsrt = "Deseret", Dupl = "Duployan", Egyp = "Egyptian Hieroglyphs", Elba = "Elbasan", Elym = "Elymaic", Ethi = "Ethiopic", Geor = "Georgian", Glag = "Glagolitic", Gong = "Gunjala Gondi", Gonm = "Masaram Gondi", Goth = "Gothic", Gran = "Grantha", Grek = "Greek", Gujr = "Gujarati", Guru = "Gurmukhi", Hang = "Hangul", Hani = "Han", Hano = "Hanunoo", Hatr = "Hatran", Hebr = "Hebrew", Hira = "Hiragana", Hluw = "Anatolian Hieroglyphs", Hmng = "Pahawh Hmong", Hmnp = "Nyiakeng Puachue Hmong", Hrkt = "Katakana Or Hiragana", Hung = "Old Hungarian", Ital = "Old Italic", Java = "Javanese", Kali = "Kayah Li", Kana = "Katakana", Kawi = "Kawi", Khar = "Kharoshthi", Khmr = "Khmer", Khoj = "Khojki", Kits = "Khitan Small Script", Knda = "Kannada", Kthi = "Kaithi", Lana = "Tai Tham", Laoo = "Lao", Latn = "Latin", Lepc = "Lepcha", Limb = "Limbu", Lina = "Linear A", Linb = "Linear B", Lisu = "Lisu", Lyci = "Lycian", Lydi = "Lydian", Mahj = "Mahajani", Maka = "Makasar", Mand = "Mandaic", Mani = "Manichaean", Marc = "Marchen", Medf = "Medefaidrin", Mend = "Mende Kikakui", Merc = "Meroitic Cursive", Mero = "Meroitic Hieroglyphs", Mlym = "Malayalam", Modi = "Modi", Mong = "Mongolian", Mroo = "Mro", Mtei = "Meetei Mayek", Mult = "Multani", Mymr = "Myanmar", Nagm = "Nag Mundari", Nand = "Nandinagari", Narb = "Old North Arabian", Nbat = "Nabataean", Newa = "Newa", Nkoo = "NKo", Nshu = "Nushu", Ogam = "Ogham", Olck = "Ol Chiki", Orkh = "Old Turkic", Orya = "Oriya", Osge = "Osage", Osma = "Osmanya", Ougr = "Old Uyghur", Palm = "Palmyrene", Pauc = "Pau Cin Hau", Perm = "Old Permic", Phag = "Phags Pa", Phli = "Inscriptional Pahlavi", Phlp = "Psalter Pahlavi", Phnx = "Phoenician", Plrd = "Miao", Prti = "Inscriptional Parthian", Rjng = "Rejang", Rohg = "Hanifi Rohingya", Runr = "Runic", Samr = "Samaritan", Sarb = "Old South Arabian", Saur = "Saurashtra", Sgnw = "SignWriting", Shaw = "Shavian", Shrd = "Sharada", Sidd = "Siddham", Sind = "Khudawadi", Sinh = "Sinhala", Sogd = "Sogdian", Sogo = "Old Sogdian", Sora = "Sora Sompeng", Soyo = "Soyombo", Sund = "Sundanese", Sylo = "Syloti Nagri", Syrc = "Syriac", Tagb = "Tagbanwa", Takr = "Takri", Tale = "Tai Le", Talu = "New Tai Lue", Taml = "Tamil", Tang = "Tangut", Tavt = "Tai Viet", Telu = "Telugu", Tfng = "Tifinagh", Tglg = "Tagalog", Thaa = "Thaana", Thai = "Thai", Tibt = "Tibetan", Tirh = "Tirhuta", Tnsa = "Tangsa", Toto = "Toto", Ugar = "Ugaritic", Vaii = "Vai", Vith = "Vithkuqi", Wara = "Warang Citi", Wcho = "Wancho", Xpeo = "Old Persian", Xsux = "Cuneiform", Yezi = "Yezidi", Yiii = "Yi", Zanb = "Zanabazar Square", Zinh = "Inherited", Zyyy = "Common", Zzzz = "Unknown", }, } -- Required for binary search function in [[Module:Language/scripts]]. -- Cannot get length of module loaded with mw.loadData. data.ranges.length = #data.ranges data.rtl = {} for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- [[Module:Lang/data]] has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = true end return data f887eb9f8d53e83c36af36a127f534c3e063e358 Module:Coordinates 828 606 1201 1200 2023-06-23T00:35:15Z Tasha04 2 1 revision imported Scribunto text/plain --[[ This module is intended to replace the functionality of {{Coord}} and related templates. It provides several methods, including {{#invoke:Coordinates | coord }} : General function formatting and displaying coordinate values. {{#invoke:Coordinates | dec2dms }} : Simple function for converting decimal degree values to DMS format. {{#invoke:Coordinates | dms2dec }} : Simple function for converting DMS format to decimal degree format. {{#invoke:Coordinates | link }} : Export the link used to reach the tools ]] require('strict') local math_mod = require("Module:Math") local coordinates = {}; local isSandbox = mw.getCurrentFrame():getTitle():find('sandbox', 1, true); local current_page = mw.title.getCurrentTitle() local page_name = mw.uri.encode( current_page.prefixedText, 'WIKI' ); local coord_link = 'https://geohack.toolforge.org/geohack.php?pagename=' .. page_name .. '&params=' --[[ Helper function, replacement for {{coord/display/title}} ]] local function displaytitle(coords) return mw.getCurrentFrame():extensionTag{ name = 'indicator', args = { name = 'coordinates' }, content = '<span id="coordinates">[[Geographic coordinate system|Coordinates]]: ' .. coords .. '</span>' } end --[[ Helper function, used in detecting DMS formatting ]] local function dmsTest(first, second) if type(first) ~= 'string' or type(second) ~= 'string' then return nil end local s = (first .. second):upper() return s:find('^[NS][EW]$') or s:find('^[EW][NS]$') end --[[ Wrapper function to grab args, see Module:Arguments for this function's documentation. ]] local function makeInvokeFunc(funcName) return function (frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Coord' }) return coordinates[funcName](args, frame) end end --[[ Helper function, handle optional args. ]] local function optionalArg(arg, supplement) return arg and arg .. supplement or '' end --[[ Formats any error messages generated for display ]] local function errorPrinter(errors) local result = "" for i,v in ipairs(errors) do result = result .. '<strong class="error">Coordinates: ' .. v[2] .. '</strong><br />' end return result end --[[ Determine the required CSS class to display coordinates Usually geo-nondefault is hidden by CSS, unless a user has overridden this for himself default is the mode as specificied by the user when calling the {{coord}} template mode is the display mode (dec or dms) that we will need to determine the css class for ]] local function displayDefault(default, mode) if default == "" then default = "dec" end if default == mode then return "geo-default" else return "geo-nondefault" end end --[[ specPrinter Output formatter. Takes the structure generated by either parseDec or parseDMS and formats it for inclusion on Wikipedia. ]] local function specPrinter(args, coordinateSpec) local uriComponents = coordinateSpec["param"] if uriComponents == "" then -- RETURN error, should never be empty or nil return "ERROR param was empty" end if args["name"] then uriComponents = uriComponents .. "&title=" .. mw.uri.encode(coordinateSpec["name"]) end local geodmshtml = '<span class="geo-dms" title="Maps, aerial photos, and other data for this location">' .. '<span class="latitude">' .. coordinateSpec["dms-lat"] .. '</span> ' .. '<span class="longitude">' ..coordinateSpec["dms-long"] .. '</span>' .. '</span>' local lat = tonumber( coordinateSpec["dec-lat"] ) or 0 local geodeclat if lat < 0 then -- FIXME this breaks the pre-existing precision geodeclat = tostring(coordinateSpec["dec-lat"]):sub(2) .. "°S" else geodeclat = (coordinateSpec["dec-lat"] or 0) .. "°N" end local long = tonumber( coordinateSpec["dec-long"] ) or 0 local geodeclong if long < 0 then -- FIXME does not handle unicode minus geodeclong = tostring(coordinateSpec["dec-long"]):sub(2) .. "°W" else geodeclong = (coordinateSpec["dec-long"] or 0) .. "°E" end local geodechtml = '<span class="geo-dec" title="Maps, aerial photos, and other data for this location">' .. geodeclat .. ' ' .. geodeclong .. '</span>' local geonumhtml = '<span class="geo">' .. coordinateSpec["dec-lat"] .. '; ' .. coordinateSpec["dec-long"] .. '</span>' local inner = '<span class="' .. displayDefault(coordinateSpec["default"], "dms" ) .. '">' .. geodmshtml .. '</span>' .. '<span class="geo-multi-punct">&#xfeff; / &#xfeff;</span>' .. '<span class="' .. displayDefault(coordinateSpec["default"], "dec" ) .. '">'; if not args["name"] then inner = inner .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span></span>' else inner = inner .. '<span class="vcard">' .. geodechtml .. '<span style="display:none">&#xfeff; / ' .. geonumhtml .. '</span>' .. '<span style="display:none">&#xfeff; (<span class="fn org">' .. args["name"] .. '</span>)</span></span></span>' end local stylesheetLink = 'Module:Coordinates' .. ( isSandbox and '/sandbox' or '' ) .. '/styles.css' return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = stylesheetLink } } .. '<span class="plainlinks nourlexpansion">[' .. coord_link .. uriComponents .. ' ' .. inner .. ']</span>' end --[[ Helper function, convert decimal to degrees ]] local function convert_dec2dms_d(coordinate) local d = math_mod._round( coordinate, 0 ) .. "°" return d .. "" end --[[ Helper function, convert decimal to degrees and minutes ]] local function convert_dec2dms_dm(coordinate) coordinate = math_mod._round( coordinate * 60, 0 ); local m = coordinate % 60; coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°" return d .. string.format( "%02d′", m ) end --[[ Helper function, convert decimal to degrees, minutes, and seconds ]] local function convert_dec2dms_dms(coordinate) coordinate = math_mod._round( coordinate * 60 * 60, 0 ); local s = coordinate % 60 coordinate = math.floor( (coordinate - s) / 60 ); local m = coordinate % 60 coordinate = math.floor( (coordinate - m) / 60 ); local d = coordinate % 360 .."°" return d .. string.format( "%02d′", m ) .. string.format( "%02d″", s ) end --[[ Helper function, convert decimal latitude or longitude to degrees, minutes, and seconds format based on the specified precision. ]] local function convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) local coord = tonumber(coordinate) local postfix if coord >= 0 then postfix = firstPostfix else postfix = secondPostfix end precision = precision:lower(); if precision == "dms" then return convert_dec2dms_dms( math.abs( coord ) ) .. postfix; elseif precision == "dm" then return convert_dec2dms_dm( math.abs( coord ) ) .. postfix; elseif precision == "d" then return convert_dec2dms_d( math.abs( coord ) ) .. postfix; end end --[[ Convert DMS format into a N or E decimal coordinate ]] local function convert_dms2dec(direction, degrees_str, minutes_str, seconds_str) local degrees = tonumber(degrees_str) local minutes = tonumber(minutes_str) or 0 local seconds = tonumber(seconds_str) or 0 local factor = 1 if direction == "S" or direction == "W" then factor = -1 end local precision = 0 if seconds_str then precision = 5 + math.max( math_mod._precision(seconds_str), 0 ); elseif minutes_str and minutes_str ~= '' then precision = 3 + math.max( math_mod._precision(minutes_str), 0 ); else precision = math.max( math_mod._precision(degrees_str), 0 ); end local decimal = factor * (degrees+(minutes+seconds/60)/60) return string.format( "%." .. precision .. "f", decimal ) -- not tonumber since this whole thing is string based. end --[[ Checks input values to for out of range errors. ]] local function validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, source, strong ) local errors = {}; lat_d = tonumber( lat_d ) or 0; lat_m = tonumber( lat_m ) or 0; lat_s = tonumber( lat_s ) or 0; long_d = tonumber( long_d ) or 0; long_m = tonumber( long_m ) or 0; long_s = tonumber( long_s ) or 0; if strong then if lat_d < 0 then table.insert(errors, {source, "latitude degrees < 0 with hemisphere flag"}) end if long_d < 0 then table.insert(errors, {source, "longitude degrees < 0 with hemisphere flag"}) end --[[ #coordinates is inconsistent about whether this is an error. If globe: is specified, it won't error on this condition, but otherwise it will. For not simply disable this check. if long_d > 180 then table.insert(errors, {source, "longitude degrees > 180 with hemisphere flag"}) end ]] end if lat_d > 90 then table.insert(errors, {source, "latitude degrees > 90"}) end if lat_d < -90 then table.insert(errors, {source, "latitude degrees < -90"}) end if lat_m >= 60 then table.insert(errors, {source, "latitude minutes >= 60"}) end if lat_m < 0 then table.insert(errors, {source, "latitude minutes < 0"}) end if lat_s >= 60 then table.insert(errors, {source, "latitude seconds >= 60"}) end if lat_s < 0 then table.insert(errors, {source, "latitude seconds < 0"}) end if long_d >= 360 then table.insert(errors, {source, "longitude degrees >= 360"}) end if long_d <= -360 then table.insert(errors, {source, "longitude degrees <= -360"}) end if long_m >= 60 then table.insert(errors, {source, "longitude minutes >= 60"}) end if long_m < 0 then table.insert(errors, {source, "longitude minutes < 0"}) end if long_s >= 60 then table.insert(errors, {source, "longitude seconds >= 60"}) end if long_s < 0 then table.insert(errors, {source, "longitude seconds < 0"}) end return errors; end --[[ parseDec Transforms decimal format latitude and longitude into the structure to be used in displaying coordinates ]] local function parseDec( lat, long, format ) local coordinateSpec = {} local errors = {} if not long then return nil, {{"parseDec", "Missing longitude"}} elseif not tonumber(long) then return nil, {{"parseDec", "Longitude could not be parsed as a number: " .. long}} end errors = validate( lat, nil, nil, long, nil, nil, 'parseDec', false ); coordinateSpec["dec-lat"] = lat; coordinateSpec["dec-long"] = long; local mode = coordinates.determineMode( lat, long ); coordinateSpec["dms-lat"] = convert_dec2dms( lat, "N", "S", mode) -- {{coord/dec2dms|{{{1}}}|N|S|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} coordinateSpec["dms-long"] = convert_dec2dms( long, "E", "W", mode) -- {{coord/dec2dms|{{{2}}}|E|W|{{coord/prec dec|{{{1}}}|{{{2}}}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dec" end return coordinateSpec, errors end --[[ parseDMS Transforms degrees, minutes, seconds format latitude and longitude into the a structure to be used in displaying coordinates ]] local function parseDMS( lat_d, lat_m, lat_s, lat_f, long_d, long_m, long_s, long_f, format ) local coordinateSpec, errors, backward = {}, {} lat_f = lat_f:upper(); long_f = long_f:upper(); -- Check if specified backward if lat_f == 'E' or lat_f == 'W' then lat_d, long_d, lat_m, long_m, lat_s, long_s, lat_f, long_f, backward = long_d, lat_d, long_m, lat_m, long_s, lat_s, long_f, lat_f, true; end errors = validate( lat_d, lat_m, lat_s, long_d, long_m, long_s, 'parseDMS', true ); if not long_d then return nil, {{"parseDMS", "Missing longitude" }} elseif not tonumber(long_d) then return nil, {{"parseDMS", "Longitude could not be parsed as a number:" .. long_d }} end if not lat_m and not lat_s and not long_m and not long_s and #errors == 0 then if math_mod._precision( lat_d ) > 0 or math_mod._precision( long_d ) > 0 then if lat_f:upper() == 'S' then lat_d = '-' .. lat_d; end if long_f:upper() == 'W' then long_d = '-' .. long_d; end return parseDec( lat_d, long_d, format ); end end coordinateSpec["dms-lat"] = lat_d.."°"..optionalArg(lat_m,"′") .. optionalArg(lat_s,"″") .. lat_f coordinateSpec["dms-long"] = long_d.."°"..optionalArg(long_m,"′") .. optionalArg(long_s,"″") .. long_f coordinateSpec["dec-lat"] = convert_dms2dec(lat_f, lat_d, lat_m, lat_s) -- {{coord/dms2dec|{{{4}}}|{{{1}}}|0{{{2}}}|0{{{3}}}}} coordinateSpec["dec-long"] = convert_dms2dec(long_f, long_d, long_m, long_s) -- {{coord/dms2dec|{{{8}}}|{{{5}}}|0{{{6}}}|0{{{7}}}}} if format then coordinateSpec.default = format else coordinateSpec.default = "dms" end return coordinateSpec, errors, backward end --[[ Check the input arguments for coord to determine the kind of data being provided and then make the necessary processing. ]] local function formatTest(args) local result, errors local backward, primary = false, false local function getParam(args, lim) local ret = {} for i = 1, lim do ret[i] = args[i] or '' end return table.concat(ret, '_') end if not args[1] then -- no lat logic return errorPrinter( {{"formatTest", "Missing latitude"}} ) elseif not tonumber(args[1]) then -- bad lat logic return errorPrinter( {{"formatTest", "Unable to parse latitude as a number:" .. args[1]}} ) elseif not args[4] and not args[5] and not args[6] then -- dec logic result, errors = parseDec(args[1], args[2], args.format) if not result then return errorPrinter(errors); end -- formatting for geohack: geohack expects D_N_D_E notation or D;D notation -- wikiminiatlas doesn't support D;D notation -- #coordinates parserfunction doesn't support negative decimals with NSWE result.param = table.concat({ math.abs(tonumber(args[1])), ((tonumber(args[1]) or 0) < 0) and 'S' or 'N', math.abs(tonumber(args[2])), ((tonumber(args[2]) or 0) < 0) and 'W' or 'E', args[3] or ''}, '_') elseif dmsTest(args[4], args[8]) then -- dms logic result, errors, backward = parseDMS(args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args.format) if args[10] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 9) elseif dmsTest(args[3], args[6]) then -- dm logic result, errors, backward = parseDMS(args[1], args[2], nil, args[3], args[4], args[5], nil, args[6], args['format']) if args[8] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 7) elseif dmsTest(args[2], args[4]) then -- d logic result, errors, backward = parseDMS(args[1], nil, nil, args[2], args[3], nil, nil, args[4], args.format) if args[6] then table.insert(errors, {'formatTest', 'Extra unexpected parameters'}) end if not result then return errorPrinter(errors) end result.param = getParam(args, 5) else -- Error return errorPrinter({{"formatTest", "Unknown argument format"}}) .. '[[Category:Pages with malformed coordinate tags]]' end result.name = args.name local extra_param = {'dim', 'globe', 'scale', 'region', 'source', 'type'} for _, v in ipairs(extra_param) do if args[v] then table.insert(errors, {'formatTest', 'Parameter: "' .. v .. '=" should be "' .. v .. ':"' }) end end local ret = specPrinter(args, result) if #errors > 0 then ret = ret .. ' ' .. errorPrinter(errors) .. '[[Category:Pages with malformed coordinate tags]]' end return ret, backward end --[[ Generate Wikidata tracking categories. ]] local function makeWikidataCategories(qid) local ret local qid = qid or mw.wikibase.getEntityIdForCurrentPage() if mw.wikibase and current_page.namespace == 0 then if qid and mw.wikibase.entityExists(qid) and mw.wikibase.getBestStatements(qid, "P625") and mw.wikibase.getBestStatements(qid, "P625")[1] then local snaktype = mw.wikibase.getBestStatements(qid, "P625")[1].mainsnak.snaktype if snaktype == 'value' then -- coordinates exist both here and on Wikidata, and can be compared. ret = 'Coordinates on Wikidata' elseif snaktype == 'somevalue' then ret = 'Coordinates on Wikidata set to unknown value' elseif snaktype == 'novalue' then ret = 'Coordinates on Wikidata set to no value' end else -- We have to either import the coordinates to Wikidata or remove them here. ret = 'Coordinates not on Wikidata' end end if ret then return string.format('[[Category:%s]]', ret) else return '' end end --[[ link Simple function to export the coordinates link for other uses. Usage: {{#invoke:Coordinates | link }} ]] function coordinates.link(frame) return coord_link; end --[[ dec2dms Wrapper to allow templates to call dec2dms directly. Usage: {{#invoke:Coordinates | dec2dms | decimal_coordinate | positive_suffix | negative_suffix | precision }} decimal_coordinate is converted to DMS format. If positive, the positive_suffix is appended (typical N or E), if negative, the negative suffix is appended. The specified precision is one of 'D', 'DM', or 'DMS' to specify the level of detail to use. ]] coordinates.dec2dms = makeInvokeFunc('_dec2dms') function coordinates._dec2dms(args) local coordinate = args[1] local firstPostfix = args[2] or '' local secondPostfix = args[3] or '' local precision = args[4] or '' return convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision) end --[[ Helper function to determine whether to use D, DM, or DMS format depending on the precision of the decimal input. ]] function coordinates.determineMode( value1, value2 ) local precision = math.max( math_mod._precision( value1 ), math_mod._precision( value2 ) ); if precision <= 0 then return 'd' elseif precision <= 2 then return 'dm'; else return 'dms'; end end --[[ dms2dec Wrapper to allow templates to call dms2dec directly. Usage: {{#invoke:Coordinates | dms2dec | direction_flag | degrees | minutes | seconds }} Converts DMS values specified as degrees, minutes, seconds too decimal format. direction_flag is one of N, S, E, W, and determines whether the output is positive (i.e. N and E) or negative (i.e. S and W). ]] coordinates.dms2dec = makeInvokeFunc('_dms2dec') function coordinates._dms2dec(args) local direction = args[1] local degrees = args[2] local minutes = args[3] local seconds = args[4] return convert_dms2dec(direction, degrees, minutes, seconds) end --[[ coord Main entry point for Lua function to replace {{coord}} Usage: {{#invoke:Coordinates | coord }} {{#invoke:Coordinates | coord | lat | long }} {{#invoke:Coordinates | coord | lat | lat_flag | long | long_flag }} ... Refer to {{coord}} documentation page for many additional parameters and configuration options. Note: This function provides the visual display elements of {{coord}}. In order to load coordinates into the database, the {{#coordinates:}} parser function must also be called, this is done automatically in the Lua version of {{coord}}. ]] coordinates.coord = makeInvokeFunc('_coord') function coordinates._coord(args) if not tonumber(args[1]) and not args[2] then args[3] = args[1]; args[1] = nil local entity = mw.wikibase.getEntityObject(args.qid) if entity and entity.claims and entity.claims.P625 and entity.claims.P625[1].mainsnak.snaktype == 'value' then local precision = entity.claims.P625[1].mainsnak.datavalue.value.precision args[1] = entity.claims.P625[1].mainsnak.datavalue.value.latitude args[2] = entity.claims.P625[1].mainsnak.datavalue.value.longitude if precision then precision = -math_mod._round(math.log(precision)/math.log(10),0) args[1] = math_mod._round(args[1],precision) args[2] = math_mod._round(args[2],precision) end end end local contents, backward = formatTest(args) local Notes = args.notes or '' local Display = args.display and args.display:lower() or 'inline' -- it and ti are short for inline,title and title,inline local function isInline(s) -- Finds whether coordinates are displayed inline. return s:find('inline') ~= nil or s == 'i' or s == 'it' or s == 'ti' end local function isInTitle(s) -- Finds whether coordinates are displayed in the title. return s:find('title') ~= nil or s == 't' or s == 'it' or s == 'ti' end local function coord_wrapper(in_args) -- Calls the parser function {{#coordinates:}}. return mw.getCurrentFrame():callParserFunction('#coordinates', in_args) or '' end local text = '' if isInline(Display) then text = text .. '<span class="geo-inline">' .. contents .. Notes .. '</span>' end if isInTitle(Display) then -- Add to output since indicator content is invisible to Lua later on if not isInline(Display) then text = text .. '<span class="geo-inline-hidden noexcerpt">' .. contents .. Notes .. '</span>' end text = text .. displaytitle(contents .. Notes) .. makeWikidataCategories(args.qid) end if not args.nosave then local page_title, count = mw.title.getCurrentTitle(), 1 if backward then local tmp = {} while not string.find((args[count-1] or ''), '[EW]') do tmp[count] = (args[count] or ''); count = count+1 end tmp.count = count; count = 2*(count-1) while count >= tmp.count do table.insert(tmp, 1, (args[count] or '')); count = count-1 end for i, v in ipairs(tmp) do args[i] = v end else while count <= 9 do args[count] = (args[count] or ''); count = count+1 end end if isInTitle(Display) and not page_title.isTalkPage and page_title.subpageText ~= 'doc' and page_title.subpageText ~= 'testcases' then args[10] = 'primary' end args.notes, args.format, args.display = nil text = text .. coord_wrapper(args) end return text end --[[ coord2text Extracts a single value from a transclusion of {{Coord}}. IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED. Usage: {{#invoke:Coordinates | coord2text | {{Coord}} | parameter }} Valid values for the second parameter are: lat (signed integer), long (signed integer), type, scale, dim, region, globe, source ]] function coordinates._coord2text(coord,type) if coord == '' or type == '' or not type then return nil end type = mw.text.trim(type) if type == 'lat' or type == 'long' then local result, negative = mw.text.split((mw.ustring.match(coord,'[%.%d]+°[NS] [%.%d]+°[EW]') or ''), ' ') if type == 'lat' then result, negative = result[1], 'S' else result, negative = result[2], 'W' end result = mw.text.split(result, '°') if result[2] == negative then result[1] = '-'..result[1] end return result[1] else return mw.ustring.match(coord, 'params=.-_' .. type .. ':(.-)[ _]') end end function coordinates.coord2text(frame) return coordinates._coord2text(frame.args[1],frame.args[2]) end --[[ coordinsert Injects some text into the Geohack link of a transclusion of {{Coord}} (if that text isn't already in the transclusion). Outputs the modified transclusion of {{Coord}}. IF THE GEOHACK LINK SYNTAX CHANGES THIS FUNCTION MUST BE MODIFIED. Usage: {{#invoke:Coordinates | coordinsert | {{Coord}} | parameter:value | parameter:value | … }} Do not make Geohack unhappy by inserting something which isn't mentioned in the {{Coord}} documentation. ]] function coordinates.coordinsert(frame) -- for the 2nd or later integer parameter (the first is the coord template, as above) for i, v in ipairs(frame.args) do if i ~= 1 then -- if we cannot find in the coord_template the i_th coordinsert parameter e.g. region if not mw.ustring.find(frame.args[1], (mw.ustring.match(frame.args[i], '^(.-:)') or '')) then -- find from the params= up to the first possibly-present underscore -- and append the i_th coordinsert parameter and a space -- IDK why we're adding a space but it does seem somewhat convenient frame.args[1] = mw.ustring.gsub(frame.args[1], '(params=.-)_? ', '%1_'..frame.args[i]..' ') end end end if frame.args.name then -- if we can't find the vcard class if not mw.ustring.find(frame.args[1], '<span class="vcard">') then -- take something that looks like a coord template and add the vcard span with class and fn org class local namestr = frame.args.name frame.args[1] = mw.ustring.gsub( frame.args[1], '(<span class="geo%-default">)(<span[^<>]*>[^<>]*</span><span[^<>]*>[^<>]*<span[^<>]*>[^<>]*</span></span>)(</span>)', '%1<span class="vcard">%2<span style="display:none">&#xfeff; (<span class="fn org">' .. namestr .. '</span>)</span></span>%3' ) -- then find anything from coordinates parameters to the 'end' and attach the title parameter frame.args[1] = mw.ustring.gsub( frame.args[1], '(&params=[^&"<>%[%] ]*) ', '%1&title=' .. mw.uri.encode(namestr) .. ' ' ) end end -- replace the existing indicator with a new indicator using the modified content frame.args[1] = mw.ustring.gsub( frame.args[1], '(<span class="geo%-inline[^"]*">(.+)</span>)\127[^\127]*UNIQ%-%-indicator%-%x+%-%-?QINU[^\127]*\127', function (inline, coord) return inline .. displaytitle(coord) end ) return frame.args[1] end return coordinates 6162d7e98fcf6faab5809049e0a48bb3e67d88e3 Module:Coordinates/styles.css 828 607 1203 1202 2023-06-23T00:35:15Z Tasha04 2 1 revision imported text text/plain /* {{pp-template}} */ /* Geographical coordinates defaults. The classes "geo", "longitude", and "latitude" are used by the [[Geo microformat]]. */ .geo-default, .geo-dms, .geo-dec { display: inline; } .geo-nondefault, .geo-multi-punct, .geo-inline-hidden { display: none; } .longitude, .latitude { white-space: nowrap; } 1b5d036501a9f6bc9dcf3c9117e8d6bc97507290 Module:Math 828 608 1205 1204 2023-06-23T00:35:15Z Tasha04 2 1 revision imported Scribunto text/plain --[[ This module provides a number of basic mathematical operations. ]] local yesno, getArgs -- lazily initialized local p = {} -- Holds functions to be returned from #invoke, and functions to make available to other Lua modules. local wrap = {} -- Holds wrapper functions that process arguments from #invoke. These act as intemediary between functions meant for #invoke and functions meant for Lua. --[[ Helper functions used to avoid redundant code. ]] local function err(msg) -- Generates wikitext error messages. return mw.ustring.format('<strong class="error">Formatting error: %s</strong>', msg) end local function unpackNumberArgs(args) -- Returns an unpacked list of arguments specified with numerical keys. local ret = {} for k, v in pairs(args) do if type(k) == 'number' then table.insert(ret, v) end end return unpack(ret) end local function makeArgArray(...) -- Makes an array of arguments from a list of arguments that might include nils. local args = {...} -- Table of arguments. It might contain nils or non-number values, so we can't use ipairs. local nums = {} -- Stores the numbers of valid numerical arguments. local ret = {} for k, v in pairs(args) do v = p._cleanNumber(v) if v then nums[#nums + 1] = k args[k] = v end end table.sort(nums) for i, num in ipairs(nums) do ret[#ret + 1] = args[num] end return ret end local function fold(func, ...) -- Use a function on all supplied arguments, and return the result. The function must accept two numbers as parameters, -- and must return a number as an output. This number is then supplied as input to the next function call. local vals = makeArgArray(...) local count = #vals -- The number of valid arguments if count == 0 then return -- Exit if we have no valid args, otherwise removing the first arg would cause an error. nil, 0 end local ret = table.remove(vals, 1) for _, val in ipairs(vals) do ret = func(ret, val) end return ret, count end --[[ Fold arguments by selectively choosing values (func should return when to choose the current "dominant" value). ]] local function binary_fold(func, ...) local value = fold((function(a, b) if func(a, b) then return a else return b end end), ...) return value end --[[ random Generate a random number Usage: {{#invoke: Math | random }} {{#invoke: Math | random | maximum value }} {{#invoke: Math | random | minimum value | maximum value }} ]] function wrap.random(args) local first = p._cleanNumber(args[1]) local second = p._cleanNumber(args[2]) return p._random(first, second) end function p._random(first, second) math.randomseed(mw.site.stats.edits + mw.site.stats.pages + os.time() + math.floor(os.clock() * 1000000000)) -- math.random will throw an error if given an explicit nil parameter, so we need to use if statements to check the params. if first and second then if first <= second then -- math.random doesn't allow the first number to be greater than the second. return math.random(first, second) end elseif first then return math.random(first) else return math.random() end end --[[ order Determine order of magnitude of a number Usage: {{#invoke: Math | order | value }} ]] function wrap.order(args) local input_string = (args[1] or args.x or '0'); local input_number = p._cleanNumber(input_string); if input_number == nil then return err('order of magnitude input appears non-numeric') else return p._order(input_number) end end function p._order(x) if x == 0 then return 0 end return math.floor(math.log10(math.abs(x))) end --[[ precision Detemines the precision of a number using the string representation Usage: {{ #invoke: Math | precision | value }} ]] function wrap.precision(args) local input_string = (args[1] or args.x or '0'); local trap_fraction = args.check_fraction; local input_number; if not yesno then yesno = require('Module:Yesno') end if yesno(trap_fraction, true) then -- Returns true for all input except nil, false, "no", "n", "0" and a few others. See [[Module:Yesno]]. local pos = string.find(input_string, '/', 1, true); if pos ~= nil then if string.find(input_string, '/', pos + 1, true) == nil then local denominator = string.sub(input_string, pos+1, -1); local denom_value = tonumber(denominator); if denom_value ~= nil then return math.log10(denom_value); end end end end input_number, input_string = p._cleanNumber(input_string); if input_string == nil then return err('precision input appears non-numeric') else return p._precision(input_string) end end function p._precision(x) if type(x) == 'number' then x = tostring(x) end x = string.upper(x) local decimal = x:find('%.') local exponent_pos = x:find('E') local result = 0; if exponent_pos ~= nil then local exponent = string.sub(x, exponent_pos + 1) x = string.sub(x, 1, exponent_pos - 1) result = result - tonumber(exponent) end if decimal ~= nil then result = result + string.len(x) - decimal return result end local pos = string.len(x); while x:byte(pos) == string.byte('0') do pos = pos - 1 result = result - 1 if pos <= 0 then return 0 end end return result end --[[ max Finds the maximum argument Usage: {{#invoke:Math| max | value1 | value2 | ... }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.max(args) return p._max(unpackNumberArgs(args)) end function p._max(...) local max_value = binary_fold((function(a, b) return a > b end), ...) if max_value then return max_value end end --[[ median Find the median of set of numbers Usage: {{#invoke:Math | median | number1 | number2 | ...}} OR {{#invoke:Math | median }} ]] function wrap.median(args) return p._median(unpackNumberArgs(args)) end function p._median(...) local vals = makeArgArray(...) local count = #vals table.sort(vals) if count == 0 then return 0 end if p._mod(count, 2) == 0 then return (vals[count/2] + vals[count/2+1])/2 else return vals[math.ceil(count/2)] end end --[[ min Finds the minimum argument Usage: {{#invoke:Math| min | value1 | value2 | ... }} OR {{#invoke:Math| min }} When used with no arguments, it takes its input from the parent frame. Note, any values that do not evaluate to numbers are ignored. ]] function wrap.min(args) return p._min(unpackNumberArgs(args)) end function p._min(...) local min_value = binary_fold((function(a, b) return a < b end), ...) if min_value then return min_value end end --[[ sum Finds the sum Usage: {{#invoke:Math| sum | value1 | value2 | ... }} OR {{#invoke:Math| sum }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.sum(args) return p._sum(unpackNumberArgs(args)) end function p._sum(...) local sums, count = fold((function(a, b) return a + b end), ...) if not sums then return 0 else return sums end end --[[ average Finds the average Usage: {{#invoke:Math| average | value1 | value2 | ... }} OR {{#invoke:Math| average }} Note, any values that do not evaluate to numbers are ignored. ]] function wrap.average(args) return p._average(unpackNumberArgs(args)) end function p._average(...) local sum, count = fold((function(a, b) return a + b end), ...) if not sum then return 0 else return sum / count end end --[[ round Rounds a number to specified precision Usage: {{#invoke:Math | round | value | precision }} --]] function wrap.round(args) local value = p._cleanNumber(args[1] or args.value or 0) local precision = p._cleanNumber(args[2] or args.precision or 0) if value == nil or precision == nil then return err('round input appears non-numeric') else return p._round(value, precision) end end function p._round(value, precision) local rescale = math.pow(10, precision or 0); return math.floor(value * rescale + 0.5) / rescale; end --[[ log10 returns the log (base 10) of a number Usage: {{#invoke:Math | log10 | x }} ]] function wrap.log10(args) return math.log10(args[1]) end --[[ mod Implements the modulo operator Usage: {{#invoke:Math | mod | x | y }} --]] function wrap.mod(args) local x = p._cleanNumber(args[1]) local y = p._cleanNumber(args[2]) if not x then return err('first argument to mod appears non-numeric') elseif not y then return err('second argument to mod appears non-numeric') else return p._mod(x, y) end end function p._mod(x, y) local ret = x % y if not (0 <= ret and ret < y) then ret = 0 end return ret end --[[ gcd Calculates the greatest common divisor of multiple numbers Usage: {{#invoke:Math | gcd | value 1 | value 2 | value 3 | ... }} --]] function wrap.gcd(args) return p._gcd(unpackNumberArgs(args)) end function p._gcd(...) local function findGcd(a, b) local r = b local oldr = a while r ~= 0 do local quotient = math.floor(oldr / r) oldr, r = r, oldr - quotient * r end if oldr < 0 then oldr = oldr * -1 end return oldr end local result, count = fold(findGcd, ...) return result end --[[ precision_format Rounds a number to the specified precision and formats according to rules originally used for {{template:Rnd}}. Output is a string. Usage: {{#invoke: Math | precision_format | number | precision }} ]] function wrap.precision_format(args) local value_string = args[1] or 0 local precision = args[2] or 0 return p._precision_format(value_string, precision) end function p._precision_format(value_string, precision) -- For access to Mediawiki built-in formatter. local lang = mw.getContentLanguage(); local value value, value_string = p._cleanNumber(value_string) precision = p._cleanNumber(precision) -- Check for non-numeric input if value == nil or precision == nil then return err('invalid input when rounding') end local current_precision = p._precision(value) local order = p._order(value) -- Due to round-off effects it is neccesary to limit the returned precision under -- some circumstances because the terminal digits will be inaccurately reported. if order + precision >= 14 then if order + p._precision(value_string) >= 14 then precision = 13 - order; end end -- If rounding off, truncate extra digits if precision < current_precision then value = p._round(value, precision) current_precision = p._precision(value) end local formatted_num = lang:formatNum(math.abs(value)) local sign -- Use proper unary minus sign rather than ASCII default if value < 0 then sign = '−' else sign = '' end -- Handle cases requiring scientific notation if string.find(formatted_num, 'E', 1, true) ~= nil or math.abs(order) >= 9 then value = value * math.pow(10, -order) current_precision = current_precision + order precision = precision + order formatted_num = lang:formatNum(math.abs(value)) else order = 0; end formatted_num = sign .. formatted_num -- Pad with zeros, if needed if current_precision < precision then local padding if current_precision <= 0 then if precision > 0 then local zero_sep = lang:formatNum(1.1) formatted_num = formatted_num .. zero_sep:sub(2,2) padding = precision if padding > 20 then padding = 20 end formatted_num = formatted_num .. string.rep('0', padding) end else padding = precision - current_precision if padding > 20 then padding = 20 end formatted_num = formatted_num .. string.rep('0', padding) end end -- Add exponential notation, if necessary. if order ~= 0 then -- Use proper unary minus sign rather than ASCII default if order < 0 then order = '−' .. lang:formatNum(math.abs(order)) else order = lang:formatNum(order) end formatted_num = formatted_num .. '<span style="margin:0 .15em 0 .25em">×</span>10<sup>' .. order .. '</sup>' end return formatted_num end --[[ divide Implements the division operator Usage: {{#invoke:Math | divide | x | y | round= | precision= }} --]] function wrap.divide(args) local x = args[1] local y = args[2] local round = args.round local precision = args.precision if not yesno then yesno = require('Module:Yesno') end return p._divide(x, y, yesno(round), precision) end function p._divide(x, y, round, precision) if y == nil or y == "" then return err("Empty divisor") elseif not tonumber(y) then if type(y) == 'string' and string.sub(y, 1, 1) == '<' then return y else return err("Not a number: " .. y) end elseif x == nil or x == "" then return err("Empty dividend") elseif not tonumber(x) then if type(x) == 'string' and string.sub(x, 1, 1) == '<' then return x else return err("Not a number: " .. x) end else local z = x / y if round then return p._round(z, 0) elseif precision then return p._round(z, precision) else return z end end end --[[ Helper function that interprets the input numerically. If the input does not appear to be a number, attempts evaluating it as a parser functions expression. ]] function p._cleanNumber(number_string) if type(number_string) == 'number' then -- We were passed a number, so we don't need to do any processing. return number_string, tostring(number_string) elseif type(number_string) ~= 'string' or not number_string:find('%S') then -- We were passed a non-string or a blank string, so exit. return nil, nil; end -- Attempt basic conversion local number = tonumber(number_string) -- If failed, attempt to evaluate input as an expression if number == nil then local success, result = pcall(mw.ext.ParserFunctions.expr, number_string) if success then number = tonumber(result) number_string = tostring(number) else number = nil number_string = nil end else number_string = number_string:match("^%s*(.-)%s*$") -- String is valid but may contain padding, clean it. number_string = number_string:match("^%+(.*)$") or number_string -- Trim any leading + signs. if number_string:find('^%-?0[xX]') then -- Number is using 0xnnn notation to indicate base 16; use the number that Lua detected instead. number_string = tostring(number) end end return number, number_string end --[[ Wrapper function that does basic argument processing. This ensures that all functions from #invoke can use either the current frame or the parent frame, and it also trims whitespace for all arguments and removes blank arguments. ]] local mt = { __index = function(t, k) return function(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return wrap[k](getArgs(frame)) -- Argument processing is left to Module:Arguments. Whitespace is trimmed and blank arguments are removed. end end } return setmetatable(p, mt) 2bbe734d898299f65412963a3c1782e9fcc4d9ca Module:URL 828 611 1211 1210 2023-06-23T00:35:16Z Tasha04 2 1 revision imported Scribunto text/plain -- -- This module implements {{URL}} -- -- See unit tests at [[Module:URL/testcases]] local p = {} local function safeUri(s) local success, uri = pcall(function() return mw.uri.new(s) end) if success then return uri end end local function extractUrl(args) for name, val in pairs(args) do if name ~= 2 and name ~= "msg" then local url = name .. "=" .. val; url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url); if uri and uri.host then return url end end end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') local nomsg = (msg or ''):sub(1,1):lower() == "n" or msg == 'false' -- boolean: true if msg is "false" or starts with n or N if url == '' then if text == '' then if nomsg then return nil else return mw.getCurrentFrame():expandTemplate{ title = 'tlx', args = { 'URL', "''example.com''", "''optional display text''" } } end else return text end end -- If the URL contains any unencoded spaces, encode them, because MediaWiki will otherwise interpret a space as the end of the URL. url = mw.ustring.gsub(url, '%s', function(s) return mw.uri.encode(s, 'PATH') end) -- If there is an empty query string or fragment id, remove it as it will cause mw.uri.new to throw an error url = mw.ustring.gsub(url, '#$', '') url = mw.ustring.gsub(url, '%?$', '') -- If it's an HTTP[S] URL without the double slash, fix it. url = mw.ustring.gsub(url, '^[Hh][Tt][Tt][Pp]([Ss]?):(/?)([^/])', 'http%1://%3') local uri = safeUri(url) -- Handle URL's without a protocol and URL's that are protocol-relative, -- e.g. www.example.com/foo or www.example.com:8080/foo, and //www.example.com/foo if uri and (not uri.protocol or (uri.protocol and not uri.host)) and url:sub(1, 2) ~= '//' then url = 'http://' .. url uri = safeUri(url) end if text == '' then if uri then if uri.path == '/' then uri.path = '' end local port = '' if uri.port then port = ':' .. uri.port end text = mw.ustring.lower(uri.host or '') .. port .. (uri.relativePath or '') -- Add <wbr> before _/.-# sequences text = mw.ustring.gsub(text,"(/+)","<wbr/>%1") -- This entry MUST be the first. "<wbr/>" has a "/" in it, you know. text = mw.ustring.gsub(text,"(%.+)","<wbr/>%1") -- text = mw.ustring.gsub(text,"(%-+)","<wbr/>%1") -- DISABLED for now text = mw.ustring.gsub(text,"(%#+)","<wbr/>%1") text = mw.ustring.gsub(text,"(_+)","<wbr/>%1") else -- URL is badly-formed, so just display whatever was passed in text = url end end return mw.ustring.format('<span class="url">[%s %s]</span>', url, text) end --[[ The main entry point for calling from Template:URL. --]] function p.url(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' local msg = templateArgs.msg or parentArgs.msg or '' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' return p._url(url, text, msg) end --[[ The entry point for calling from the forked Template:URL2. This function returns no message by default. It strips out wiki-link markup, html tags, and everything after a space. --]] function p.url2(frame) local templateArgs = frame.args local parentArgs = frame:getParent().args local url = templateArgs[1] or parentArgs[1] local text = templateArgs[2] or parentArgs[2] or '' -- default to no message local msg = templateArgs.msg or parentArgs.msg or 'no' url = url or extractUrl(templateArgs) or extractUrl(parentArgs) or '' -- if the url came from a Wikidata call, it might have a pen icon appended -- we want to keep that and add it back at the end. local u1, penicon = mw.ustring.match( url, "(.*)(&nbsp;<span class='penicon.*)" ) if penicon then url = u1 end -- strip out html tags and [ ] from url url = (url or ''):gsub("<[^>]*>", ""):gsub("[%[%]]", "") -- truncate anything after a space url = url:gsub("%%20", " "):gsub(" .*", "") return (p._url(url, text, msg) or "") .. (penicon or "") end return p 8d7a4c6fe04a01815e940475cf64b28e1ef48cfb Module:Collapsible list 828 614 1217 1216 2023-06-23T00:35:17Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} local function gettitlestyletracking( ts ) if not ts then return '' end ts = mw.ustring.gsub(mw.ustring.lower(ts), '%s', '') local tsvals = mw.text.split(ts, ';') table.sort(tsvals) local skey = table.concat(tsvals,';') skey = mw.ustring.gsub(skey, '^;', '') skey = mw.text.encode(mw.text.encode(skey),'%c%[%]=') if (mw.ustring.match(';' .. ts, ';background:') or mw.ustring.match(';' .. ts, ';background%-color:')) and mw.ustring.match(';' .. ts, ';text%-align:') then return '[[Category:Pages using collapsible list with both background and text-align in titlestyle|' .. skey .. ' ]]' end return '[[Category:Pages using collapsible list without both background and text-align in titlestyle|' .. skey .. ' ]]' end local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height: inherit; margin: 0">%s</li>', data ) end -- Returns an array containing the keys of all positional arguments -- that contain data (i.e. non-whitespace values). local function getArgNums( args ) local nums = {} for k, v in pairs( args ) do if type( k ) == 'number' and k >= 1 and math.floor( k ) == k and type( v ) == 'string' and mw.ustring.match( v, '%S' ) then table.insert( nums, k ) end end table.sort( nums ) return nums end -- Formats a list of classes, styles or other attributes. local function formatAttributes( attrType, ... ) local attributes = { ... } local nums = getArgNums( attributes ) local t = {} for i, num in ipairs( nums ) do table.insert( t, attributes[ num ] ) end if #t == 0 then return '' -- Return the blank string so concatenation will work. end return mw.ustring.format( ' %s="%s"', attrType, table.concat( t, ' ' ) ) end -- TODO: use Module:List. Since the update for this comment is routine, -- this is blocked without a consensus discussion by -- [[MediaWiki_talk:Common.css/Archive_15#plainlist_+_hlist_indentation]] -- if we decide hlist in plainlist in this template isn't an issue, we can use -- module:list directly -- [https://en.wikipedia.org/w/index.php?title=Module:Collapsible_list/sandbox&oldid=1130172480] -- is an implementation (that will code rot slightly I expect) local function buildList( args ) -- Get the list items. local listItems = {} local argNums = getArgNums( args ) for i, num in ipairs( argNums ) do table.insert( listItems, getListItem( args[ num ] ) ) end if #listItems == 0 then return '' end listItems = table.concat( listItems ) -- hack around mw-collapsible show/hide jumpiness by looking for text-alignment -- by setting a margin if centered local textAlignmentCentered = 'text%-align%s*:%s*center' local centeredTitle = (args.title_style and args.title_style:lower():match(textAlignmentCentered) or args.titlestyle and args.titlestyle:lower():match(textAlignmentCentered)) local centeredTitleSpacing if centeredTitle then centeredTitleSpacing = 'margin: 0 4em' else centeredTitleSpacing = '' end -- Get class, style and title data. local collapsibleContainerClass = formatAttributes( 'class', 'collapsible-list', 'mw-collapsible', not args.expand and 'mw-collapsed' ) local collapsibleContainerStyle = formatAttributes( 'style', -- mostly work around .infobox-full-data defaulting to centered 'text-align: left;', args.frame_style, args.framestyle ) local collapsibleTitleStyle = formatAttributes( 'style', 'line-height: 1.6em; font-weight: bold;', args.title_style, args.titlestyle ) local jumpyTitleStyle = formatAttributes( 'style', centeredTitleSpacing ) local title = args.title or 'List' local ulclass = formatAttributes( 'class', 'mw-collapsible-content', args.hlist and 'hlist' ) local ulstyle = formatAttributes( 'style', 'margin-top: 0; margin-bottom: 0; line-height: inherit;', not args.bullets and 'list-style: none; margin-left: 0;', args.list_style, args.liststyle ) local hlist_templatestyles = '' if args.hlist then hlist_templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } end -- Build the list. return mw.ustring.format( '%s<div%s%s>\n<div%s><div%s>%s</div></div>\n<ul%s%s>%s</ul>\n</div>', hlist_templatestyles, collapsibleContainerClass, collapsibleContainerStyle, collapsibleTitleStyle, jumpyTitleStyle, title, ulclass, ulstyle, listItems ) .. gettitlestyletracking(args.title_style or args.titlestyle) end function p.main( frame ) local origArgs if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args for k, v in pairs( frame.args ) do origArgs = frame.args break end else origArgs = frame end local args = {} for k, v in pairs( origArgs ) do if type( k ) == 'number' or v ~= '' then args[ k ] = v end end return buildList( args ) end return p ca7247627fa3951693881fb8ec18d15c7ba84f79 Module:ISO 3166 828 616 1221 1220 2023-06-23T00:35:18Z Tasha04 2 1 revision imported Scribunto text/plain -- to enable us to replicate the current functioning of Country extract, we need to deal with: -- 2 {{<name>}} DONE! -- 3 [[<name>]] DONE! -- 4 [[<name>|<junk>]] DONE! -- 5 [[image:flag of <country>.[svg|gif|png|jpg]|\d+px]] DONE! local p = {} local getArgs = require("Module:Arguments").getArgs local data = mw.loadData("Module:ISO 3166/data/National") --[[----------F I N D N A M E----------]]-- -- Finds the name in the database local function findname(code,cdata,qry) local sqry = p.strip(qry) if cdata["name"] and sqry==p.strip(cdata["name"]) or cdata["isoname"] and sqry==p.strip(cdata["isoname"]) or not cdata["nocode"] and sqry==code or sqry==cdata["alpha3"] or sqry==cdata["numeric"] then return true end for _,tname in pairs(cdata["isonames"] or {}) do if sqry==p.strip(tname) then return true end end for _,tname in pairs(cdata["altnames"] or {}) do if sqry==p.strip(tname) then return true end end return false end --[[----------I S O N A M E----------]]-- -- Find the ISO name of a country/region local function isoname(data,code,lang) if data[code]["isonames"] then local name = data[code]["isodisplaynames"] and data[code]["isodisplaynames"][lang] or data[code]["isonames"][lang] or data[code]["isodisplaynames"] and data[code]["isodisplaynames"][data[code]["defaultlang"] or data["defaultlang"]] or data[code]["isonames"][data[code]["defaultlang"] or data["defaultlang"]] or data[code]["isodisplaynames"] and data[code]["isodisplaynames"]["en"] or data[code]["isonames"]["en"] if name then return name end for _,iname in pairs(data[code]["isonames"]) do return iname end return data[code]["isodisplayname"] or data[code]["isoname"] else return data[code]["isodisplayname"] or data[code]["isoname"] end end --[[----------S T R I P----------]]-- -- Removes junk from the input function p.strip(text) local accents = {["À"]="A",["Á"]="A",["Â"]="A",["Ã"]="A", -- accent list ["Ä"]="A",["Å"]="A",["Ç"]="C",["È"]="E",["É"]="E", ["Ê"]="E",["Ë"]="E",["Ì"]="I",["Í"]="I",["Î"]="I", ["Ï"]="I",["Ñ"]="N",["Ò"]="O",["Ó"]="O",["Ô"]="O", ["Õ"]="O",["Ö"]="O",["Ø"]="O",["Ù"]="U",["Ú"]="U", ["Û"]="U",["Ü"]="U",["Ý"]="Y" } local remove = {"NATION OF","COUNTRY OF","TERRITORY OF", -- text to be removed list "FLAG OF","FLAG","KINGDOM OF","STATE OF"," STATE ", "PROVINCE OF","PROVINCE","TERRITORY" } local patterns = {[".+:"]="",["|.+"]="",["%(.-%)"]="", -- patterns to follow (order may matter) ["%..*"]="",["^THE "]="",["%_"]=" ",["%-"]=" ", ["%d%d?%d?PX"]="", } text = mw.ustring.upper(text) -- Case insensitivity text = mw.ustring.gsub(text,"[À-Ý]",accents) -- Deaccent for pattern,value in pairs(patterns) do -- Follow patterns text = mw.ustring.gsub(text,pattern,value) end for _,words in pairs(remove) do -- Remove unneeded words text = mw.ustring.gsub(text,words,"") end text = mw.ustring.gsub(text,"%W","") -- Remove non alpha-numeric return text end --[[----------P . C A L L S T R I P ---------]]-- -- Calls P.strip but using Module:Arguments function p.callstrip(frame) local args = getArgs(frame) return p.strip(args[1]) or "" end --[[----------P . L U A C O D E---------]]-- -- Makes the ISO code of a country function p.luacode(args) if string.find(args[1] or '',"%-") then args[1], args[2] = string.match(args[1] or '',"^([^%-]*)%-(.*)$") end if args[1] then args[1] = p.strip(args[1]) end if args[2] then args[2] = p.strip(args[2]) end if args["codetype"]=="3" then args["codetype"]="alpha3" end local eot = args.error or "" local catnocountry = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure country]]' local catnosubdivision = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure subdivision]]' if not args[1] then if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry, '<span style="font-size:100%" class="error">"No parameter for the country given"</span>' end if not args[2] then --3166-1 code for alpha2,cdata in pairs(data) do if findname(alpha2,cdata,args[1]) then if args["codetype"]=="numeric" or args["codetype"]=="alpha3" then return cdata[args["codetype"]] else return alpha2 end end end if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry else --3166-2 code for alpha2,cdata in pairs(data) do if findname(alpha2,cdata,args[1]) then if mw.ustring.match(alpha2,"GB") then -- For England, Wales etc. alpha2 = "GB" end local sdata = mw.loadData("Module:ISO 3166/data/"..alpha2) local empty = true for scode,scdata in pairs(sdata) do if type(scdata)=="table" then empty = false if findname(scode,scdata,args[2]) then return alpha2.."-"..scode end end end if mw.title.getCurrentTitle().namespace ~= 0 then catnosubdivision = '' end return catnosubdivision end end if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end return catnocountry end end --[[----------P . C O D E---------]]-- -- Calls P.Luacode but using Module:Arguments function p.code(frame) return p.luacode(getArgs(frame)) or "" end --[[----------P . N U M E R I C---------]]-- -- Calls P.Luacode but using Module:Arguments and setting it to output a numeric value function p.numeric(frame) local args = getArgs(frame) args["codetype"]="numeric" return p.luacode(args) or "" end --[[----------P . L U A N A M E---------]]-- -- Makes the ISO/common name of a country function p.luaname(args) local code1 = p.luacode(args) local code2 = '' if string.find(code1,"%-") then code1, code2 = string.match(code1,"^([^%-]*)%-(.*)$") end if string.find(code1,"^%u%u$") then if code2=="" then --3166-1 alpha-2 code if data[code1] then return (args.isoname or args.lang) and isoname(data,code1,args.lang) or (data[code1]["displayname"] or data[code1]["name"]) else return '[[Category:Wikipedia page with obscure country]]' end else --3166-2 code local sdata if data[code1] then sdata = mw.loadData("Module:ISO 3166/data/"..code1) else return '[[Category:Wikipedia page with obscure country]]' end if sdata[code2] then return (args.isoname or args.lang) and isoname(sdata,code2,args.lang) or (sdata[code2]["displayname"] or sdata[code2]["name"]) else return '[[Category:Wikipedia page with obscure country]]' end end end end --[[----------P . N A M E---------]]-- -- Calls P.Luaname but using Module:Arguments function p.name(frame) return p.luaname(getArgs(frame)) or "" end --[[----------P . G E O C O O R D I N S E R T---------]]-- -- Wrapper for Module:Coordinates.coordinsert function p.geocoordinsert(frame) -- {{#invoke:ISO 3166|geocoordinsert|{{coord|...}} -- |country=..|subdivision1=...|subdivision2=... -- |type=...|scale=...|dim=...|source=...|globe=... -- }} local args = frame.args local subdivisionqueried = false local catnocountry = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure country]]' local catnosubdivision = (args.nocat and args.nocat == 'true') and '' or '[[Category:Wikipedia page with obscure subdivision]]' or '' local tracking = '' local targs = {} targs[1] = args[1] or '' for i, v in pairs(args) do if i == 'country' and not mw.ustring.find(targs[1], 'region:') then local country = v local k, region = 1, '' -- look for a valid subdivision while region == '' and k < 3 do local subdivision = args['subdivision' .. k] or '' if subdivision ~= '' then region = p.luacode({country, subdivision, nocat = 'true'}) subdivisionqueried = true end k = k + 1 end -- subdivision lookup failed or never attempted, try country only if region == '' then region = p.luacode({country, nocat = 'true'}) if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry, catnosubdivision = '', '' end if region == '' then tracking = tracking .. catnocountry elseif subdivisionqueried == true then tracking = tracking .. catnosubdivision end end -- something worked, add it to the targs if region ~= '' then targs[#targs + 1] = 'region:' .. region end elseif i == 'type' or i == 'scale' or i == 'dim' or i == 'source' or i == 'globe' then targs[#targs + 1] = i .. ':' .. v end end -- call Module:Coordinates.coordinsert if there is something to insert if #targs > 1 then local coordinsert = require('Module:Coordinates').coordinsert return coordinsert({args = targs}) .. tracking end -- otherwise, just return the coordinates return targs[1] .. tracking end return p 6bc354f2610f29e712065cbe3ea814144fa3a600 Module:ISO 3166/data/National 828 617 1223 1222 2023-06-23T00:35:18Z Tasha04 2 1 revision imported Scribunto text/plain return { ["AD"] = {alpha3="AND",numeric="020",name="Andorra"}, ["AE"] = {alpha3="ARE",numeric="784",name="United Arab Emirates",altnames={"UAE"}}, ["AF"] = {alpha3="AFG",numeric="004",name="Afghanistan"}, ["AG"] = {alpha3="ATG",numeric="028",name="Antigua and Barbuda"}, ["AI"] = {alpha3="AIA",numeric="660",name="Anguilla"}, ["AL"] = {alpha3="ALB",numeric="008",name="Albania"}, ["AM"] = {alpha3="ARM",numeric="051",name="Armenia"}, ["AO"] = {alpha3="AGO",numeric="024",name="Angola"}, ["AQ"] = {alpha3="ATA",numeric="010",name="Antarctica"}, ["AR"] = {alpha3="ARG",numeric="032",name="Argentina"}, ["AS"] = {alpha3="ASM",numeric="016",name="American Samoa"}, ["AT"] = {alpha3="AUT",numeric="040",name="Austria"}, ["AU"] = {alpha3="AUS",numeric="036",name="Australia"}, ["AW"] = {alpha3="ABW",numeric="533",name="Aruba"}, ["AX"] = {alpha3="ALA",numeric="248",name="Åland Islands",altnames={"Aland Islands","Åland","Aland"}}, ["AZ"] = {alpha3="AZE",numeric="031",name="Azerbaijan"}, ["BA"] = {alpha3="BIH",numeric="070",name="Bosnia and Herzegovina",altnames={"Bosnia"}}, ["BB"] = {alpha3="BRB",numeric="052",name="Barbados"}, ["BD"] = {alpha3="BGD",numeric="050",name="Bangladesh"}, ["BE"] = {alpha3="BEL",numeric="056",name="Belgium"}, ["BF"] = {alpha3="BFA",numeric="854",name="Burkina Faso"}, ["BG"] = {alpha3="BGR",numeric="100",name="Bulgaria"}, ["BH"] = {alpha3="BHR",numeric="048",name="Bahrain"}, ["BI"] = {alpha3="BDI",numeric="108",name="Burundi"}, ["BJ"] = {alpha3="BEN",numeric="204",name="Benin"}, ["BL"] = {alpha3="BLM",numeric="652",name="Saint Barthélemy",altnames={"St Barthelemy"}}, ["BM"] = {alpha3="BMU",numeric="060",name="Bermuda"}, ["BN"] = {alpha3="BRN",numeric="096",name="Brunei",isoname="Brunei Darussalam"}, ["BO"] = {alpha3="BOL",numeric="068",name="Bolivia",isoname="Bolivia (Plurinational State of)"}, ["BQ"] = {alpha3="BES",numeric="535",name="Caribbean Netherlands",isoname="Bonaire, Sint Eustatius and Saba"}, ["BR"] = {alpha3="BRA",numeric="076",name="Brazil"}, ["BS"] = {alpha3="BHS",numeric="044",name="Bahamas"}, ["BT"] = {alpha3="BTN",numeric="064",name="Bhutan"}, ["BV"] = {alpha3="BVT",numeric="074",name="Bouvet Island"}, ["BW"] = {alpha3="BWA",numeric="072",name="Botswana"}, ["BY"] = {alpha3="BLR",numeric="112",name="Belarus"}, ["BZ"] = {alpha3="BLZ",numeric="084",name="Belize"}, ["CA"] = {alpha3="CAN",numeric="124",name="Canada"}, ["CC"] = {alpha3="CCK",numeric="166",name="Cocos (Keeling) Islands",altnames={"Cocos Islands","Keeling Islands"}}, ["CD"] = {alpha3="COD",numeric="180",name="Democratic Republic of the Congo",isoname="Congo, Democratic Republic of the",altnames={"Congo-Kinshasa","DRC","DR Congo"}}, ["CF"] = {alpha3="CAF",numeric="140",name="Central African Republic",altnames={"CAR"}}, ["CG"] = {alpha3="COG",numeric="178",name="Republic of the Congo",isoname="Congo",altnames={"Congo-Brazzaville"}}, ["CH"] = {alpha3="CHE",numeric="756",name="Switzerland"}, ["CI"] = {alpha3="CIV",numeric="384",name="Côte d'Ivoire",altnames={"Ivory Coast"}}, ["CK"] = {alpha3="COK",numeric="184",name="Cook Islands"}, ["CL"] = {alpha3="CHL",numeric="152",name="Chile"}, ["CM"] = {alpha3="CMR",numeric="120",name="Cameroon"}, ["CN"] = {alpha3="CHN",numeric="156",name="China",altnames={"People's Republic of China","PRC"}}, ["CO"] = {alpha3="COL",numeric="170",name="Colombia"}, ["CR"] = {alpha3="CRI",numeric="188",name="Costa Rica"}, ["CU"] = {alpha3="CUB",numeric="192",name="Cuba"}, ["CV"] = {alpha3="CPV",numeric="132",name="Cabo Verde",altnames={"Cape Verde"}}, ["CW"] = {alpha3="CUW",numeric="531",name="Curaçao",altnames={"Curacao"}}, ["CX"] = {alpha3="CXR",numeric="162",name="Christmas Island"}, ["CY"] = {alpha3="CYP",numeric="196",name="Cyprus"}, ["CZ"] = {alpha3="CZE",numeric="203",name="Czech Republic",isoname="Czechia"}, ["DE"] = {alpha3="DEU",numeric="276",name="Germany"}, ["DJ"] = {alpha3="DJI",numeric="262",name="Djibouti"}, ["DK"] = {alpha3="DNK",numeric="208",name="Denmark"}, ["DM"] = {alpha3="DMA",numeric="212",name="Dominica"}, ["DO"] = {alpha3="DOM",numeric="214",name="Dominican Republic"}, ["DZ"] = {alpha3="DZA",numeric="012",name="Algeria"}, ["EC"] = {alpha3="ECU",numeric="218",name="Ecuador"}, ["EE"] = {alpha3="EST",numeric="233",name="Estonia"}, ["EG"] = {alpha3="EGY",numeric="818",name="Egypt"}, ["EH"] = {alpha3="ESH",numeric="732",name="Western Sahara"}, ["ER"] = {alpha3="ERI",numeric="232",name="Eritrea"}, ["ES"] = {alpha3="ESP",numeric="724",name="Spain"}, ["ET"] = {alpha3="ETH",numeric="231",name="Ethiopia"}, ["FI"] = {alpha3="FIN",numeric="246",name="Finland"}, ["FJ"] = {alpha3="FJI",numeric="242",name="Fiji"}, ["FK"] = {alpha3="FLK",numeric="238",name="Falkland Islands",isoname="Falkland Islands (Malvinas)",altnames={"Falklands","Islas Malvinas","Malvinas","Malvinas Islands"}}, ["FM"] = {alpha3="FSM",numeric="583",name="Federated States of Micronesia",isoname="Micronesia (Federated States of)",altnames={"Micronesia"}}, ["FO"] = {alpha3="FRO",numeric="234",name="Faroe Islands",altnames={"Faroer","Faeroer"}}, ["FR"] = {alpha3="FRA",numeric="250",name="France"}, ["GA"] = {alpha3="GAB",numeric="266",name="Gabon"}, ["GB"] = {alpha3="GBR",numeric="826",name="United Kingdom",isoname="United Kingdom of Great Britain and Northern Ireland",altnames={"UK","Great Britain"}}, ["GB-ENG"] = {alpha3="ENG",numeric="000",name="England"}, --Considered to be a country ["GB-NIR"] = {alpha3="NIR",numeric="000",name="Northern Ireland"}, --Considered to be a country ["GB-SCT"] = {alpha3="SCT",numeric="000",name="Scotland"}, --Considered to be a country ["GB-WLS"] = {alpha3="WLS",numeric="000",name="Wales"}, --Considered to be a country ["GB-EAW"] = {alpha3="EAW",numeric="000",name="England and Wales"}, --Considered to be a country ["GD"] = {alpha3="GRD",numeric="308",name="Grenada"}, ["GE"] = {alpha3="GEO",numeric="268",name="Georgia"}, ["GF"] = {alpha3="GUF",numeric="254",name="French Guiana"}, ["GG"] = {alpha3="GGY",numeric="831",name="Guernsey"}, ["GH"] = {alpha3="GHA",numeric="288",name="Ghana"}, ["GI"] = {alpha3="GIB",numeric="292",name="Gibraltar"}, ["GL"] = {alpha3="GRL",numeric="304",name="Greenland"}, ["GM"] = {alpha3="GMB",numeric="270",name="Gambia"}, ["GN"] = {alpha3="GIN",numeric="324",name="Guinea"}, ["GP"] = {alpha3="GLP",numeric="312",name="Guadeloupe"}, ["GQ"] = {alpha3="GNQ",numeric="226",name="Equatorial Guinea"}, ["GR"] = {alpha3="GRC",numeric="300",name="Greece"}, ["GS"] = {alpha3="SGS",numeric="239",name="South Georgia and the South Sandwich Islands"}, ["GT"] = {alpha3="GTM",numeric="320",name="Guatemala"}, ["GU"] = {alpha3="GUM",numeric="316",name="Guam"}, ["GW"] = {alpha3="GNB",numeric="624",name="Guinea-Bissau"}, ["GY"] = {alpha3="GUY",numeric="328",name="Guyana"}, ["HK"] = {alpha3="HKG",numeric="344",name="Hong Kong",altnames={"Hong Kong SAR","HKSAR"}}, ["HM"] = {alpha3="HMD",numeric="334",name="Heard Island and McDonald Islands",altnames={"Heard and McDonald Islands"}}, ["HN"] = {alpha3="HND",numeric="340",name="Honduras"}, ["HR"] = {alpha3="HRV",numeric="191",name="Croatia"}, ["HT"] = {alpha3="HTI",numeric="332",name="Haiti"}, ["HU"] = {alpha3="HUN",numeric="348",name="Hungary"}, ["ID"] = {alpha3="IDN",numeric="360",name="Indonesia"}, ["IE"] = {alpha3="IRL",numeric="372",name="Ireland",altnames={"Republic of Ireland"}}, ["IL"] = {alpha3="ISR",numeric="376",name="Israel"}, ["IM"] = {alpha3="IMN",numeric="833",name="Isle of Man"}, ["IN"] = {alpha3="IND",numeric="356",name="India"}, ["IO"] = {alpha3="IOT",numeric="086",name="British Indian Ocean Territory"}, ["IQ"] = {alpha3="IRQ",numeric="368",name="Iraq"}, ["IR"] = {alpha3="IRN",numeric="364",name="Iran",isoname="Iran (Islamic Republic of)"}, ["IS"] = {alpha3="ISL",numeric="352",name="Iceland"}, ["IT"] = {alpha3="ITA",numeric="380",name="Italy"}, ["JE"] = {alpha3="JEY",numeric="832",name="Jersey"}, ["JM"] = {alpha3="JAM",numeric="388",name="Jamaica"}, ["JO"] = {alpha3="JOR",numeric="400",name="Jordan"}, ["JP"] = {alpha3="JPN",numeric="392",name="Japan"}, ["KE"] = {alpha3="KEN",numeric="404",name="Kenya"}, ["KG"] = {alpha3="KGZ",numeric="417",name="Kyrgyzstan"}, ["KH"] = {alpha3="KHM",numeric="116",name="Cambodia"}, ["KI"] = {alpha3="KIR",numeric="296",name="Kiribati"}, ["KM"] = {alpha3="COM",numeric="174",name="Comoros"}, ["KN"] = {alpha3="KNA",numeric="659",name="Saint Kitts and Nevis",altnames={"St Kitts and Nevis"}}, ["KP"] = {alpha3="PRK",numeric="408",name="North Korea",isoname="Korea (Democratic People's Republic of)",altnames={"Democratic People's Republic of Korea"}}, ["KR"] = {alpha3="KOR",numeric="410",name="South Korea",isoname="Korea, Republic of",altnames={"Republic of Korea"}}, ["KW"] = {alpha3="KWT",numeric="414",name="Kuwait"}, ["KY"] = {alpha3="CYM",numeric="136",name="Cayman Islands"}, ["KZ"] = {alpha3="KAZ",numeric="398",name="Kazakhstan"}, ["LA"] = {alpha3="LAO",numeric="418",name="Laos",isoname="Lao People's Democratic Republic"}, ["LB"] = {alpha3="LBN",numeric="422",name="Lebanon"}, ["LC"] = {alpha3="LCA",numeric="662",name="Saint Lucia",altnames={"St Lucia"}}, ["LI"] = {alpha3="LIE",numeric="438",name="Liechtenstein"}, ["LK"] = {alpha3="LKA",numeric="144",name="Sri Lanka"}, ["LR"] = {alpha3="LBR",numeric="430",name="Liberia"}, ["LS"] = {alpha3="LSO",numeric="426",name="Lesotho"}, ["LT"] = {alpha3="LTU",numeric="440",name="Lithuania"}, ["LU"] = {alpha3="LUX",numeric="442",name="Luxembourg"}, ["LV"] = {alpha3="LVA",numeric="428",name="Latvia"}, ["LY"] = {alpha3="LBY",numeric="434",name="Libya"}, ["MA"] = {alpha3="MAR",numeric="504",name="Morocco"}, ["MC"] = {alpha3="MCO",numeric="492",name="Monaco"}, ["MD"] = {alpha3="MDA",numeric="498",name="Moldova",isoname="Moldova, Republic of"}, ["ME"] = {alpha3="MNE",numeric="499",name="Montenegro"}, ["MF"] = {alpha3="MAF",numeric="663",name="Saint-Martin",isoname="Saint Martin (French part)",altnames={"St Martin","St Martin (French part)","Collectivity of Saint Martin","Collectivity of St Martin"}}, ["MG"] = {alpha3="MDG",numeric="450",name="Madagascar"}, ["MH"] = {alpha3="MHL",numeric="584",name="Marshall Islands"}, ["MK"] = {alpha3="MKD",numeric="807",name="North Macedonia",altnames={"Republic of North Macedonia","Macedonia","Republic of Macedonia","Macedonia, the former Yugoslav Republic of"}}, ["ML"] = {alpha3="MLI",numeric="466",name="Mali"}, ["MM"] = {alpha3="MMR",numeric="104",name="Myanmar",altnames={"Burma"}}, ["MN"] = {alpha3="MNG",numeric="496",name="Mongolia"}, ["MO"] = {alpha3="MAC",numeric="446",name="Macau",isoname="Macao",altnames={"Macau SAR","Macao SAR"}}, ["MP"] = {alpha3="MNP",numeric="580",name="Northern Mariana Islands"}, ["MQ"] = {alpha3="MTQ",numeric="474",name="Martinique"}, ["MR"] = {alpha3="MRT",numeric="478",name="Mauritania"}, ["MS"] = {alpha3="MSR",numeric="500",name="Montserrat"}, ["MT"] = {alpha3="MLT",numeric="470",name="Malta"}, ["MU"] = {alpha3="MUS",numeric="480",name="Mauritius"}, ["MV"] = {alpha3="MDV",numeric="462",name="Maldives"}, ["MW"] = {alpha3="MWI",numeric="454",name="Malawi"}, ["MX"] = {alpha3="MEX",numeric="484",name="Mexico"}, ["MY"] = {alpha3="MYS",numeric="458",name="Malaysia"}, ["MZ"] = {alpha3="MOZ",numeric="508",name="Mozambique"}, ["NA"] = {alpha3="NAM",numeric="516",name="Namibia"}, ["NC"] = {alpha3="NCL",numeric="540",name="New Caledonia"}, ["NE"] = {alpha3="NER",numeric="562",name="Niger"}, ["NF"] = {alpha3="NFK",numeric="574",name="Norfolk Island"}, ["NG"] = {alpha3="NGA",numeric="566",name="Nigeria"}, ["NI"] = {alpha3="NIC",numeric="558",name="Nicaragua"}, ["NL"] = {alpha3="NLD",numeric="528",name="Netherlands"}, ["NO"] = {alpha3="NOR",numeric="578",name="Norway"}, ["NP"] = {alpha3="NPL",numeric="524",name="Nepal"}, ["NR"] = {alpha3="NRU",numeric="520",name="Nauru"}, ["NU"] = {alpha3="NIU",numeric="570",name="Niue"}, ["NZ"] = {alpha3="NZL",numeric="554",name="New Zealand",altnames={"Aotearoa"}}, ["OM"] = {alpha3="OMN",numeric="512",name="Oman"}, ["PA"] = {alpha3="PAN",numeric="591",name="Panama"}, ["PE"] = {alpha3="PER",numeric="604",name="Peru"}, ["PF"] = {alpha3="PYF",numeric="258",name="French Polynesia"}, ["PG"] = {alpha3="PNG",numeric="598",name="Papua New Guinea"}, ["PH"] = {alpha3="PHL",numeric="608",name="Philippines"}, ["PK"] = {alpha3="PAK",numeric="586",name="Pakistan"}, ["PL"] = {alpha3="POL",numeric="616",name="Poland"}, ["PM"] = {alpha3="SPM",numeric="666",name="Saint Pierre and Miquelon",altnames={"St Pierre and Miquelon"}}, ["PN"] = {alpha3="PCN",numeric="612",name="Pitcairn"}, ["PR"] = {alpha3="PRI",numeric="630",name="Puerto Rico"}, ["PS"] = {alpha3="PSE",numeric="275",name="Palestine",isoname="Palestine, State of",altnames={"State of Palestine"}}, ["PT"] = {alpha3="PRT",numeric="620",name="Portugal"}, ["PW"] = {alpha3="PLW",numeric="585",name="Palau"}, ["PY"] = {alpha3="PRY",numeric="600",name="Paraguay"}, ["QA"] = {alpha3="QAT",numeric="634",name="Qatar"}, ["RE"] = {alpha3="REU",numeric="638",name="Réunion"}, ["RO"] = {alpha3="ROU",numeric="642",name="Romania"}, ["RS"] = {alpha3="SRB",numeric="688",name="Serbia"}, ["RU"] = {alpha3="RUS",numeric="643",name="Russia",isoname="Russian Federation"}, ["RW"] = {alpha3="RWA",numeric="646",name="Rwanda"}, ["SA"] = {alpha3="SAU",numeric="682",name="Saudi Arabia"}, ["SB"] = {alpha3="SLB",numeric="090",name="Solomon Islands"}, ["SC"] = {alpha3="SYC",numeric="690",name="Seychelles"}, ["SD"] = {alpha3="SDN",numeric="729",name="Sudan"}, ["SE"] = {alpha3="SWE",numeric="752",name="Sweden"}, ["SG"] = {alpha3="SGP",numeric="702",name="Singapore"}, ["SH"] = {alpha3="SHN",numeric="654",name="Saint Helena, Ascension and Tristan da Cunha"}, ["SI"] = {alpha3="SVN",numeric="705",name="Slovenia"}, ["SJ"] = {alpha3="SJM",numeric="744",name="Svalbard and Jan Mayen"}, ["SK"] = {alpha3="SVK",numeric="703",name="Slovakia"}, ["SL"] = {alpha3="SLE",numeric="694",name="Sierra Leone"}, ["SM"] = {alpha3="SMR",numeric="674",name="San Marino"}, ["SN"] = {alpha3="SEN",numeric="686",name="Senegal"}, ["SO"] = {alpha3="SOM",numeric="706",name="Somalia"}, ["SR"] = {alpha3="SUR",numeric="740",name="Suriname"}, ["SS"] = {alpha3="SSD",numeric="728",name="South Sudan"}, ["ST"] = {alpha3="STP",numeric="678",name="São Tomé and Príncipe",isoname="Sao Tome and Principe",altnames={"Democratic Republic of Sao Tome and Principe"}}, ["SV"] = {alpha3="SLV",numeric="222",name="El Salvador"}, ["SX"] = {alpha3="SXM",numeric="534",name="Sint Maarten",isoname="Sint Maarten (Dutch part)",altnames={"St Maarten","Saint Martin (Dutch part)","St Martin (Dutch part)"}}, ["SY"] = {alpha3="SYR",numeric="760",name="Syria",isoname="Syrian Arab Republic"}, ["SZ"] = {alpha3="SWZ",numeric="748",name="Eswatini",altnames={"Swaziland"}}, ["TC"] = {alpha3="TCA",numeric="796",name="Turks and Caicos Islands"}, ["TD"] = {alpha3="TCD",numeric="148",name="Chad"}, ["TF"] = {alpha3="ATF",numeric="260",name="French Southern and Antarctic Lands",isoname="French Southern Territories"}, ["TG"] = {alpha3="TGO",numeric="768",name="Togo"}, ["TH"] = {alpha3="THA",numeric="764",name="Thailand"}, ["TJ"] = {alpha3="TJK",numeric="762",name="Tajikistan"}, ["TK"] = {alpha3="TKL",numeric="772",name="Tokelau"}, ["TL"] = {alpha3="TLS",numeric="626",name="Timor-Leste",altnames={"East Timor"}}, ["TM"] = {alpha3="TKM",numeric="795",name="Turkmenistan"}, ["TN"] = {alpha3="TUN",numeric="788",name="Tunisia"}, ["TO"] = {alpha3="TON",numeric="776",name="Tonga"}, ["TR"] = {alpha3="TUR",numeric="792",name="Turkey",isoname="Türkiye"}, ["TT"] = {alpha3="TTO",numeric="780",name="Trinidad and Tobago"}, ["TV"] = {alpha3="TUV",numeric="798",name="Tuvalu"}, ["TW"] = {alpha3="TWN",numeric="158",name="Taiwan",isoname="Taiwan, Province of China",altnames={"Republic of China"}}, ["TZ"] = {alpha3="TZA",numeric="834",name="Tanzania",isoname="Tanzania, United Republic of"}, ["UA"] = {alpha3="UKR",numeric="804",name="Ukraine"}, ["UG"] = {alpha3="UGA",numeric="800",name="Uganda"}, ["UM"] = {alpha3="UMI",numeric="581",name="United States Minor Outlying Islands"}, ["US"] = {alpha3="USA",numeric="840",name="United States",isoname="United States of America",altnames={"US","USA","U.S."}}, ["UY"] = {alpha3="URY",numeric="858",name="Uruguay"}, ["UZ"] = {alpha3="UZB",numeric="860",name="Uzbekistan"}, ["VA"] = {alpha3="VAT",numeric="336",name="Vatican City",isoname="Holy See",altnames={"Holy See (Vatican City State)","Vatican City State"}}, ["VC"] = {alpha3="VCT",numeric="670",name="Saint Vincent and the Grenadines",altnames={"St Vincent and the Grenadines"}}, ["VE"] = {alpha3="VEN",numeric="862",name="Venezuela",isoname="Venezuela (Bolivarian Republic of)"}, ["VG"] = {alpha3="VGB",numeric="092",name="British Virgin Islands",isoname="Virgin Islands (British)",altnames={"UK Virgin Islands","BVI"}}, ["VI"] = {alpha3="VIR",numeric="850",name="United States Virgin Islands",isoname="Virgin Islands (U.S.)",altnames={"US Virgin Islands","USVI"}}, ["VN"] = {alpha3="VNM",numeric="704",name="Vietnam",isoname="Viet Nam"}, ["VU"] = {alpha3="VUT",numeric="548",name="Vanuatu"}, ["WF"] = {alpha3="WLF",numeric="876",name="Wallis and Futuna"}, ["WS"] = {alpha3="WSM",numeric="882",name="Samoa"}, ["YE"] = {alpha3="YEM",numeric="887",name="Yemen"}, ["YT"] = {alpha3="MYT",numeric="175",name="Mayotte"}, ["ZA"] = {alpha3="ZAF",numeric="710",name="South Africa"}, ["ZM"] = {alpha3="ZMB",numeric="894",name="Zambia"}, ["ZW"] = {alpha3="ZWE",numeric="716",name="Zimbabwe"} } 1ae753fe1fa53ce062b0a008dbc9778d589666f0 Template:Convinfobox/prisec2 10 622 1233 1232 2023-06-23T00:35:20Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Convinfobox/pri2]]<!--{{convert/{{{2}}}|{{{1}}}|{{{3}}}|{{{4}}}|d=valunit2/{{{d}}}}}<noinclude> [[Category:Subtemplates of Template Convinfobox]] </noinclude>--> b2680a6b956cc0cd7c35c6ea3085e03944317fb9 Module:Native name 828 627 1243 1242 2023-06-23T00:35:22Z Tasha04 2 1 revision imported Scribunto text/plain require('strict'); local getArgs = require ('Module:Arguments').getArgs; local lang_module = require ('Module:Lang'); local yes_no = require('Module:Yesno') local defined_values = { italic = {['no']='no', ['off']='no'}, -- values accepted by |italic= and |italics=; {{lang}} expects 'no' so 'off' must be translated paren = {['no']=true, ['off']=true, ['omit']=true}, -- values accepted by |paren= } local messages_t = { tag_required = 'an IETF language tag as parameter {{{1}}} is required', -- for {{native name}} name_required = 'a name as parameter {{{2}}} is required', tag_required_idx = 'an IETF language tag in |tag%s= is required', -- for {{native name}} when called from {{native name list}} name_required_idx = 'a name in |name%s= is required', empty_list = 'list is empty', -- for {{native name list}} positional = 'positional parameters not supported', br_list = '&lt;br /> lists not allowed', -- for {{native name checker}} list_markup = 'list markup expected for multiple names', malformed_param = 'parameter value is malformed', } local help_links_t = { ['native name'] = '[[Template:Native name|help]]', ['native name checker'] = '[[Template:Native name checker|help]]', ['native name list'] = '[[Template:Native name list|help]]', } local error_cats_t = { ['native name'] = '[[Category:Native name template errors]]', ['native name checker'] = '[[Category:Native name checker template errors]]', ['native name list'] = '[[Category:Native name list template errors]]', } --[[--------------------------< E R R O R _ M S G >------------------------------------------------------------ returns a formatted error message ]] local function error_msg (msg, template, index) local cat = ((0 == mw.title.getCurrentTitle().namespace) and error_cats_t[template]) or ''; if index then local message = string.format (msg, index); return string.format ('<span style="color:#d33">Error {{%s}}: %s (%s)</span>%s', template, message, help_links_t[template], cat) end return string.format ('<span style="color:#d33">Error {{%s}}: %s (%s)</span>%s', template, msg, help_links_t[template], cat) end --[=[-------------------------< _ N A T I V E _ N A M E >------------------------------------------------------ implements {{native name}}; entry point from a module <args_t> is a table of parameter name/value pairs. Parameters that are supported are: args_t[1] - IETF language tag (required) args_t[2] - the native name (required) args_t.italic - accepts string values 'no' or 'off'; {{lang}} expects 'no' so 'off' must be translated args_t.italics - alias of |italic= args_t.paren - accepts 'omit', 'off', or 'no' args_t.icon - alias of paren args_t.parensize - args_t.fontsize - deprecated alias of |parensize= args_t.nolink - any value inhibits wikilinking of language name args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty' error message; mostly for use within another template this function calls these functions in Module:lang: _is_ietf_tag _lang _name_from_tag TODO: add support for romanization and transliteration? add support for postfix so that 'mis' can render something like this: {{native|name|mis|Chotilapacquen|parent=omit|postfix=&#32;([[Coahuiltecan languages|Coahuiltecan]])}} Chotilapacquen (Coahuiltecan) ]=] local function _native_name (args_t) local template = (args_t.template and args_t.template) or 'native name'; -- for error messaging; use 'native name list' when called from native_name_list(), etc if not (args_t[1] or args_t[2]) and yes_no (args_t.suppress_empty_list_error) then return ''; -- if empty list error is suppressed, return empty string elseif not args_t[1] then return error_msg ((args_t.index and messages_t.tag_required_idx) or messages_t.tag_required, template, args_t.index) elseif not args_t[2] then return error_msg ((args_t.index and messages_t.name_required_idx) or messages_t.name_required, template, args_t.index) end args_t.italic = args_t.italics or args_t.italic; -- plural form first in {{native name}} but singular form for {{lang}} args_t.italic = defined_values.italic[args_t.italic] or nil; -- translate assigned value args_t.italics = nil; -- so unset as unneeded args_t.paren = args_t.paren or args_t.icon; args_t.icon = nil; -- unset as unneeded args_t.parensize = args_t.parensize or args_t.fontsize or '100%'; args_t.fontsize = nil; -- unset as unneeded local out_t = {}; table.insert (out_t, lang_module._lang ({args_t[1], args_t[2], ['italic']=args_t.italic, ['template']=template})); if not defined_values.paren[args_t.paren] then table.insert (out_t, '&nbsp;'); table.insert (out_t, table.concat ({ '<span class="languageicon" style="font-size:', args_t.parensize, '; font-weight:normal">'})); if args_t.nolink then table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['template']=template}), ')'})); else if lang_module._is_ietf_tag (args_t[1]) then table.insert (out_t, table.concat ({'(', lang_module._name_from_tag ({args_t[1], ['link'] ='yes', ['template']=template}), ')'})); else table.insert (out_t, '(language?)'); -- TODO: any reason to keep this? end end table.insert (out_t, '</span>'); end return table.concat (out_t); end --[[--------------------------< N A T I V E _ N A M E >-------------------------------------------------------- implements {{native name}}; entry point from the template {{#invoke:native name|native_name|<tag>|<name>|italic=|paren=|parensize=|nolink=}} ]] local function native_name (frame) return _native_name (getArgs (frame)); end --[[--------------------------> _ N A T I V E _ N A M E _ L I S T >-------------------------------------------- implements {{native name}}; entry point from a module <args_t> is a table of parameter name/value pairs. Supports enumerated forms of the {{native name}} parameters: args_t.tagn - IETF language tag (|tag1= required) args_t.namen - the native name (|name1= required) args_t.italicn - accepts string values 'no' or 'off' args_t.italicsn - alias of |italicn= args_t.parenn - accepts 'omit', 'off', or 'no' args_t.iconn - alias of paren args_t.parensizen - args_t.fontsizen - deprecated alias of |parensizen= args_t.nolinkn - any value inhibits wikilinking of language name also supports: args_t.postfixn - wikitext to be appended to list item n (references other appropriate text) args_t.suppress_empty_list_error - when set to 'yes', suppresses an 'empty list' error message; mostly for use within another template ]] local function _native_name_list (args_t) if args_t[1] then return error_msg (messages_t.positional, 'native name list') end local unsorted_enumerators_t = {} -- unsorted k/v table of tagn and namen enumerators where k is the enumerator and v is always true for param, _ in pairs (args_t) do -- loop through all parameters local enumerator = mw.ustring.match (param, "^tag(%d+)$") -- is this a |tagn= parameter? extract enumerator if present if enumerator then -- if there is an enumerator unsorted_enumerators_t[tonumber(enumerator)] = true -- add enumerator to the table else local name_match = mw.ustring.match (param, "^name(%d+)$") -- is this a |tagn= parameter? extract enumerator if present if name_match then -- if there is an enumerator unsorted_enumerators_t[tonumber (name_match)] = true -- add enumerator to the table end end end local enumerators_t = {} -- will hold a sorted sequence of enumerators for n, _ in pairs (unsorted_enumerators_t) do -- loop through the k/v table of enumerators table.insert (enumerators_t, n) -- add the enumerator to the sequence end table.sort (enumerators_t) -- and ascending sort local list_t = {}; -- list of formatted native names goes here for _, n in ipairs (enumerators_t) do -- loop through the sorted enumerators table.insert (list_t, table.concat ({ _native_name ({ -- go render the native name args_t['tag'..n], args_t['name'..n], ['italic'] = args_t['italic'..n], ['italics'] = args_t['italics'..n], ['paren'] = args_t['paren'..n], ['icon'] = args_t['icon'..n], ['parensize'] = args_t['parensize'..n], ['fontsize'] = args_t['fontsize'..n], ['nolink'] = args_t['nolink'..n], ['template'] = 'native name list', -- for error messaging ['index'] = n, -- for error messaging }), args_t['postfix'..n] or '', })); end if 0 == #list_t then return (yes_no (args_t.suppress_empty_list_error) and '') or -- return empty string when error suppressed error_msg (messages_t.empty_list, 'native name list'); -- otherwise error elseif 1 == #list_t then return list_t[1]; -- return the very short list; TODO: add error? else return require ('Module:List').unbulleted (list_t); -- use unbulleted list from module end end --[[--------------------------< N A T I V E _ N A M E _ L I S T >---------------------------------------------- implements {{native name list}}; entry point from the template {{#invoke:native name list|native_name_list|tag1=<tag>|name1=<name>|italic1=|paren1=|parensize1=|nolink1=}} ]] local function native_name_list (frame) return _native_name_list (getArgs (frame)); end --[[--------------------------< _ N A T I V E _ N A M E _ C H E C K E R >-------------------------------------- entry point from a module implements {{native name checker}} for use inside infoboxen: |dataxx = {{native name checker|{{{native_name|}}}}} inspects rendered content of {{{native_name}}}: expects: at least one lang="<valid IETF tag>" html attribute; tag must begin with 2 or three letters followed by a hyphen or double quote character: lang="zh-Hant" or lang="nav" or lang="oj" emits error message when 2 or more lang="<valid IETF tag>" html attribute but list markup <li> tag not found emits error message if any form of '<br />' tag is found per MOS:NOBREAK returns: nothing when |native_name= is omitted or empty assigned value when no error error message on error ]] local function _native_name_checker (args_t) local value = args_t[1]; if not value then -- if |native_name= is omitted or empty return; -- return nothing end local _, count = value:gsub ('lang="%a%a%a?[%-"]%a*', '%1'); if 0 == count then return table.concat ({value, error_msg (messages_t.malformed_param, 'native name checker')}, ' '); -- no {{lang}} or {{native_name}} template end if 1 < count then if not value:find ('<div class="plainlist *" *>') or not value:find ('</div>$') then -- must be wrapped in 'plainlist' div return table.concat ({value, error_msg (messages_t.list_markup, 'native name checker')}, ' '); end end if value:find ('< */? *[Bb][Rr] */? *>') then -- look for something that vaguely resembles a <br /> tag return table.concat ({value, error_msg (messages_t.br_list, 'native name checker')}, ' '); end return value; -- no failed tests, return the value as is end --[[--------------------------< N A T I V E _ N A M E _ C H E C K E R >-------------------------------------- entry point from a module implements {{native name checker}} ]] local function native_name_checker (frame) return _native_name_checker (getArgs (frame)); end --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { native_name = native_name, -- template interface native_name_list = native_name_list, native_name_checker = native_name_checker, _native_name = _native_name, -- other module interface _native_name_list = _native_name_list, _native_name_checker = _native_name_checker, } b58f845623d3e920e8098e96bd84a56d2d3079bb Module:TNT 828 638 1265 1264 2023-06-23T00:35:26Z Tasha04 2 1 revision imported Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then table.insert(params, mw.text.trim(v)) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in pairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in pairs(data.data) do local newVal = {} local name = nil for pos, val in pairs(row) do local columnName = names[pos] if columnName == 'name' then name = val else newVal[columnName] = val end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 9d0d10e54abd232c806dcabccaf03e52858634a1 Template:Native phrase 10 641 1271 1270 2023-06-23T00:35:28Z Tasha04 2 1 revision imported wikitext text/x-wiki #redirect [[Template:Native name]] 561f2c45647b28659d991f0a467779366e7ec49e Template:Country data EU 10 654 1297 1296 2023-06-23T00:35:33Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Country data European Union]]<noinclude>[[Category: Country data redirects|EU]]</noinclude> 2267fd165f54795dc23946ea44a5a5f233a3d041 Template:Infobox former country 10 665 1319 1318 2023-06-23T00:35:38Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Infobox country]] {{r from merger}} d1a087676a1c1fbf80c00fb58bf83cff967f7de4 Template:Cob 10 667 1323 1322 2023-06-23T00:35:39Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Collapse bottom]] {{Redirect category shell| {{R from template shortcut}} }} 1cd16c56552caeb938d794d973d1a13c885f7830 Template:Infobox geopolitical organization 10 668 1325 1324 2023-06-23T00:35:40Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Infobox country]]{{R from alternate name}} <!-- see Template:Infobox Geopolitical organization --> 4d4892c38a22f1866ca7a29f81ddbc7fc26967f5 Module:Uses TemplateStyles 828 670 1329 1328 2023-06-23T00:35:45Z Tasha04 2 1 revision imported Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local link = string.format('[[:%s]]', ts) local sandboxLink = nil local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText)) if tsSandboxTitle and tsSandboxTitle.exists then sandboxLink = format('sandboxlink', link, ':' .. tsSandboxTitle.prefixedText) end end tStylesLinks[i] = sandboxLink or link end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828,829) and 'header-module' or 'header-template') .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for i, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args, cfg) local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 71ca57c37849f38e3c5ee30061bdae730963e48e Module:Uses TemplateStyles/config 828 671 1331 1330 2023-06-23T00:35:45Z Tasha04 2 1 revision imported Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the -- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css -- Set to nil to disable sandbox links. cfg['sandbox_title'] = 'sandbox' -- Error category: this category is added if the module call contains errors -- (e.g. no stylesheet listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Uses TemplateStyles templates with errors' -- Default category: this category is added if no custom category is specified -- in module/template call. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Templates using TemplateStyles' -- Protection conflict category: this category is added if the protection level -- of any stylesheet is lower than the protection level of the template. A category name -- without namespace, or nil to disable categorization (not recommended). cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level' -- Hierarchy of protection levels, used to determine whether one protection level is lower -- than another and thus should populate protection_conflict_category. No protection is treated as zero cfg['protection_hierarchy'] = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } -- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil -- to disable padlock check. cfg['padlock_pattern'] = '{{pp-' -- Missing padlock category: this category is added if a protected stylesheet -- doesn’t contain any padlock template (specified by the above Lua pattern). -- A category name without namespace (no nil allowed) if the pattern is not nil, -- unused (and thus may be nil) otherwise. cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks' return cfg -- Don’t touch this line. 58e7a37c44f6ea3f6b8af54a559d696cc7256493 Template:Flatlist/microformat 10 672 1333 1332 2023-06-23T00:35:45Z Tasha04 2 1 revision imported wikitext text/x-wiki #redirect [[Template:Flatlist]] df7569d0ebf03fea2076c5bc06086bead943262b Module:Based on 828 679 1347 1346 2023-06-23T00:37:55Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} function p.lua_main(frame) local s = frame.args[1] if frame.args[3] then local args = {} for i, v in ipairs(frame.args) do if i >= 2 then args[#args+1] = v end end args['style'] = 'display: inline' args['list_style'] = 'display: inline' args['item1_style'] = 'display: inline' h = mw.html.create('div') h:wikitext(s) h:tag('br') -- h:newline() is not working for some reason h:wikitext('by ') h:wikitext(frame:expandTemplate{ title = 'Unbulleted list', args = args }) return h elseif frame.args[2] then s = s .. '<br />by ' .. frame.args[2] return s end return s end function p.main(frame) return p.lua_main(frame:getParent()) end return p f339a89d130bc03d93a1769df04b16e520723fbf Main Page 0 1 1356 19 2023-06-23T01:03:01Z Tasha04 2 wikitext text/x-wiki {|style="width: 100%; background: none; border-collapse: separate; border-spacing: 8px 4px;" |style="width: 70%; border: 2px solid #c99157; background: #ffec9e; vertical-align: top;"| {|style="width: 100%; background: none;" |- {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:The Main 10 Elemental Kingdoms|The Main 10 Elemental Kingdoms]] |{{CharacterIcon|name=Sodor Empire|link=Sodor Empire|icon=Sodor Empire.png|size=80}} {{CharacterIcon|name=Etrathen Kingdom|link=Etrathen Kingdom|icon=Etrathen Kingdom.png|size=80}} {{CharacterIcon|name=Wraphegia Kingdom|link=Kingdom of Wraphegia|icon=Kingdom of Wraphegia.png|size=80}} {{CharacterIcon|name=Aihekar Kingdom|link=Kingdom of Aihekar|icon=Kingdom of Aihekar.png|size=80}} {{CharacterIcon|name=Icrourynese Empire|link=Icrourynese Empire|icon=Icrourynese Empire.png|size=80}} {{CharacterIcon|name=Preapia Kingdom|link=Kingdom of Preapia|icon=Kingdom of Preapia.png|size=80}} {{CharacterIcon|name=Lakya Kingdom|link=Lakya Kingdom|icon=Lakya Kingdom.png|size=80}} {{CharacterIcon|name=Madian Empire|link=Madian Empire|icon=Madian Empire.png|size=80}} {{CharacterIcon|name=Divine Kingdom of Luithia Palatinatee|link=Divine Kingdom of Luithia Palatinate|icon=Luithia Palatinate.png|size=80}} {{CharacterIcon|name=Dremmutian Brotherhood|link=Dremmutian Brotherhood|icon=Dremmutian Brotherhood.png|size=80}}}} {{CharacterIconGroup |[[:Category:Continents|Continents]] |{{CharacterIcon|name=Valmore|link=Valmore|icon=Valmore emblem.png|size=80}} {{CharacterIcon|name=Margaia|link=Margaia|icon=Margaia emblem.png|size=80}} {{CharacterIcon|name=Cavaarkite|link=Cavaarkite|icon=Cavaarkite emblem.png|size=80}} {{CharacterIcon|name=Sanctus Darius|link=Sanctus Darius|icon=Sanctus Darius emblem.png|size=80}} {{CharacterIcon|name=Docarus|link=Docarus|icon=Docarusemblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:Important Characters|Important Characters]] |{{CharacterIcon|name=|link=|icon=.png|size=80}}}} All [[:Category:Characters|Characters]] on this Wiki All [[:Category:Artifacts|Artifacts]] on this Wiki |} |style="width:30%; border:2px solid #c99157; background:#ffec9e; vertical-align:top;"| {|style="width: 100%; background:none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Other stuff</h2> |- | * [[Termination of Dusk|What is Termination of Dusk]]? |- | |} a80bfefeb873be229ecf76d7f0f433dbd1b7d5c7 Module:Transclusion count/data/H 828 692 1374 1373 2023-06-23T01:27:52Z Tasha04 2 1 revision imported Scribunto text/plain return { ["H-phrases"] = 3300, ["HABS"] = 2200, ["HAER"] = 2400, ["HDS"] = 4200, ["HD_color"] = 2800, ["HKG"] = 3100, ["HMAS"] = 6200, ["HMCS"] = 4600, ["HMM"] = 4500, ["HMS"] = 35000, ["HNLMS"] = 2100, ["HOUR"] = 2300, ["HRV"] = 5500, ["HUN"] = 11000, ["Hab"] = 12000, ["Hair_space"] = 10000, ["Hanging_indent"] = 5900, ["Hansard-contribs"] = 9300, ["Harv"] = 5800, ["Harvard_citation"] = 6000, ["Harvard_citation_no_brackets"] = 45000, ["Harvard_citation_text"] = 6000, ["Harvid"] = 63000, ["Harvnb"] = 44000, ["Harvp"] = 4100, ["Harvtxt"] = 5900, ["Has_short_description"] = 641000, ["Hat"] = 12000, ["Hatnote"] = 582000, ["Hatnote_inline"] = 4000, ["Hatnote_inline/invoke"] = 4000, ["Height"] = 98000, ["Help_me-helped"] = 14000, ["Helpbox"] = 2500, ["Helpbox/styles.css"] = 2500, ["Helpme-helped"] = 2100, ["Hidden"] = 362000, ["Hidden/FC"] = 3800, ["Hidden_archive_bottom"] = 12000, ["Hidden_archive_top"] = 12000, ["Hidden_begin"] = 406000, ["Hidden_begin/styles.css"] = 406000, ["Hidden_category"] = 6400, ["Hidden_end"] = 406000, ["Hidden_ping"] = 4000, ["Hidden_sort_key"] = 19000, ["High-Class"] = 15000, ["High-importance"] = 15000, ["High-use"] = 6000, ["Highlight"] = 6900, ["Highlight/core"] = 7100, ["Highlight_round"] = 3300, ["Hilite"] = 2700, ["Historic_Environment_Scotland"] = 2500, ["Historical"] = 25000, ["Historical_populations"] = 42000, ["History"] = 6900, ["History_icon"] = 9500, ["History_icon2"] = 9500, ["Hlist"] = 230000, ["Hlist/styles.css"] = 7950000, ["Hmbox"] = 24000, ["Hmmm"] = 13000, ["Hndis"] = 69000, ["HockeyDB"] = 2700, ["Hockeydb"] = 2600, ["Hong_Kong_English"] = 3400, ["Horizontal_TOC"] = 5800, ["Horizontal_TOC/styles.css"] = 5800, ["Horse_racing"] = 3500, ["HoursElapsed"] = 41000, ["Hours_elapsed"] = 41000, ["How_to_request_photo_in"] = 2400, ["Howtoreqphotoin"] = 2200, ["Hr"] = 6100, ["Hs"] = 19000, ["Hsp"] = 5800, ["Huge"] = 2400, ["Hugman"] = 7000, ["Human_name_disambiguation"] = 74000, ["Humor"] = 3200, ["Hurricane_season_bar"] = 2400, ["Hurricane_season_bar/button"] = 2400, ["Hurricane_season_bar/styles.css"] = 2400, ["Hurricane_status_small"] = 2400, ["Module:HTMLDecode"] = 652000, ["Module:Hatnote"] = 1800000, ["Module:Hatnote/styles.css"] = 1800000, ["Module:Hatnote_inline"] = 4000, ["Module:Hatnote_list"] = 1090000, ["Module:Hidden_ping"] = 4000, ["Module:High-use"] = 50000, ["Module:Highest_archive_number"] = 127000, ["Module:Historical_populations"] = 42000, ["Module:Hms"] = 235000, } c97ccb355afa051fd7087f2b62aa18e7d51effa7 Module:Hatnote/doc 828 693 1376 1375 2023-06-23T01:27:56Z Tasha04 2 1 revision imported wikitext text/x-wiki {{used in system|in [[MediaWiki:Wantedpages-summary]]}} {{module rating|protected}} {{Lua|Module:Yesno|Module:Arguments}} {{Uses TemplateStyles|Module:Hatnote/styles.css}} This is a meta-module that provides various functions for making [[Wikipedia:Hatnote|hatnotes]]. It implements the {{tl|hatnote}} template, for use in hatnotes at the top of pages, and the {{tl|format link}} template, which is used to format a wikilink for use in hatnotes. It also contains a number of helper functions for use in other Lua hatnote modules. == Use from wikitext == The functions in this module cannot be used directly from #invoke, and must be used through templates instead. Please see [[Template:Hatnote]] and [[Template:Format link]] for documentation. == Use from other Lua modules == To load this module from another Lua module, use the following code. <syntaxhighlight lang="lua"> local mHatnote = require('Module:Hatnote') </syntaxhighlight> You can then use the functions as documented below. === Hatnote === <syntaxhighlight lang="lua"> mHatnote._hatnote(s, options) </syntaxhighlight> Formats the string <var>s</var> as a hatnote. This encloses <var>s</var> in the tags {{tag|div|params=class="hatnote"}}. Options are provided in the <var>options</var> table. Options include: * <var>options.extraclasses</var> - a string of extra classes to provide * <var>options.selfref</var> - if this is not nil or false, adds the class "selfref", used to denote self-references to Wikipedia (see [[Template:Selfref]])) The CSS of the hatnote class is defined in [[Module:Hatnote/styles.css]]. ; Example 1 <syntaxhighlight lang="lua"> mHatnote._hatnote('This is a hatnote.') </syntaxhighlight> Produces: {{tag|div|content=This is a hatnote.|params=class="hatnote"}} Displays as: {{hatnote|This is a hatnote.}} ; Example 2 <syntaxhighlight lang="lua"> mHatnote._hatnote('This is a hatnote.', {extraclasses = 'boilerplate seealso', selfref = true}) </syntaxhighlight> Produces: {{tag|div|content=This is a hatnote.|params=class="hatnote boilerplate seealso selfref"}} Displayed as: {{hatnote|This is a hatnote.|extraclasses=boilerplate seealso|selfref=true}} === Find namespace id === <syntaxhighlight lang="lua"> mHatnote.findNamespaceId(link, removeColon) </syntaxhighlight> Finds the [[WP:NS|namespace id]] of the string <var>link</var>, which should be a valid page name, with or without the section name. This function will not work if the page name is enclosed with square brackets. When trying to parse the namespace name, colons are removed from the start of the link by default. This is helpful if users have specified colons when they are not strictly necessary. If you do not need to check for initial colons, set <var>removeColon</var> to false. ;Examples: : {{code|mHatnote.findNamespaceId('Lion')|lua}} &rarr; 0 : {{code|mHatnote.findNamespaceId('Category:Lions')|lua}} &rarr; 14 : {{code|mHatnote.findNamespaceId(':Category:Lions')|lua}} &rarr; 14 : {{code|mHatnote.findNamespaceId(':Category:Lions', false)|lua}} &rarr; 0 (the namespace is detected as ":Category", rather than "Category") === Make wikitext error === <syntaxhighlight lang="lua"> mHatnote.makeWikitextError(msg, helpLink, addTrackingCategory) </syntaxhighlight> Formats the string <var>msg</var> as a red wikitext error message, with optional link to a help page <var>helpLink</var>. Normally this function also adds {{clc|Hatnote templates with errors}}. To suppress categorization, pass <code>false</code> as third parameter of the function (<code>addTrackingCategory</code>). Examples: :{{code|mHatnote.makeWikitextError('an error has occurred')|lua}} &rarr; <strong class="error">Error: an error has occurred.</strong> :{{code|mHatnote.makeWikitextError('an error has occurred', 'Template:Example#Errors')|lua}} &rarr; <strong class="error">Error: an error has occurred ([[Template:Example#Errors|help]]).</strong> == Examples == For an example of how this module is used in other Lua modules, see [[Module:Main]] <includeonly>{{Sandbox other|| <!-- Categories go here and interwikis go in Wikidata. --> [[Category:Hatnote modules| ]] [[Category:Modules that add a tracking category]] }}</includeonly> 841ceaf6abb05ff4068d75a4926188a0a0ffca08 Module:Unsubst 828 694 1378 1377 2023-06-23T01:28:09Z Tasha04 2 1 revision imported Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p 7f01ffc8aa2ac4a4772f14c12e0b77e384ecabb6 Template:Tlc 10 696 1382 1381 2023-06-23T01:28:15Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link code]] {{Redirect category shell| {{R from template shortcut}} {{R from high-use template}} {{R from move}} }} 48ef4a029c0e27cccb1148a29fb8b7ccb211a4a2 Template:High-risk 10 699 1388 1387 2023-06-23T01:28:18Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:High-use]] {{Rcat shell| {{R with Wikidata item}} {{R from merge}} {{R from template shortcut}} }} 52c9a8c75748fd2b20183ed6c60e1f3c3a435cc9 Module:Transclusion count/data/U 828 700 1390 1389 2023-06-23T01:28:19Z Tasha04 2 1 revision imported Scribunto text/plain return { ["U"] = 228000, ["U.S._Roads_WikiProject"] = 11000, ["UEFA_player"] = 4900, ["UK"] = 4400, ["UKR"] = 12000, ["UK_legislation"] = 2300, ["URL"] = 372000, ["URL2"] = 9900, ["URS"] = 7100, ["URY"] = 2100, ["US$"] = 11000, ["US50_Invite"] = 3700, ["USA"] = 40000, ["USBill"] = 2200, ["USCGC"] = 2600, ["USCongRep-end"] = 5000, ["USCongRep-row"] = 5400, ["USCongRep-start"] = 5000, ["USCongressOrdinal"] = 5900, ["USCongressOrdinal/code"] = 5900, ["USD"] = 4900, ["USGS_gazetteer"] = 11000, ["USNS"] = 2700, ["USN_flag"] = 10000, ["USRD"] = 5000, ["USS"] = 37000, ["USSR"] = 2200, ["USStat"] = 2200, ["US_Census_population"] = 38000, ["US_Census_population/styles.css"] = 38000, ["US_House_succession_box"] = 8700, ["US_State_Abbrev"] = 17000, ["US_county_navigation_box"] = 99000, ["US_government_sources"] = 2500, ["US_patent"] = 2800, ["US_state_navigation_box"] = 16000, ["UTRS"] = 7600, ["UTRS-unblock-user"] = 4900, ["UTZ"] = 2200, ["UZB"] = 2300, ["Ubl"] = 132000, ["Ublist"] = 4800, ["Ubx"] = 12000, ["Ucat"] = 38000, ["Ucfirstletter"] = 5200, ["Uir"] = 27000, ["Ul"] = 5500, ["Ulist"] = 6200, ["Umbox"] = 78000, ["Unassessed-Class"] = 10000, ["Unassessed_class"] = 2070000, ["Unblock-auto_reviewed"] = 5300, ["Unblock-spamun_reviewed"] = 2700, ["Unblock-un_reviewed"] = 16000, ["Unblock_reviewed"] = 66000, ["Unbulleted_list"] = 1200000, ["Uncategorized"] = 2700, ["Under_construction"] = 2400, ["Underline"] = 3600, ["Undisclosed_paid"] = 2900, ["Unindent"] = 4300, ["UnitedStatesCode"] = 3400, ["United_States_presidential_election_results_table_footer"] = 2900, ["United_States_presidential_election_results_table_header"] = 3200, ["United_States_presidential_election_results_table_row"] = 3200, ["United_States_topic"] = 5900, ["Unknown"] = 2600, ["Unknown-Class"] = 9900, ["Unlink"] = 21000, ["Unreferenced"] = 166000, ["Unreferenced_section"] = 35000, ["Unreferenced_stub"] = 2200, ["Unrelated"] = 5500, ["Unreliable_source?"] = 11000, ["Unreliable_sources"] = 8000, ["Unsourced"] = 5100, ["Update"] = 30000, ["Update_after"] = 5000, ["Update_inline"] = 5600, ["Update_inline_span"] = 2800, ["Update_section"] = 3800, ["Update_span"] = 2800, ["Updated"] = 55000, ["UploadCampaignLink"] = 2100, ["Uploader_information"] = 216000, ["Url"] = 86000, ["Use_American_English"] = 69000, ["Use_Australian_English"] = 124000, ["Use_Bangladeshi_English"] = 3000, ["Use_British_English"] = 255000, ["Use_Canadian_English"] = 37000, ["Use_Ghanaian_English"] = 2400, ["Use_Hiberno-English"] = 32000, ["Use_Hong_Kong_English"] = 4000, ["Use_Indian_English"] = 157000, ["Use_Irish_English"] = 18000, ["Use_Kenyan_English"] = 2400, ["Use_New_Zealand_English"] = 21000, ["Use_Nigerian_English"] = 4700, ["Use_Oxford_spelling"] = 2400, ["Use_Pakistani_English"] = 5600, ["Use_Philippine_English"] = 9400, ["Use_South_African_English"] = 7700, ["Use_dmy_dates"] = 1620000, ["Use_first_nonempty"] = 15000, ["Use_list-defined_references"] = 3500, ["Use_mdy_dates"] = 346000, ["Use_shortened_footnotes"] = 2200, ["User"] = 544000, ["User-generated_source"] = 5800, ["User-multi"] = 327000, ["User0"] = 15000, ["User19"] = 11000, ["User2"] = 3900, ["User21"] = 52000, ["User3"] = 237000, ["User4"] = 3200, ["User5"] = 6900, ["UserSummary"] = 114000, ["User_American"] = 2300, ["User_Copy_Edit"] = 2200, ["User_Firefox"] = 5900, ["User_HTML"] = 3000, ["User_OS:Dos/style.css"] = 2100, ["User_QAIbox"] = 5600, ["User_QAIbox/auto"] = 3600, ["User_Translator"] = 2300, ["User_UN"] = 2400, ["User_WP"] = 18000, ["User_WP/switch"] = 18000, ["User_Wikipedia"] = 2300, ["User_Wikipedia_reference"] = 2900, ["User_Wikipedian_For"] = 10000, ["User_Wikipedian_for"] = 15000, ["User_Wikipediholic"] = 2200, ["User_category_header"] = 2200, ["User_committed_identity"] = 2500, ["User_contrib"] = 5000, ["User_current_age"] = 2500, ["User_current_age/days"] = 2500, ["User_current_age/months"] = 2500, ["User_current_age/years"] = 2500, ["User_de"] = 5500, ["User_de-1"] = 7700, ["User_de-2"] = 4400, ["User_de-3"] = 2300, ["User_en"] = 39000, ["User_en-1"] = 2400, ["User_en-2"] = 7600, ["User_en-3"] = 15000, ["User_en-4"] = 8800, ["User_en-5"] = 6500, ["User_en-N"] = 4900, ["User_es"] = 3700, ["User_es-1"] = 7200, ["User_es-2"] = 4700, ["User_es-3"] = 2600, ["User_fr"] = 3800, ["User_fr-1"] = 9100, ["User_fr-2"] = 6400, ["User_fr-3"] = 3800, ["User_html"] = 2700, ["User_in_region"] = 27000, ["User_in_the_United_States"] = 4200, ["User_infobox"] = 3000, ["User_instrument"] = 2800, ["User_invitation"] = 5800, ["User_iso15924"] = 2300, ["User_iso15924/level-text"] = 2800, ["User_iso15924/user_script_catlink"] = 2700, ["User_it-1"] = 2800, ["User_ja-1"] = 2900, ["User_la-1"] = 2700, ["User_link"] = 232000, ["User_lives_in"] = 6900, ["User_male"] = 2200, ["User_oops"] = 2100, ["User_other"] = 582000, ["User_page"] = 44000, ["User_proud"] = 5000, ["User_rights"] = 4900, ["User_ru"] = 3000, ["User_ru-1"] = 2100, ["User_sandbox"] = 290000, ["User_summary"] = 114000, ["User_talk_other"] = 66000, ["User_time_zone"] = 4100, ["User_visited"] = 6400, ["User_wikipedia"] = 2000, ["User_wikipedia/RC_Patrol"] = 3700, ["User_wikipedia/Rollback"] = 2300, ["User_wikipedia/WikiGnome"] = 2700, ["User_wishes_to_visit"] = 6000, ["User_zh"] = 2200, ["Userbox"] = 297000, ["Userbox-2"] = 33000, ["Userbox-level"] = 101000, ["Userbox-r"] = 6100, ["UserboxCOI"] = 27000, ["Userbox_table_bottom"] = 11000, ["Userbox_table_category"] = 2400, ["Userbox_table_top"] = 11000, ["Userbox_table_userbox"] = 11000, ["Userboxbottom"] = 52000, ["Userboxtop"] = 56000, ["Usercheck-short"] = 3600, ["Userlinks"] = 28000, ["Userpage"] = 30000, ["Userpage_blanked"] = 8300, ["Userspace_draft"] = 41000, ["Usgs-gazetteer"] = 11000, ["Ushr"] = 15000, ["Ussc"] = 5100, ["Usurped"] = 5300, ["Utrs"] = 5200, ["Module:URL"] = 567000, ["Module:Unicode_data"] = 1400000, ["Module:Unicode_data/scripts"] = 475000, ["Module:Unstrip"] = 44000, ["Module:Unsubst"] = 12100000, ["Module:Unsubst-infobox"] = 189000, ["Module:Urldecode"] = 4300, ["Module:User"] = 544000, ["Module:UserLinks"] = 854000, ["Module:UserLinks/config"] = 854000, ["Module:UserLinks/extra"] = 23000, ["Module:UserLinks/shared"] = 854000, ["Module:User_contrib"] = 5000, ["Module:Userbox"] = 303000, ["Module:Uses_Wikidata"] = 3100, ["Module:Ustring"] = 695000, } adc4e25f4676a5238db7177f26ec7fe412ad180f Module:Unsubst/doc 828 701 1392 1391 2023-06-23T01:28:20Z Tasha04 2 1 revision imported wikitext text/x-wiki <!-- Categories where indicated at the bottom of this page, please. --> {{High-risk| 3841439 |all-pages = yes}} {{Module rating|protected}} This is a helper module to facilitate a substituted template transform into a template transclusion. Maintenance templates, such as {{tl|Citation needed}} or {{tl|Refimprove}}, should never be substituted. A trick to avoid that is to make a template substitute to its transcluded form. Infoboxes should use [[Module:Unsubst-infobox]], as should any other templates with parameters listed in block format by default. === Usage === To turn a template into a self-substituting template, wrap the existing template code with: <pre> {{SAFESUBST:<noinclude />#invoke:Unsubst||$B= [ ... existing template code ... ] }} </pre> The wikitext to display when not substed must be given as "$B". All other parameters passed to the #invoke will be copied to the generated template invocation as default values. If the value of any of these default parameters is <code>__DATE__</code>, that value in the generated template invocation will be the current month and year. Some templates have a {{tag|noinclude|o}} but no matching {{tag|noinclude|c}} at the end of the template. In such cases the missing {{tag|noinclude|c}} must be added before the ending <code>{{))}}</code>. ==== Advanced ==== <pre> {{SAFESUBST:<noinclude />#invoke:Unsubst||$params=[ parameters ]|$aliases=[ aliases ]|$flags=[ flags ]|$B= [ ... existing template code ... ] }} </pre> Due to Lua limitations, parameters are normally ordered randomly when the template is substituted. {{para|$params}} can be used in #invoke:Unsubst to list template parameters in order, comma-separated (e.g. <code>egg,bacon,sausage,cheese,spam</code>). Numbered parameters should be before others in the list. Any remaining parameters are tacked onto the end of the generated invocation. Parameter aliases can be listed in {{para|$aliases}} (and shouldn't be listed in {{para|$params}}), and will be replaced automatically. Each alias and its replacement should be formatted as <code>alias>replacement</code>, and each of those pairs should be comma-separated (e.g. <code>œuf>egg,melt>cheese</code>). Note that this parameter can function with or without {{para|$params}}. Parameter {{para|$flags}} can be used to modify other facets of the module's behaviour; entries are comma-separated. Valid flags are <code>override</code> (allows parameters in the #invoke: to take precedence over parameters in the original template invocation); <code>keep-whitespace</code> (prevents whitespace from being trimmed from unnamed parameters); and <code>remove-empty</code> (removes empty parameters). These parameters can be manipulated using parser functions to provide more complicated options (note that in the parameters any parser function, or template or module invocation, should also have <code><nowiki>SAFESUBST:<noinclude /></nowiki></code>). Parameter {{para|$template-name}} will override the subst'd templates name with the template name assigned to this parameter. === Example === Consider a template Template:Example containing the following code: <pre> {{SAFESUBST:<noinclude />#invoke:Unsubst||foo=bar |date=__DATE__ |$B= [ ... Template code goes here ... ] }} </pre> {| class="wikitable" ! Original !! Result |- | {{tlsc|example}} || {{tlc|Example|foo=bar|date{{=}}{{#time:F Y}}}} |- | {{tlsc|example|foo{{=}}X}} || {{tlc|Example|foo{{=}}X|date{{=}}{{#time:F Y}}}} |- | {{tlsc|example|baz{{=}}X}} || {{tlc|Example|foo=bar|baz{{=}}X|date{{=}}{{#time:F Y}}}} |- | {{tlsc|example|date{{=}}January 2001}} || {{tlc|Example|foo{{=}}bar|date{{=}}January 2001}} |} <includeonly>{{sandbox other|| | <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Wikipedia metatemplates]] [[Category:Modules that add a tracking category]] }}</includeonly> 8dbb431bb81f29826d442141ca78276f64bfc923 Module:Transclusion count/data/S 828 702 1394 1393 2023-06-23T01:28:42Z Tasha04 2 1 revision imported Scribunto text/plain return { ["S"] = 3500, ["S-aca"] = 6300, ["S-ach"] = 16000, ["S-aft"] = 217000, ["S-aft/filter"] = 217000, ["S-bef"] = 222000, ["S-bef/filter"] = 222000, ["S-break"] = 5000, ["S-civ"] = 2600, ["S-dip"] = 5300, ["S-end"] = 245000, ["S-gov"] = 7800, ["S-hon"] = 3800, ["S-hou"] = 9400, ["S-inc"] = 13000, ["S-legal"] = 9300, ["S-mil"] = 12000, ["S-new"] = 15000, ["S-non"] = 9200, ["S-npo"] = 3900, ["S-off"] = 40000, ["S-par"] = 50000, ["S-par/en"] = 3200, ["S-par/gb"] = 3300, ["S-par/uk"] = 11000, ["S-par/us-hs"] = 11000, ["S-par/us-sen"] = 2000, ["S-ppo"] = 13000, ["S-prec"] = 3200, ["S-rail"] = 6300, ["S-rail-start"] = 6200, ["S-rail/lines"] = 6400, ["S-reg"] = 20000, ["S-rel"] = 18000, ["S-roy"] = 2700, ["S-s"] = 3600, ["S-sports"] = 10000, ["S-start"] = 238000, ["S-ttl"] = 228000, ["S-vac"] = 5900, ["SCO"] = 3700, ["SDcat"] = 5310000, ["SECOND"] = 2300, ["SGP"] = 2500, ["SIA"] = 2600, ["SIPA"] = 2500, ["SLO"] = 4200, ["SMS"] = 7100, ["SMU"] = 2100, ["SPI_archive_notice"] = 70000, ["SPIarchive_notice"] = 69000, ["SPIcat"] = 3800, ["SPIclose"] = 3300, ["SPIpriorcases"] = 64000, ["SR/Olympics_profile"] = 3200, ["SRB"] = 3600, ["SS"] = 20000, ["SSPa"] = 2600, ["STN"] = 12000, ["SUBJECTSPACE_formatted"] = 42000, ["SUI"] = 8400, ["SVG"] = 3300, ["SVG-Logo"] = 17000, ["SVG-Res"] = 15000, ["SVG-logo"] = 2900, ["SVK"] = 5900, ["SVN"] = 5100, ["SWE"] = 12000, ["Sandbox_other"] = 229000, ["Saturday"] = 2600, ["Saved_book"] = 52000, ["Sc"] = 2800, ["Scholia"] = 2700, ["School_block"] = 13000, ["School_disambiguation"] = 3300, ["Schoolblock"] = 6700, ["Schooldis"] = 2700, ["Schoolip"] = 10000, ["Scientist_icon"] = 15000, ["Scientist_icon2"] = 15000, ["Sclass"] = 31000, ["Sclass2"] = 9800, ["Screen_reader-only"] = 43000, ["Screen_reader-only/styles.css"] = 43000, ["Script"] = 5700, ["Script/Arabic"] = 2100, ["Script/Hebrew"] = 4700, ["Script/Nastaliq"] = 14000, ["Script/doc/id-unk"] = 2900, ["Script/doc/id-unk/core"] = 2900, ["Script/doc/id-unk/is-iso-alpha4"] = 2800, ["Script/doc/id-unk/name-to-alpha4"] = 2900, ["Script/styles.css"] = 3000, ["Script/styles_arabic.css"] = 2100, ["Script/styles_hebrew.css"] = 4700, ["Sdash"] = 3000, ["Search_box"] = 48000, ["Search_link"] = 9600, ["Section_link"] = 50000, ["Section_sizes"] = 2300, ["See"] = 11000, ["See_also"] = 181000, ["Seealso"] = 6600, ["Select_skin"] = 4200, ["Selected_article"] = 2700, ["Selected_picture"] = 2500, ["Self"] = 51000, ["Self-published_inline"] = 3800, ["Self-published_source"] = 6600, ["Self-reference"] = 2700, ["Self-reference_tool"] = 5000, ["Self/migration"] = 35000, ["Self2"] = 2200, ["Sent_off"] = 13000, ["Sentoff"] = 4100, ["Separated_entries"] = 173000, ["Sequence"] = 3700, ["Serial_killer_opentask"] = 3500, ["Series_overview"] = 7500, ["Serif"] = 2800, ["Set_category"] = 35000, ["Set_index_article"] = 5700, ["Sets_taxobox_colour"] = 94000, ["Sfn"] = 151000, ["SfnRef"] = 132000, ["Sfnm"] = 3400, ["Sfnp"] = 17000, ["Sfnref"] = 10000, ["Sfrac"] = 4100, ["Sfrac/styles.css"] = 4200, ["SharedIPEDU"] = 3400, ["Shared_IP"] = 11000, ["Shared_IP_advice"] = 16000, ["Shared_IP_corp"] = 5100, ["Shared_IP_edu"] = 127000, ["Shared_IP_gov"] = 3100, ["Sharedip"] = 3300, ["Sharedipedu"] = 3900, ["Sherdog"] = 2600, ["Ship"] = 85000, ["Ship/maintenancecategory"] = 85000, ["Ship_index"] = 7000, ["Shipboxflag"] = 19000, ["Shipboxflag/core"] = 19000, ["Shipwrecks_navbox_footer"] = 9900, ["Shipwrecks_navbox_footer/link"] = 9900, ["Short_description"] = 5420000, ["Short_description/lowercasecheck"] = 5420000, ["Short_pages_monitor"] = 10000, ["Short_pages_monitor/maximum_length"] = 10000, ["Shortcut"] = 19000, ["Should_be_SVG"] = 9200, ["Show_button"] = 2120000, ["Sic"] = 32000, ["Sica"] = 3000, ["Side_box"] = 1110000, ["Sidebar"] = 250000, ["Sidebar_games_events"] = 36000, ["Sidebar_person"] = 2300, ["Sidebar_person/styles.css"] = 2300, ["Sidebar_with_collapsible_lists"] = 92000, ["Sigfig"] = 3700, ["Significant_figures"] = 5000, ["Significant_figures/rnd"] = 4600, ["Signpost-subscription"] = 2100, ["Sildb_prim"] = 2000, ["Silver02"] = 16000, ["Silver2"] = 47000, ["Silver_medal"] = 5400, ["Similar_names"] = 2100, ["Single+double"] = 6600, ["Single+space"] = 14000, ["Single-innings_cricket_match"] = 3200, ["Single_chart"] = 37000, ["Single_chart/chartnote"] = 37000, ["Single_namespace"] = 198000, ["Singlechart"] = 20000, ["Singles"] = 41000, ["Sister-inline"] = 185000, ["Sister_project"] = 1030000, ["Sister_project_links"] = 10000, ["Sisterlinks"] = 2900, ["Skip_to_talk"] = 12000, ["Skip_to_talk/styles.css"] = 12000, ["Sky"] = 2700, ["Sky/styles.css"] = 2700, ["Slink"] = 12000, ["Small"] = 594000, ["Small_Solar_System_bodies"] = 3600, ["Smallcaps"] = 18000, ["Smallcaps/styles.css"] = 18000, ["Smallcaps_all"] = 2900, ["Smalldiv"] = 21000, ["Smaller"] = 72000, ["Smallsup"] = 20000, ["Smiley"] = 43000, ["Snd"] = 152000, ["Snds"] = 6300, ["Soccer_icon"] = 130000, ["Soccer_icon2"] = 130000, ["Soccer_icon4"] = 5100, ["Soccerbase"] = 13000, ["Soccerbase_season"] = 6700, ["Soccerway"] = 74000, ["Sock"] = 46000, ["Sock_list"] = 3700, ["Sockcat"] = 2000, ["Sockmaster"] = 9300, ["Sockpuppet"] = 235000, ["Sockpuppet/altmaster"] = 2000, ["Sockpuppet/categorise"] = 235000, ["SockpuppetCheckuser"] = 5500, ["Sockpuppet_category"] = 45000, ["Sockpuppet_category/confirmed"] = 23000, ["Sockpuppet_category/suspected"] = 22000, ["Sockpuppetcheckuser"] = 3600, ["Sockpuppeteer"] = 24000, ["Soft_redirect"] = 6100, ["Soft_redirect_protection"] = 8200, ["Softredirect"] = 3200, ["Solar_luminosity"] = 4400, ["Solar_mass"] = 5200, ["Solar_radius"] = 4200, ["Soldier_icon"] = 4000, ["Soldier_icon2"] = 4000, ["Song"] = 8300, ["Songs"] = 19000, ["Songs_category"] = 8200, ["Songs_category/core"] = 8200, ["Sort"] = 115000, ["Sortname"] = 51000, ["Source-attribution"] = 27000, ["Source_check"] = 966000, ["Sourcecheck"] = 966000, ["Sources"] = 2300, ["South_America_topic"] = 2500, ["Sp"] = 238000, ["Space"] = 55000, ["Space+double"] = 18000, ["Space+single"] = 13000, ["Spaced_en_dash"] = 184000, ["Spaced_en_dash_space"] = 6400, ["Spaced_ndash"] = 23000, ["Spaces"] = 2680000, ["Spain_metadata_Wikidata"] = 7500, ["Spamlink"] = 13000, ["Species_Latin_name_abbreviation_disambiguation"] = 2200, ["Species_list"] = 14000, ["Speciesbox"] = 286000, ["Speciesbox/getGenus"] = 286000, ["Speciesbox/getSpecies"] = 286000, ["Speciesbox/name"] = 286000, ["Speciesbox/parameterCheck"] = 286000, ["Speciesbox/trim"] = 286000, ["Specieslist"] = 5300, ["Split_article"] = 3600, ["Spnd"] = 4000, ["Sport_icon"] = 14000, ["Sport_icon2"] = 15000, ["SportsYearCatUSstate"] = 6400, ["SportsYearCatUSstate/core"] = 6400, ["Sports_links"] = 64000, ["Sports_reference"] = 7300, ["Squad_maintenance"] = 3400, ["Sronly"] = 41000, ["Srt"] = 4900, ["Stack"] = 25000, ["Stack/styles.css"] = 34000, ["Stack_begin"] = 8900, ["Stack_end"] = 8800, ["StaleIP"] = 3200, ["Standings_Table_End"] = 4400, ["Standings_Table_Entry"] = 4400, ["Standings_Table_Start"] = 4400, ["Standings_table_end"] = 53000, ["Standings_table_entry"] = 53000, ["Standings_table_entry/record"] = 53000, ["Standings_table_start"] = 53000, ["Standings_table_start/colheader"] = 53000, ["Standings_table_start/colspan"] = 53000, ["Starbox_astrometry"] = 5100, ["Starbox_begin"] = 5300, ["Starbox_catalog"] = 5200, ["Starbox_character"] = 5100, ["Starbox_detail"] = 5000, ["Starbox_end"] = 5200, ["Starbox_image"] = 2900, ["Starbox_observe"] = 5000, ["Starbox_reference"] = 5200, ["Start-Class"] = 121000, ["Start-date"] = 3800, ["Start_and_end_dates"] = 2600, ["Start_box"] = 8100, ["Start_date"] = 429000, ["Start_date_and_age"] = 136000, ["Start_date_and_years_ago"] = 6700, ["Start_of_course_timeline"] = 5900, ["Start_of_course_week"] = 6000, ["Start_tab"] = 4800, ["Startflatlist"] = 142000, ["Static_IP"] = 6000, ["Station"] = 7600, ["Station_link"] = 16000, ["Stdinchicite"] = 10000, ["Steady"] = 13000, ["Stl"] = 14000, ["Stn"] = 7200, ["Stn_art_lnk"] = 2000, ["Stnlnk"] = 30000, ["Storm_colour"] = 5100, ["Storm_path"] = 2100, ["StoryTeleplay"] = 3400, ["Str_endswith"] = 197000, ["Str_find"] = 114000, ["Str_index"] = 13000, ["Str_left"] = 11200000, ["Str_len"] = 18000, ["Str_letter"] = 174000, ["Str_letter/trim"] = 20000, ["Str_number"] = 8000, ["Str_number/trim"] = 141000, ["Str_rep"] = 310000, ["Str_right"] = 10300000, ["Str_trim"] = 5400, ["Str_≠_len"] = 33000, ["Str_≥_len"] = 70000, ["Strfind_short"] = 220000, ["Strikethrough"] = 15000, ["String_split"] = 2300, ["Strip_tags"] = 37000, ["Strong"] = 846000, ["Structurae"] = 2100, ["Stub-Class"] = 43000, ["Stub_Category"] = 13000, ["Stub_category"] = 18000, ["Stub_documentation"] = 36000, ["Student_editor"] = 27000, ["Student_sandbox"] = 4500, ["Student_table_row"] = 5100, ["Students_table"] = 5100, ["Su"] = 9700, ["Su-census1989"] = 4500, ["Sub"] = 4100, ["Subinfobox_bodystyle"] = 35000, ["Subject_bar"] = 18000, ["Suboff"] = 6100, ["Subon"] = 6200, ["Subpage_other"] = 280000, ["Subscription"] = 5800, ["Subscription_required"] = 34000, ["Subsidebar_bodystyle"] = 6500, ["Subst_only"] = 4500, ["Substituted_comment"] = 19000, ["Succession_box"] = 118000, ["Succession_links"] = 161000, ["Summer_Olympics_by_year_category_navigation"] = 2400, ["Summer_Olympics_by_year_category_navigation/core"] = 2400, ["Sunday"] = 2600, ["Sup"] = 58000, ["Superimpose2/base"] = 2100, ["Suppress_categories"] = 5100, ["Surname"] = 65000, ["Swiss_populations"] = 2400, ["Swiss_populations_NC"] = 3000, ["Swiss_populations_YM"] = 2300, ["Swiss_populations_ref"] = 2400, ["Switcher"] = 2400, ["Module:SDcat"] = 5310000, ["Module:SPI_archive_notice"] = 32000, ["Module:Science_redirect"] = 251000, ["Module:Science_redirect/conf"] = 251000, ["Module:Section_link"] = 50000, ["Module:Section_sizes"] = 3400, ["Module:See_also_if_exists"] = 72000, ["Module:Separated_entries"] = 2260000, ["Module:Series_overview"] = 7600, ["Module:Settlement_short_description"] = 707000, ["Module:Shortcut"] = 23000, ["Module:Shortcut/config"] = 23000, ["Module:Shortcut/styles.css"] = 23000, ["Module:Side_box"] = 1140000, ["Module:Side_box/styles.css"] = 1130000, ["Module:Sidebar"] = 333000, ["Module:Sidebar/configuration"] = 333000, ["Module:Sidebar/styles.css"] = 338000, ["Module:Sidebar_games_events"] = 36000, ["Module:Sidebar_games_events/styles.css"] = 36000, ["Module:Singles"] = 41000, ["Module:Sister_project_links"] = 14000, ["Module:Sister_project_links/bar/styles.css"] = 3200, ["Module:Sister_project_links/styles.css"] = 10000, ["Module:Sock_list"] = 3700, ["Module:Sort_title"] = 17000, ["Module:Sortkey"] = 195000, ["Module:Split_article"] = 3600, ["Module:Sports_career"] = 19000, ["Module:Sports_color"] = 68000, ["Module:Sports_color/baseball"] = 34000, ["Module:Sports_color/basketball"] = 22000, ["Module:Sports_color/ice_hockey"] = 3100, ["Module:Sports_rbr_table"] = 11000, ["Module:Sports_rbr_table/styles.css"] = 11000, ["Module:Sports_reference"] = 7300, ["Module:Sports_results"] = 14000, ["Module:Sports_results/styles.css"] = 9300, ["Module:Sports_table"] = 56000, ["Module:Sports_table/WDL"] = 49000, ["Module:Sports_table/WDL_OT"] = 2500, ["Module:Sports_table/WL"] = 3800, ["Module:Sports_table/argcheck"] = 56000, ["Module:Sports_table/styles.css"] = 56000, ["Module:Sports_table/sub"] = 57000, ["Module:Sports_table/totalscheck"] = 41000, ["Module:Stock_tickers/NYSE"] = 2100, ["Module:Storm_categories"] = 5100, ["Module:Storm_categories/categories"] = 5200, ["Module:Storm_categories/colors"] = 5100, ["Module:Storm_categories/icons"] = 5200, ["Module:String"] = 18700000, ["Module:String2"] = 2260000, ["Module:Su"] = 12000, ["Module:Subject_bar"] = 18000, ["Module:Suppress_categories"] = 5200, } aa85abf3f27208caa0afad91656cc53fe0fae8f7 Module:Sidebar/doc 828 703 1396 1395 2023-06-23T01:28:43Z Tasha04 2 1 revision imported wikitext text/x-wiki {{High-risk|155000+}} {{module rating|protected}} {{Lua|Module:Sidebar/configuration|Module:Navbar|Module:Arguments}} {{Uses TemplateStyles|Module:Sidebar/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}} This module implements the templates {{tl|sidebar}} and {{tl|sidebar with collapsible lists}}. See the individual template pages for documentation. <includeonly>{{sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Sidebar meta-templates| ]] [[Category:Modules that add a tracking category]] [[Category:Modules that check for strip markers]] }}</includeonly> 710222793e9c5fe515b611d11ddac712a409e814 Module:Transclusion count/data/M 828 704 1398 1397 2023-06-23T01:29:10Z Tasha04 2 1 revision imported Scribunto text/plain return { ["M"] = 2000, ["MAD"] = 2100, ["MAR"] = 2800, ["MAS"] = 2500, ["MDG"] = 2300, ["MEX"] = 6100, ["MILHIST"] = 13000, ["MINUTE"] = 2300, ["MKD"] = 2300, ["MLB_Farm_System"] = 2100, ["MLB_Year"] = 14000, ["MLB_standings"] = 3700, ["MLBplayer"] = 3900, ["MMA_record_start"] = 3600, ["MMArecordbox"] = 3600, ["MMSI_Number"] = 3100, ["MONTH"] = 12000, ["MONTHNAME"] = 812000, ["MONTHNUMBER"] = 829000, ["MS"] = 5100, ["MV"] = 8800, ["MYS"] = 3600, ["MacTutor"] = 2000, ["Main"] = 336000, ["Main_article"] = 29000, ["Main_other"] = 9460000, ["Main_page_image"] = 25000, ["Main_page_image/DYK"] = 8800, ["Main_page_image/ITN/styles.css"] = 2400, ["Main_page_image/TFA"] = 4600, ["Maintenance_category"] = 38000, ["Malay_name"] = 2200, ["Map_requested"] = 9400, ["Map_requested/Category_helper"] = 7700, ["Maplink"] = 27000, ["Maplink-road"] = 5400, ["Marriage"] = 70000, ["Marriage/doc"] = 69000, ["Marriage/styles.css"] = 70000, ["Math"] = 9400, ["MathGenealogy"] = 6900, ["MathWorld"] = 2400, ["Mathgenealogy"] = 2100, ["Maths_rating"] = 20000, ["Max"] = 240000, ["Maybe_free_media"] = 12000, ["Mbox"] = 2820000, ["Mdash"] = 8600, ["MeSH_name"] = 6100, ["Medal"] = 111000, ["MedalBottom"] = 17000, ["MedalBronze"] = 53000, ["MedalComp"] = 2000, ["MedalCompetition"] = 86000, ["MedalCount"] = 3100, ["MedalCountry"] = 77000, ["MedalGold"] = 52000, ["MedalOlympic"] = 4000, ["MedalOlympics"] = 6100, ["MedalSilver"] = 52000, ["MedalSport"] = 76000, ["MedalTableTop"] = 17000, ["MedalTop"] = 4100, ["MedalWorldChampionships"] = 2100, ["MedalistTable"] = 15000, ["Medals_table"] = 14000, ["Media"] = 2600, ["Medical_resources"] = 6700, ["Merge_done"] = 3300, ["Merge_partner"] = 2300, ["Merged-from"] = 16000, ["Merged-to"] = 18000, ["Merged_to"] = 2200, ["MeshName"] = 5900, ["Metacritic_film"] = 4100, ["Metadata_Population_DE-BY"] = 2100, ["Metadata_Population_DE-RP"] = 2300, ["Mhof"] = 7200, ["Mid-Class"] = 15000, ["Mid-importance"] = 15000, ["Middot"] = 8100, ["Midsize"] = 2000, ["MilHist"] = 3900, ["Military_navigation"] = 83000, ["Min"] = 21000, ["Minor_planet"] = 5000, ["Minor_planet_link"] = 2700, ["Minor_planet_list_link"] = 4200, ["Minor_planets_navigator"] = 3200, ["MirrorH"] = 5300, ["Missing_information"] = 3500, ["Mlby"] = 14000, ["Mobile_IP"] = 8800, ["MobyGames"] = 8600, ["Moby_game"] = 6900, ["Mod"] = 15000, ["Module_other"] = 3500, ["Mojo_title"] = 7800, ["Molecular_formula_index"] = 2300, ["Monday"] = 2600, ["Mono"] = 30000, ["Mono/styles.css"] = 31000, ["MonthCategoryNav"] = 34000, ["MonthlyArchive"] = 3400, ["MonthlyLinks"] = 3400, ["Monthly_archive_list"] = 3400, ["Monthly_clean-up_category"] = 16000, ["Monthly_clean-up_category/core"] = 16000, ["Monthly_clean-up_category/monthname"] = 16000, ["Monthly_clean-up_category/monthno"] = 16000, ["Monthly_clean-up_category/name_part"] = 16000, ["Monthly_clean-up_category/outer_core"] = 16000, ["Monthly_clean-up_category/to_add"] = 2700, ["Monthly_clean_up_category"] = 7300, ["Monthyear"] = 77000, ["Monthyear-1"] = 76000, ["MoreInfo"] = 2000, ["More_citations_needed"] = 365000, ["More_citations_needed_section"] = 16000, ["More_footnotes"] = 37000, ["More_footnotes_needed"] = 52000, ["More_plot"] = 2200, ["More_references"] = 3200, ["Moresources"] = 5800, ["Motorcycling"] = 3200, ["Motorsport_season"] = 4900, ["Motorsport_season/styles.css"] = 4900, ["Moved_discussion_from"] = 2800, ["Moved_discussion_to"] = 2500, ["Mp"] = 5000, ["Mpl"] = 2700, ["MultiReplace"] = 209000, ["Multiple_image"] = 49000, ["Multiple_image/styles.css"] = 49000, ["Multiple_issues"] = 123000, ["Multiple_issues/styles.css"] = 123000, ["Music"] = 7500, ["MusicBrainz_artist"] = 2100, ["MusicBrainz_meta"] = 4800, ["Music_ratings"] = 95000, ["Mvar"] = 6700, ["Mw_lang"] = 78000, ["My"] = 2500, ["My_sandbox"] = 3800, ["Myprefs"] = 10000, ["Module:MLB_standings"] = 3700, ["Module:MLB_standings/data"] = 3700, ["Module:Main_page_image"] = 14000, ["Module:Mapframe"] = 422000, ["Module:Math"] = 1550000, ["Module:Medals_table"] = 14000, ["Module:Message_box"] = 9280000, ["Module:Message_box/ambox.css"] = 3030000, ["Module:Message_box/cmbox.css"] = 415000, ["Module:Message_box/configuration"] = 9280000, ["Module:Message_box/fmbox.css"] = 19000, ["Module:Message_box/imbox.css"] = 922000, ["Module:Message_box/ombox.css"] = 1500000, ["Module:Message_box/tmbox.css"] = 12000000, ["Module:Military_navigation"] = 83000, ["Module:Minor_planet_list_link"] = 4200, ["Module:MultiReplace"] = 811000, ["Module:Multiple_image"] = 49000, ["Module:Music_ratings"] = 95000, ["Module:Mw_lang"] = 78000, } 3ae42d38a64ececef60094d9370b9e1f0f5f81bf Module:Message box/tmbox.css 828 705 1400 1399 2023-06-23T01:29:11Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .tmbox { margin: 4px 0; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; box-sizing: border-box; } /* For the "small=yes" option. */ .tmbox.mbox-small { font-size: 88%; line-height: 1.25em; } .tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .tmbox-delete { border: 2px solid #b32424; /* Red */ } .tmbox-content { border: 2px solid #f28500; /* Orange */ } .tmbox-style { border: 2px solid #fc3; /* Yellow */ } .tmbox-move { border: 2px solid #9932cc; /* Purple */ } .tmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .tmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .tmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .tmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .tmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .tmbox { margin: 4px 10%; } .tmbox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } eaa4546995ebb3a8d20394cad8af74ea477bdb44 Module:Message box/fmbox.css 828 706 1402 1401 2023-06-23T01:29:12Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .fmbox { clear: both; margin: 0.2em 0; width: 100%; border: 1px solid #a2a9b1; background-color: #f8f9fa; /* Default "system" gray */ box-sizing: border-box; } .fmbox-warning { border: 1px solid #bb7070; /* Dark pink */ background-color: #ffdbdb; /* Pink */ } .fmbox-editnotice { background-color: transparent; } .fmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .fmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .fmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } .fmbox .mbox-invalid-type { text-align: center; } fca0f5e4b400e4a2ab158b219c52822451211d66 Module:Message box/ambox.css 828 707 1404 1403 2023-06-23T01:29:12Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .ambox { border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. Take into account base templatestyles, * user styles, and Template:Dated maintenance category. * remove link selector when T200206 is fixed */ .ambox + link + .ambox, .ambox + link + style + .ambox, .ambox + link + link + .ambox, /* TODO: raise these as "is this really that necessary???". the change was Dec 2021 */ .ambox + .mw-empty-elt + link + .ambox, .ambox + .mw-empty-elt + link + style + .ambox, .ambox + .mw-empty-elt + link + link + .ambox { margin-top: -1px; } /* For the "small=left" option. */ /* must override .ambox + .ambox styles above */ html body.mediawiki .ambox.mbox-small-left { /* @noflip */ margin: 4px 1em 4px 0; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } .ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } .ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } .ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } .ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } .ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } .ambox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.5em; width: 100%; } .ambox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.5em; text-align: center; } .ambox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.5em 2px 0; text-align: center; } /* An empty narrow cell */ .ambox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ambox .mbox-image-div { width: 52px; } /* Hack around MobileFrontend being opinionated */ html.client-js body.skin-minerva .mbox-text-span { margin-left: 23px !important; } @media (min-width: 720px) { .ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ } } 29898fdc5160b39a8f580c76efe77afa1f6f58a4 Module:Message box/imbox.css 828 708 1406 1405 2023-06-23T01:29:12Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .imbox { margin: 4px 0; border-collapse: collapse; border: 3px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* For imboxes inside imbox-text cells. */ .imbox .mbox-text .imbox { margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */ /* TODO: Still needed? */ display: block; /* Fix for webkit to force 100% width. */ } .imbox-speedy { border: 3px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .imbox-delete { border: 3px solid #b32424; /* Red */ } .imbox-content { border: 3px solid #f28500; /* Orange */ } .imbox-style { border: 3px solid #fc3; /* Yellow */ } .imbox-move { border: 3px solid #9932cc; /* Purple */ } .imbox-protection { border: 3px solid #a2a9b1; /* Gray-gold */ } .imbox-license { border: 3px solid #88a; /* Dark gray */ background-color: #f7f8ff; /* Light gray */ } .imbox-featured { border: 3px solid #cba135; /* Brown-gold */ } .imbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .imbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .imbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .imbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .imbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .imbox { margin: 4px 10%; } } 1e82a3c342695a9b4fbdcc4e5e0930d4845a23d4 Module:Message box/cmbox.css 828 709 1408 1407 2023-06-23T01:29:13Z Tasha04 2 1 revision imported text text/plain /* {{pp|small=y}} */ .cmbox { margin: 3px 0; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */ } .cmbox-move { background-color: #e4d8ff; /* Purple */ } .cmbox-protection { background-color: #efefe1; /* Gray-gold */ } .cmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .cmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .cmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .cmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .cmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .cmbox { margin: 3px 10%; } } 95109477b86803acfea977ae0bce2319e72f170d Module:Message box/doc 828 710 1410 1409 2023-06-23T01:29:14Z Tasha04 2 1 revision imported wikitext text/x-wiki {{Used in system}} {{module rating|p}} {{Lua|Module:Message box/configuration|Module:Yesno|Module:Arguments|Module:Category handler}} {{Uses TemplateStyles|Module:Message box/ambox.css|Module:Message box/cmbox.css|Module:Message box/fmbox.css|Module:Message box/imbox.css|Module:Message box/ombox.css|Module:Message box/tmbox.css}} This is a meta-module that implements the message box templates {{tl|mbox}}, {{tl|ambox}}, {{tl|cmbox}}, {{tl|fmbox}}, {{tl|imbox}}, {{tl|ombox}}, and {{tl|tmbox}}. It is intended to be used from Lua modules, and should not be used directly from wiki pages. If you want to use this module's functionality from a wiki page, please use the individual message box templates instead. == Usage == To use this module from another Lua module, first you need to load it. <syntaxhighlight lang="lua"> local messageBox = require('Module:Message box') </syntaxhighlight> To create a message box, use the <code>main</code> function. It takes two parameters: the first is the box type (as a string), and the second is a table containing the message box parameters. <syntaxhighlight lang="lua"> local box = messageBox.main( boxType, { param1 = param1, param2 = param2, -- More parameters... }) </syntaxhighlight> There are seven available box types: {| class="wikitable" ! Box type !! Template !! Purpose |- | <code>mbox</code> || {{tl|mbox}} || For message boxes to be used in multiple namespaces |- | <code>ambox</code> || {{tl|ambox}} || For article message boxes |- | <code>cmbox</code> || {{tl|cmbox}} || For category message boxes |- | <code>fmbox</code> || {{tl|fmbox}} || For interface message boxes |- | <code>imbox</code> || {{tl|imbox}} || For file namespace message boxes |- | <code>tmbox</code> || {{tl|tmbox}} || For talk page message boxes |- | <code>ombox</code> || {{tl|ombox}} || For message boxes in other namespaces |} See the template page of each box type for the available parameters. == Usage from #invoke == As well as the <code>main</code> function, this module has separate functions for each box type. They are accessed using the code <code><nowiki>{{#invoke:Message box|mbox|...}}</nowiki></code>, <code><nowiki>{{#invoke:Message box|ambox|...}}</nowiki></code>, etc. These will work when called from other modules, but they access code used to process arguments passed from #invoke, and so calling them will be less efficient than calling <code>main</code>. == Technical details == The module uses the same basic code for each of the templates listed above; the differences between each of them are configured using the data at [[Module:Message box/configuration]]. Here are the various configuration options and what they mean: * <code>types</code> – a table containing data used by the type parameter of the message box. The table keys are the values that can be passed to the type parameter, and the table values are tables containing the class and the image used by that type. * <code>default</code> – the type to use if no value was passed to the type parameter, or if an invalid value was specified. * <code>showInvalidTypeError</code> – whether to show an error if the value passed to the type parameter was invalid. * <code>allowBlankParams</code> – usually blank values are stripped from parameters passed to the module. However, whitespace is preserved for the parameters included in the allowBlankParams table. * <code>allowSmall</code> – whether a small version of the message box can be produced with "small=yes". * <code>smallParam</code> – a custom name for the small parameter. For example, if set to "left" you can produce a small message box using "small=left". * <code>smallClass</code> – the class to use for small message boxes. * <code>substCheck</code> – whether to perform a subst check or not. * <code>classes</code> – an array of classes to use with the message box. * <code>imageEmptyCell</code> – whether to use an empty {{tag|td}} cell if there is no image set. This is used to preserve spacing for message boxes with a width of less than 100% of the screen. * <code>imageEmptyCellStyle</code> – whether empty image cells should be styled. * <code>imageCheckBlank</code> – whether "image=blank" results in no image being displayed. * <code>imageSmallSize</code> – usually, images used in small message boxes are set to 30x30px. This sets a custom size. * <code>imageCellDiv</code> – whether to enclose the image in a div enforcing a maximum image size. * <code>useCollapsibleTextFields</code> – whether to use text fields that can be collapsed, i.e. "issue", "fix", "talk", etc. Currently only used in ambox. * <code>imageRightNone</code> – whether imageright=none results in no image being displayed on the right-hand side of the message box. * <code>sectionDefault</code> – the default name for the "section" parameter. Depends on <code>useCollapsibleTextFields</code>. * <code>allowMainspaceCategories</code> – allow categorisation in the main namespace. * <code>templateCategory</code> – the name of a category to be placed on the template page. * <code>templateCategoryRequireName</code> – whether the <code>name</code> parameter is required to display the template category. * <code>templateErrorCategory</code> – the name of the error category to be used on the template page. * <code>templateErrorParamsToCheck</code> – an array of parameter names to check. If any are absent, the <code>templateErrorCategory</code> is applied to the template page. fd6bb8dc654a1b8bb0a0f771130e9b2b5a5c05ad Module:Redirect 828 711 1412 1411 2023-06-23T01:29:30Z Tasha04 2 1 revision imported Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Module:Transclusion count/data/N 828 715 1420 1419 2023-06-23T01:29:41Z Tasha04 2 1 revision imported Scribunto text/plain return { ["N"] = 16000, ["N.b."] = 2200, ["N/A"] = 23000, ["N/a"] = 53000, ["NA-Class"] = 14000, ["NASTRO_comment"] = 30000, ["NBA_Draft_template_list"] = 3400, ["NBA_Year"] = 5500, ["NBA_color"] = 3600, ["NBA_color_cell"] = 4300, ["NBA_color_cell2"] = 3400, ["NBA_player_statistics_legend"] = 4200, ["NBA_player_statistics_start"] = 3800, ["NBbox"] = 3400, ["NCAA_color_cell"] = 9600, ["NCAA_secondary_color_cell"] = 4100, ["NCES_District_ID"] = 2600, ["NED"] = 9600, ["NEXTYEAR"] = 7800, ["NFLAltPrimaryStyle"] = 5800, ["NFLPrimaryColor"] = 2200, ["NFLPrimaryStyle"] = 28000, ["NFLSecondaryColor"] = 19000, ["NFL_Roster_navbox_template_list"] = 2600, ["NFL_Year"] = 23000, ["NFL_predraft"] = 5800, ["NFL_predraft/check"] = 5800, ["NFL_predraft/ftin"] = 5800, ["NFLplayer"] = 2100, ["NFT"] = 6800, ["NFT_player"] = 30000, ["NGA"] = 3200, ["NGR"] = 2300, ["NHLE"] = 18000, ["NHLS_url"] = 2200, ["NLD"] = 11000, ["NLM_content"] = 2800, ["NOINDEX"] = 450000, ["NOMIS2011"] = 2300, ["NOR"] = 9400, ["NRDB_species"] = 6900, ["NRHP-PA"] = 2600, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 76000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3300, ["NRHP_navigation_box"] = 8300, ["NRHP_row"] = 3400, ["NRHP_style"] = 70000, ["NRHP_url"] = 29000, ["NRHP_url/core"] = 31000, ["NRISref"] = 73000, ["NSWcity"] = 2100, ["NSWcity/core"] = 2100, ["NUMBEROFSECTIONS"] = 4400, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3100, ["NZL"] = 6700, ["NZ_electorate_link"] = 2300, ["Na"] = 2400, ["Nac"] = 2700, ["Namespace_detect"] = 569000, ["Namespace_detect_showall"] = 9800, ["Nastaliq"] = 10000, ["Nat_fs_end"] = 2400, ["National_Film_Awards/style"] = 2000, ["National_Heritage_List_for_England"] = 22000, ["National_Rail_style"] = 5700, ["National_Register_of_Historic_Places"] = 29000, ["National_Register_of_Historic_Places_in_Massachusetts"] = 4400, ["National_Register_of_Historic_Places_in_New_York"] = 5600, ["National_Register_of_Historic_Places_in_North_Carolina"] = 2900, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3200, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3300, ["National_field_hockey_squad"] = 4000, ["National_football_squad_end"] = 2900, ["National_football_squad_start/styles.css"] = 2400, ["National_rugby_union_team"] = 3600, ["National_squad"] = 41000, ["National_squad_no_numbers"] = 17000, ["Native_name"] = 16000, ["Native_name_checker"] = 80000, ["Naval"] = 2900, ["Naval/core"] = 2900, ["Navbar"] = 38000, ["Navbar-collapsible"] = 3600, ["Navbar-header"] = 16000, ["Navbar-header/styles.css"] = 16000, ["Navbox"] = 3050000, ["Navbox_GR_munic"] = 3500, ["Navbox_Musical_artist"] = 9700, ["Navbox_bottom"] = 15000, ["Navbox_decade_list"] = 11000, ["Navbox_ice_hockey"] = 3100, ["Navbox_musical_artist"] = 220000, ["Navbox_musical_artist/color"] = 220000, ["Navbox_rugby_league_squad"] = 4900, ["Navbox_season_by_team"] = 3100, ["Navbox_top"] = 15000, ["Navbox_with_collapsible_groups"] = 131000, ["Navbox_with_collapsible_sections"] = 2300, ["Navbox_with_columns"] = 24000, ["Navboxes"] = 55000, ["Navboxes_colour"] = 5200, ["Navseasoncats"] = 479000, ["Navseasoncats_with_centuries_below_decade"] = 6700, ["Navseasoncats_with_decades_below_year"] = 18000, ["Navsource"] = 2500, ["Navy"] = 19000, ["Navy/core"] = 19000, ["Nay"] = 19000, ["Nbay"] = 5500, ["Nbsp"] = 482000, ["Nbsp_to_space"] = 20000, ["Ndash"] = 20000, ["Nee"] = 9100, ["NeilBrownPlayers"] = 3100, ["New_user_bar"] = 57000, ["Newbot"] = 4200, ["Next_period"] = 21000, ["Nfly"] = 2200, ["Nihongo"] = 102000, ["Nihongo2"] = 12000, ["Nihongo_foot"] = 2600, ["No"] = 8300, ["No."] = 14000, ["No2"] = 10000, ["NoSpam"] = 3900, ["NoSpamEmail"] = 17000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2300, ["No_footnotes"] = 51000, ["No_ping"] = 377000, ["No_plot"] = 6100, ["No_redirect"] = 563000, ["No_spam"] = 258000, ["No_wrap"] = 2300, ["Nobold"] = 383000, ["Nobold/styles.css"] = 383000, ["Nobr"] = 4700, ["Nobreak"] = 28000, ["Nochange"] = 2400, ["Noindex"] = 4800, ["Noitalic"] = 4500, ["Noitalic/styles.css"] = 4500, ["Nom"] = 40000, ["Nominated"] = 7100, ["Non-English-language_text_category"] = 2500, ["Non-admin_closure"] = 2800, ["Non-diffusing_subcategory"] = 14000, ["Non-free_2D_art"] = 7200, ["Non-free_3D_art"] = 2500, ["Non-free_album_cover"] = 202000, ["Non-free_audio_sample"] = 8400, ["Non-free_biog-pic"] = 25000, ["Non-free_book_cover"] = 55000, ["Non-free_character"] = 2400, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 17000, ["Non-free_fair_use_in"] = 14000, ["Non-free_film_poster"] = 24000, ["Non-free_film_screenshot"] = 5000, ["Non-free_game_cover"] = 7500, ["Non-free_game_screenshot"] = 4600, ["Non-free_historic_image"] = 16000, ["Non-free_image_data"] = 8600, ["Non-free_image_rationale"] = 9700, ["Non-free_in_US"] = 2100, ["Non-free_logo"] = 161000, ["Non-free_magazine_cover"] = 7700, ["Non-free_media"] = 730000, ["Non-free_media_data"] = 9800, ["Non-free_media_rationale"] = 11000, ["Non-free_movie_poster"] = 22000, ["Non-free_newspaper_image"] = 2000, ["Non-free_poster"] = 80000, ["Non-free_promotional"] = 8800, ["Non-free_school_logo"] = 2400, ["Non-free_seal"] = 4400, ["Non-free_symbol"] = 6100, ["Non-free_television_screenshot"] = 16000, ["Non-free_title-card"] = 5700, ["Non-free_use_rationale"] = 461000, ["Non-free_use_rationale/styles.css"] = 682000, ["Non-free_use_rationale_2"] = 211000, ["Non-free_use_rationale_album_cover"] = 135000, ["Non-free_use_rationale_book_cover"] = 19000, ["Non-free_use_rationale_logo"] = 94000, ["Non-free_use_rationale_poster"] = 51000, ["Non-free_use_rationale_title-card"] = 2700, ["Non-free_use_rationale_video_cover"] = 5800, ["Non-free_use_rationale_video_game_cover"] = 10000, ["Non-free_video_cover"] = 16000, ["Non-free_video_game_cover"] = 21000, ["Non-free_video_game_cover/platform"] = 21000, ["Non-free_video_game_screenshot"] = 10000, ["Non-free_video_game_screenshot/platform"] = 9600, ["Non-free_with_NC"] = 2700, ["Non-free_with_permission"] = 2100, ["Nonspecific"] = 2200, ["Nonumtoc"] = 2700, ["Nonumtoc/styles.css"] = 2700, ["Noping"] = 367000, ["Noprint"] = 2900, ["Noredirect"] = 8300, ["Normal"] = 5900, ["Normalwraplink"] = 3500, ["NorthAmNative"] = 2000, ["North_America_topic"] = 3600, ["Northern_Ireland_tasks"] = 19000, ["Nospam"] = 21000, ["Not-PD-US-expired-min-year"] = 26000, ["Not_a_ballot"] = 7700, ["Not_a_forum"] = 7700, ["Not_a_typo"] = 11000, ["Not_around"] = 2900, ["Not_done"] = 20000, ["Notability"] = 63000, ["Notavote"] = 2100, ["Notdone"] = 5500, ["Note"] = 25000, ["NoteFoot"] = 3900, ["NoteTag"] = 4000, ["Note_label"] = 9000, ["Notelist"] = 184000, ["Notelist-lr"] = 3500, ["Notelist-ua"] = 6700, ["Notes"] = 6300, ["Noteslist"] = 3600, ["Notice"] = 113000, ["NovelsWikiProject"] = 19000, ["Nowiki_="] = 2300, ["Nowrap"] = 837000, ["Np"] = 2900, ["Npby"] = 2500, ["Nq"] = 3700, ["Nrut"] = 3600, ["Ns"] = 2600, ["Ns0"] = 107000, ["Ns_has_subpages"] = 2180000, ["Nts"] = 20000, ["Ntsh"] = 3300, ["Number_of_defined_parameters"] = 4800, ["Number_table_sorting"] = 34000, ["Number_table_sorting_hidden"] = 3300, ["Numero"] = 3600, ["Nutshell"] = 3900, ["Nw="] = 2300, ["Module:NUMBEROFSECTIONS"] = 4400, ["Module:Namespace_detect"] = 15900000, ["Module:Namespace_detect/config"] = 17000000, ["Module:Namespace_detect/data"] = 17000000, ["Module:National_squad"] = 54000, ["Module:Native_name"] = 92000, ["Module:Navbar"] = 5420000, ["Module:Navbar/configuration"] = 5420000, ["Module:Navbar/styles.css"] = 4770000, ["Module:Navbox"] = 4420000, ["Module:Navbox/configuration"] = 4420000, ["Module:Navbox/styles.css"] = 4420000, ["Module:Navbox_ice_hockey"] = 3100, ["Module:Navbox_top_and_bottom"] = 15000, ["Module:Navbox_with_collapsible_groups"] = 139000, ["Module:Navboxes"] = 55000, ["Module:Navseasoncats"] = 479000, ["Module:Nihongo"] = 104000, ["Module:No_ping"] = 448000, ["Module:Noinclude"] = 674000, ["Module:Ns_has_subpages"] = 2180000, ["Module:Number_table_sorting"] = 37000, } 1e9cc3519086ceb72baeb4961f2afad864679e9c Module:Navbox/doc 828 716 1422 1421 2023-06-23T01:29:44Z Tasha04 2 1 revision imported wikitext text/x-wiki {{High-use}} {{module rating|protected}} {{Lua|Module:Navbox/configuration|Module:Navbar|Module:Color contrast|Module:Arguments}} {{Uses TemplateStyles|Module:Navbox/styles.css|Template:Plainlist/styles.css|Template:Hlist/styles.css}} {{Lua sidebar}} This module implements the {{tl|Navbox}} template. Please see the [[Template:Navbox|template page]] for usage instructions. == Tracking/maintenance categories == * {{clc|Navbox orphans}} * {{clc|Navigational boxes without horizontal lists}} * {{clc|Navboxes using background colours}} * {{clc|Potentially illegible navboxes}} * {{clc|Navboxes using borders}} <includeonly>{{sandbox other|| [[Category:Modules that add a tracking category]] [[Category:Modules that check for strip markers]] }}</includeonly> 6d5ec445d8ec7f7f89a9354af5a49421f0fe0d6a Template:Cot 10 717 1424 1423 2023-06-23T01:30:04Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Collapse top]] {{Redirect category shell| {{R from template shortcut}} }} 708f8bf79aefbfe8ee62f4fa68561059be0372d2 Module:Transclusion count/data/A 828 718 1426 1425 2023-06-23T01:30:06Z Tasha04 2 1 revision imported Scribunto text/plain return { ["A-Class"] = 6200, ["AARTalk"] = 8900, ["ACArt"] = 5400, ["AFB_game_box_end"] = 2400, ["AFB_game_box_start"] = 2400, ["AFC_comment"] = 14000, ["AFC_submission"] = 26000, ["AFC_submission_category_header"] = 4600, ["AFD_help"] = 102000, ["AFD_help/styles.css"] = 102000, ["AFI/Picture_box/show_picture"] = 3600, ["AFI_film"] = 7800, ["AFL_Car"] = 2500, ["AFL_Col"] = 2400, ["AFL_Ess"] = 2500, ["AFL_Gee"] = 2500, ["AFL_Haw"] = 2300, ["AFL_Mel"] = 2700, ["AFL_NM"] = 2200, ["AFL_Ric"] = 2400, ["AFL_StK"] = 2900, ["AFL_Tables"] = 11000, ["AFL_Year"] = 2500, ["ALG"] = 2400, ["AMARB"] = 4500, ["AML"] = 4500, ["AMQ"] = 4600, ["AM_station_data"] = 4400, ["ARG"] = 6300, ["ASIN"] = 4500, ["ASN"] = 3400, ["ATP"] = 5000, ["AUS"] = 14000, ["AUT"] = 9400, ["AZE"] = 2500, ["A_note"] = 4200, ["A_or_an"] = 29000, ["Aan"] = 44000, ["Abbr"] = 780000, ["Abbreviation"] = 2300, ["Abbrlink"] = 17000, ["Abot"] = 10000, ["About"] = 151000, ["Absolute_page_title"] = 2400, ["Acad"] = 6400, ["Access_icon"] = 2600, ["According_to_whom"] = 4200, ["AchievementTable"] = 10000, ["Active_politician"] = 20000, ["AdSenseSummary"] = 4100, ["Added"] = 2300, ["Adjacent_communities"] = 26000, ["Adjacent_stations"] = 37000, ["Adjacent_stations/styles.css"] = 37000, ["Admin"] = 13000, ["Administrator_note"] = 6500, ["Adminnote"] = 3500, ["Advert"] = 19000, ["Aet"] = 4900, ["AfC_age_category"] = 4400, ["AfC_comment"] = 15000, ["AfC_date_category"] = 189000, ["AfC_status/age"] = 4400, ["AfC_status/backlog"] = 4900, ["AfC_submission"] = 41000, ["AfC_submission/comments"] = 24000, ["AfC_submission/declined"] = 24000, ["AfC_submission/declinedivbox"] = 24000, ["AfC_submission/draft"] = 19000, ["AfC_submission/helptools"] = 44000, ["AfC_submission/pending"] = 4400, ["AfC_submission/tools"] = 4400, ["AfC_submission_category_header"] = 5600, ["AfC_submission_category_header/day"] = 5400, ["AfC_submission_category_header/td"] = 5400, ["AfC_talk/C_percentage"] = 2900, ["AfC_topic"] = 27000, ["AfD_categories_horizontal_shortnames"] = 4300, ["AfD_count_link"] = 3800, ["Afd-merged-from"] = 7800, ["AfricaProject"] = 28000, ["Africa_topic"] = 6200, ["After_extra_time"] = 4900, ["Age"] = 36000, ["Age_in_days"] = 4200, ["Age_in_years"] = 3800, ["Age_in_years,_months,_weeks_and_days"] = 4000, ["Age_in_years,_months_and_days"] = 17000, ["Age_in_years_and_days"] = 3900, ["Age_in_years_and_days_nts"] = 3000, ["Agree"] = 2100, ["Ahnentafel"] = 8300, ["Ahnentafel/styles.css"] = 8300, ["Air_Force_Historical_Research_Agency"] = 4300, ["Air_force"] = 5900, ["Air_force/core"] = 5900, ["Aircontent"] = 9300, ["Aircraft_specs"] = 12000, ["Aircraft_specs/convert"] = 12000, ["Aircraft_specs/eng"] = 12000, ["Aircraft_specs/length"] = 12000, ["Aircraft_specs/range"] = 12000, ["Aircraft_specs/speed"] = 12000, ["Airport-dest-list"] = 3600, ["Airport_codes"] = 15000, ["Airport_destination_list"] = 4900, ["Al"] = 64000, ["Album"] = 201000, ["Album_chart"] = 29000, ["Album_chart/chartnote"] = 29000, ["Album_cover_fur"] = 53000, ["Album_label_category"] = 2100, ["Album_label_category/core"] = 2100, ["Album_ratings"] = 77000, ["Album_reviews"] = 5700, ["Albums"] = 7300, ["Albums_category"] = 24000, ["Albums_category/core"] = 24000, ["Albums_category/type/default"] = 24000, ["Align"] = 169000, ["Aligned_table"] = 12000, ["AllIrelandByCountyCatNav"] = 2900, ["AllMovie_name"] = 5700, ["AllMovie_title"] = 28000, ["AllMusic"] = 77000, ["Allcaps"] = 8800, ["Allcaps/styles.css"] = 8800, ["Allmovie"] = 4300, ["Allmovie_title"] = 2300, ["Allmusic"] = 17000, ["Allow_wrap"] = 19000, ["Alumni"] = 2300, ["Always_substitute"] = 6500, ["Ambox"] = 1460000, ["Ambox_globe"] = 35000, ["Ambox_globe_current_red"] = 33000, ["American_English"] = 17000, ["American_football_roster/Footer"] = 3100, ["American_football_roster/Header"] = 3100, ["American_football_roster/Player"] = 3100, ["Americanfootballbox"] = 3100, ["Amg_movie"] = 12000, ["Amg_name"] = 3200, ["Anarchism_announcements"] = 3100, ["Anarchism_announcements/shell"] = 3100, ["Anchor"] = 76000, ["Angbr"] = 2000, ["Angbr_IPA"] = 2300, ["Angle_bracket"] = 3100, ["Anglican_navbox_titlestyle"] = 14000, ["Anglicise_rank"] = 564000, ["Animal_tasks"] = 18000, ["Anime_News_Network"] = 11000, ["Ann"] = 4900, ["Annotated_link"] = 7300, ["Annual_readership"] = 51000, ["Anonblock"] = 33000, ["Antonym_of_(dis)establish"] = 8700, ["Apostrophe"] = 75000, ["ArbCom_Arab-Israeli_editnotice"] = 2100, ["ArbCom_Arab-Israeli_enforcement"] = 2900, ["Arbitration_Committee_candidate/data"] = 76000, ["Archive"] = 153000, ["Archive-nav"] = 5800, ["Archive_bottom"] = 43000, ["Archive_box"] = 18000, ["Archive_list"] = 69000, ["Archive_navigation"] = 7400, ["Archive_top"] = 26000, ["Archive_top/styles.css"] = 26000, ["Archivebottom"] = 3600, ["Archivebox"] = 2500, ["Archives"] = 49000, ["Archivetop"] = 3600, ["Army"] = 15000, ["Army/core"] = 15000, ["Art_UK_bio"] = 2400, ["Art_UK_bio/plural"] = 2400, ["Article"] = 2900, ["ArticleHistory"] = 29000, ["Article_alerts_box"] = 3600, ["Article_alerts_box/styles.css"] = 3600, ["Article_for_improvement_banner/Picture_box"] = 3600, ["Article_for_improvement_banner/Picture_box/show_picture"] = 3600, ["Article_history"] = 46000, ["Articles_by_Quality"] = 2300, ["Articles_by_Quality/down"] = 2300, ["Articles_by_Quality/total"] = 2300, ["Articles_by_Quality/up"] = 2300, ["As_of"] = 78000, ["Asbox"] = 2390000, ["Asbox/styles.css"] = 2390000, ["Asia_topic"] = 9900, ["Asof"] = 7600, ["Assessed-Class"] = 18000, ["Assignment"] = 6000, ["Assignment_milestones"] = 5300, ["AstDys"] = 2900, ["AthAbbr"] = 4100, ["Atnhead"] = 6000, ["Atop"] = 4400, ["Attached_KML"] = 12000, ["AuEduNewbie"] = 2500, ["Audio"] = 27000, ["Audio_sample"] = 2900, ["AustralianFootball"] = 7400, ["Australian_Dictionary_of_Biography"] = 2400, ["Australian_English"] = 2700, ["Australian_party_style"] = 6000, ["Australian_politics/name"] = 4200, ["Australian_politics/party_colours"] = 6000, ["Austria_metadata_Wikidata"] = 2100, ["Austria_population_Wikidata"] = 2100, ["Aut"] = 8200, ["Authority_control"] = 2000000, ["Authority_control_(arts)"] = 16000, ["Auto_link"] = 78000, ["Autobiography"] = 2100, ["Automated_tools"] = 90000, ["Automated_tools/core"] = 90000, ["Automatic_Taxobox"] = 2600, ["Automatic_archive_navigator"] = 127000, ["Automatic_taxobox"] = 74000, ["Aviation_accidents_and_incidents"] = 2200, ["Awaiting_admin"] = 2600, ["Awaitingadmin"] = 2500, ["Award2"] = 2400, ["Awards"] = 2400, ["Awards_table"] = 5500, ["Awards_table/styles.css"] = 5500, ["Ayd"] = 2900, ["Aye"] = 24000, ["Module:A_or_an"] = 29000, ["Module:A_or_an/words"] = 29000, ["Module:About"] = 151000, ["Module:Adjacent_stations"] = 73000, ["Module:Adjacent_stations/Amtrak"] = 2300, ["Module:Adjacent_stations/Indian_Railways"] = 3200, ["Module:Adjacent_stations/JR_East"] = 2200, ["Module:Adjacent_stations/i18n"] = 73000, ["Module:AfC_submission_catcheck"] = 378000, ["Module:AfC_topic"] = 27000, ["Module:Age"] = 1170000, ["Module:Ahnentafel"] = 8300, ["Module:Airport_destination_list"] = 4900, ["Module:Aligned_dates_list"] = 2200, ["Module:Aligned_table"] = 12000, ["Module:Anchor"] = 76000, ["Module:Ancient_Egypt_era"] = 2800, ["Module:Ancient_Egypt_era/data"] = 2800, ["Module:Ancient_Egypt_kings"] = 2800, ["Module:Ancient_Egypt_kings/data"] = 2800, ["Module:Ancient_Olympiads"] = 2800, ["Module:Ancient_Olympiads/data"] = 2800, ["Module:Annotated_link"] = 7300, ["Module:Archive_list"] = 71000, ["Module:Arguments"] = 31300000, ["Module:Armenian"] = 2800, ["Module:Article_history"] = 46000, ["Module:Article_history/Category"] = 46000, ["Module:Article_history/config"] = 46000, ["Module:Article_history/styles.css"] = 46000, ["Module:Asbox"] = 2390000, ["Module:Asbox_stubtree"] = 36000, ["Module:Attached_KML"] = 12000, ["Module:Attached_KML/styles.css"] = 12000, ["Module:Australian_place_map"] = 16000, ["Module:Authority_control"] = 2020000, ["Module:Authority_control/auxiliary"] = 569000, ["Module:Authority_control/config"] = 2020000, ["Module:Automated_taxobox"] = 362000, ["Module:Automatic_archive_navigator"] = 127000, ["Module:Automatic_archive_navigator/config"] = 127000, ["Module:Autotaxobox"] = 564000, } 40bb7b96d6e7c9ec8132c8e3c07ad1fabd03549b Module:Arguments/doc 828 719 1428 1427 2023-06-23T01:30:08Z Tasha04 2 1 revision imported wikitext text/x-wiki {{Used in system}} {{Module rating|p}} This module provides easy processing of arguments passed from <code>#invoke</code>. It is a meta-module, meant for use by other modules, and should not be called from <code>#invoke</code> directly. Its features include: * Easy trimming of arguments and removal of blank arguments. * Arguments can be passed by both the current frame and by the parent frame at the same time. (More details below.) * Arguments can be passed in directly from another Lua module or from the debug console. * Most features can be customized. == Basic use == First, you need to load the module. It contains one function, named <code>getArgs</code>. <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs </syntaxhighlight> In the most basic scenario, you can use getArgs inside your main function. The variable <code>args</code> is a table containing the arguments from #invoke. (See below for details.) <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) -- Main module code goes here. end return p </syntaxhighlight> === Recommended practice === However, the recommended practice is to use a function just for processing arguments from #invoke. This means that if someone calls your module from another Lua module you don't have to have a frame object available, which improves performance. <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) return p._main(args) end function p._main(args) -- Main module code goes here. end return p </syntaxhighlight> The way this is called from a template is <code><nowiki>{{#invoke:Example|main}}</nowiki></code> (optionally with some parameters like <code><nowiki>{{#invoke:Example|main|arg1=value1|arg2=value2}}</nowiki></code>), and the way this is called from a module is <syntaxhighlight lang=lua inline>require('Module:Example')._main({arg1 = 'value1', arg2 = value2, 'spaced arg3' = 'value3'})</syntaxhighlight>. What this second one does is construct a table with the arguments in it, then gives that table to the p._main(args) function, which uses it natively. === Multiple functions === If you want multiple functions to use the arguments, and you also want them to be accessible from #invoke, you can use a wrapper function. <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame) return p[funcName](args) end end p.func1 = makeInvokeFunc('_func1') function p._func1(args) -- Code for the first function goes here. end p.func2 = makeInvokeFunc('_func2') function p._func2(args) -- Code for the second function goes here. end return p </syntaxhighlight> === Options === The following options are available. They are explained in the sections below. <syntaxhighlight lang="lua"> local args = getArgs(frame, { trim = false, removeBlanks = false, valueFunc = function (key, value) -- Code for processing one argument end, frameOnly = true, parentOnly = true, parentFirst = true, wrappers = { 'Template:A wrapper template', 'Template:Another wrapper template' }, readOnly = true, noOverwrite = true }) </syntaxhighlight> === Trimming and removing blanks === Blank arguments often trip up coders new to converting MediaWiki templates to Lua. In template syntax, blank strings and strings consisting only of whitespace are considered false. However, in Lua, blank strings and strings consisting of whitespace are considered true. This means that if you don't pay attention to such arguments when you write your Lua modules, you might treat something as true that should actually be treated as false. To avoid this, by default this module removes all blank arguments. Similarly, whitespace can cause problems when dealing with positional arguments. Although whitespace is trimmed for named arguments coming from #invoke, it is preserved for positional arguments. Most of the time this additional whitespace is not desired, so this module trims it off by default. However, sometimes you want to use blank arguments as input, and sometimes you want to keep additional whitespace. This can be necessary to convert some templates exactly as they were written. If you want to do this, you can set the <code>trim</code> and <code>removeBlanks</code> arguments to <code>false</code>. <syntaxhighlight lang="lua"> local args = getArgs(frame, { trim = false, removeBlanks = false }) </syntaxhighlight> === Custom formatting of arguments === Sometimes you want to remove some blank arguments but not others, or perhaps you might want to put all of the positional arguments in lower case. To do things like this you can use the <code>valueFunc</code> option. The input to this option must be a function that takes two parameters, <code>key</code> and <code>value</code>, and returns a single value. This value is what you will get when you access the field <code>key</code> in the <code>args</code> table. Example 1: this function preserves whitespace for the first positional argument's value, but trims all other arguments' value and removes all other blank arguments. <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if key == 1 then return value elseif value then value = mw.text.trim(value) if value ~= '' then return value end end return nil end }) </syntaxhighlight> Example 2: this function removes blank arguments and converts all argument values to lower case, but doesn't trim whitespace from positional parameters. <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if not value then return nil end value = mw.ustring.lower(value) if mw.ustring.find(value, '%S') then return value end return nil end }) </syntaxhighlight> Note: the above functions will fail if passed input that is not of type <code>string</code> or <code>nil</code>. This might be the case if you use the <code>getArgs</code> function in the main function of your module, and that function is called by another Lua module. In this case, you will need to check the type of your input. This is not a problem if you are using a function specially for arguments from #invoke (i.e. you have <code>p.main</code> and <code>p._main</code> functions, or something similar). {{cot|Examples 1 and 2 with type checking}} Example 1: <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if key == 1 then return value elseif type(value) == 'string' then value = mw.text.trim(value) if value ~= '' then return value else return nil end else return value end end }) </syntaxhighlight> Example 2: <syntaxhighlight lang="lua"> local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = mw.ustring.lower(value) if mw.ustring.find(value, '%S') then return value else return nil end else return value end end }) </syntaxhighlight> {{cob}} Also, please note that the <code>valueFunc</code> function is called more or less every time an argument is requested from the <code>args</code> table, so if you care about performance you should make sure you aren't doing anything inefficient with your code. === Frames and parent frames === Arguments in the <code>args</code> table can be passed from the current frame or from its parent frame at the same time. To understand what this means, it is easiest to give an example. Let's say that we have a module called <code>Module:ExampleArgs</code>. This module prints the first two positional arguments that it is passed. {{cot|Module:ExampleArgs code}} <syntaxhighlight lang="lua"> local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) return p._main(args) end function p._main(args) local first = args[1] or '' local second = args[2] or '' return first .. ' ' .. second end return p </syntaxhighlight> {{cob}} <code>Module:ExampleArgs</code> is then called by <code>Template:ExampleArgs</code>, which contains the code <code><nowiki>{{#invoke:ExampleArgs|main|firstInvokeArg}}</nowiki></code>. This produces the result "firstInvokeArg". Now if we were to call <code>Template:ExampleArgs</code>, the following would happen: {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstInvokeArg secondTemplateArg |} There are three options you can set to change this behaviour: <code>frameOnly</code>, <code>parentOnly</code> and <code>parentFirst</code>. If you set <code>frameOnly</code> then only arguments passed from the current frame will be accepted; if you set <code>parentOnly</code> then only arguments passed from the parent frame will be accepted; and if you set <code>parentFirst</code> then arguments will be passed from both the current and parent frames, but the parent frame will have priority over the current frame. Here are the results in terms of <code>Template:ExampleArgs</code>: ; frameOnly {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstInvokeArg |} ; parentOnly {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstTemplateArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstTemplateArg secondTemplateArg |} ; parentFirst {| class="wikitable" style="width: 50em; max-width: 100%;" |- ! style="width: 60%;" | Code ! style="width: 40%;" | Result |- | <code><nowiki>{{ExampleArgs}}</nowiki></code> | firstInvokeArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg}}</nowiki></code> | firstTemplateArg |- | <code><nowiki>{{ExampleArgs|firstTemplateArg|secondTemplateArg}}</nowiki></code> | firstTemplateArg secondTemplateArg |} Notes: # If you set both the <code>frameOnly</code> and <code>parentOnly</code> options, the module won't fetch any arguments at all from #invoke. This is probably not what you want. # In some situations a parent frame may not be available, e.g. if getArgs is passed the parent frame rather than the current frame. In this case, only the frame arguments will be used (unless parentOnly is set, in which case no arguments will be used) and the <code>parentFirst</code> and <code>frameOnly</code> options will have no effect. === Wrappers === The ''wrappers'' option is used to specify a limited number of templates as ''wrapper templates'', that is, templates whose only purpose is to call a module. If the module detects that it is being called from a wrapper template, it will only check for arguments in the parent frame; otherwise it will only check for arguments in the frame passed to getArgs. This allows modules to be called by either #invoke or through a wrapper template without the loss of performance associated with having to check both the frame and the parent frame for each argument lookup. For example, the only content of [[Template:Side box]] (excluding content in {{tag|noinclude}} tags) is <code><nowiki>{{#invoke:Side box|main}}</nowiki></code>. There is no point in checking the arguments passed directly to the #invoke statement for this template, as no arguments will ever be specified there. We can avoid checking arguments passed to #invoke by using the ''parentOnly'' option, but if we do this then #invoke will not work from other pages either. If this were the case, the {{para|text|Some text}} in the code <code><nowiki>{{#invoke:Side box|main|text=Some text}}</nowiki></code> would be ignored completely, no matter what page it was used from. By using the <code>wrappers</code> option to specify 'Template:Side box' as a wrapper, we can make <code><nowiki>{{#invoke:Side box|main|text=Some text}}</nowiki></code> work from most pages, while still not requiring that the module check for arguments on the [[Template:Side box]] page itself. Wrappers can be specified either as a string, or as an array of strings. <syntaxhighlight lang="lua"> local args = getArgs(frame, { wrappers = 'Template:Wrapper template' }) </syntaxhighlight> <syntaxhighlight lang="lua"> local args = getArgs(frame, { wrappers = { 'Template:Wrapper 1', 'Template:Wrapper 2', -- Any number of wrapper templates can be added here. } }) </syntaxhighlight> Notes: # The module will automatically detect if it is being called from a wrapper template's /sandbox subpage, so there is no need to specify sandbox pages explicitly. # The ''wrappers'' option effectively changes the default of the ''frameOnly'' and ''parentOnly'' options. If, for example, ''parentOnly'' were explicitly set to 0 with ''wrappers'' set, calls via wrapper templates would result in both frame and parent arguments being loaded, though calls not via wrapper templates would result in only frame arguments being loaded. # If the ''wrappers'' option is set and no parent frame is available, the module will always get the arguments from the frame passed to <code>getArgs</code>. === Writing to the args table === Sometimes it can be useful to write new values to the args table. This is possible with the default settings of this module. (However, bear in mind that it is usually better coding style to create a new table with your new values and copy arguments from the args table as needed.) <syntaxhighlight lang="lua"> args.foo = 'some value' </syntaxhighlight> It is possible to alter this behaviour with the <code>readOnly</code> and <code>noOverwrite</code> options. If <code>readOnly</code> is set then it is not possible to write any values to the args table at all. If <code>noOverwrite</code> is set, then it is possible to add new values to the table, but it is not possible to add a value if it would overwrite any arguments that are passed from #invoke. === Ref tags === This module uses [[mw:Extension:Scribunto/Lua reference manual#Metatables|metatables]] to fetch arguments from #invoke. This allows access to both the frame arguments and the parent frame arguments without using the <code>pairs()</code> function. This can help if your module might be passed {{tag|ref}} tags as input. As soon as {{tag|ref}} tags are accessed from Lua, they are processed by the MediaWiki software and the reference will appear in the reference list at the bottom of the article. If your module proceeds to omit the reference tag from the output, you will end up with a phantom reference – a reference that appears in the reference list but without any number linking to it. This has been a problem with modules that use <code>pairs()</code> to detect whether to use the arguments from the frame or the parent frame, as those modules automatically process every available argument. This module solves this problem by allowing access to both frame and parent frame arguments, while still only fetching those arguments when it is necessary. The problem will still occur if you use <code>pairs(args)</code> elsewhere in your module, however. === Known limitations === The use of metatables also has its downsides. Most of the normal Lua table tools won't work properly on the args table, including the <code>#</code> operator, the <code>next()</code> function, and the functions in the table library. If using these is important for your module, you should use your own argument processing function instead of this module.<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:Lua metamodules]] }}</includeonly> 685b245c5975658a038e1dddc9ff5df51231cee9 Module:Transclusion count/data/Y 828 720 1430 1429 2023-06-23T01:30:37Z Tasha04 2 1 revision imported Scribunto text/plain return { ["Y"] = 19000, ["YEAR"] = 75000, ["YUG"] = 2200, ["YYYY_beginnings_or_endings_category_header"] = 3900, ["YYYY_beginnings_or_endings_category_header/core"] = 3900, ["YYYY_crimes_in_countryname_category_header"] = 3200, ["YYYY_crimes_in_countryname_category_header/inner_core"] = 3200, ["YYYY_crimes_in_countryname_category_header/outer_core"] = 3200, ["YYYY_disasters_in_countryname_category_header"] = 2900, ["YYYY_disasters_in_countryname_category_header/inner_core"] = 2900, ["YYYY_disasters_in_countryname_category_header/outer_core"] = 2900, ["YYYY_elections_in_countryname_category_header"] = 3400, ["YYYY_elections_in_countryname_category_header/inner_core"] = 3400, ["YYYY_elections_in_countryname_category_header/outer_core"] = 3400, ["YYYY_in_nationality_sport_category_header"] = 12000, ["YYYY_in_nationality_sport_category_header/inner_core"] = 12000, ["YYYY_in_nationality_sport_category_header/outer_core"] = 12000, ["YYYY_in_nationality_women's_sport_category_header"] = 2000, ["YYYY_in_nationality_women's_sport_category_header/core"] = 2000, ["YYYY_in_sport_category_header"] = 6300, ["YYYY_in_sport_category_header/core"] = 6300, ["YYYY_in_sport_category_header/outer_core"] = 6300, ["Ya"] = 2800, ["Year"] = 4900, ["YearInCountryPortalBox"] = 89000, ["YearInCountryPortalBox/make"] = 89000, ["YearInCountryPortalBox/parse"] = 89000, ["Year_article"] = 6600, ["Year_category_header"] = 3200, ["Year_category_header/core"] = 3100, ["Year_category_name"] = 2500, ["Year_category_name/AD_year"] = 2500, ["Year_in_Europe"] = 5800, ["Year_in_Europe/expr"] = 5800, ["Year_in_US_state_category"] = 9500, ["Year_in_US_state_category/core"] = 9500, ["Year_in_continent/expr"] = 8200, ["Year_in_continent/link"] = 8200, ["Year_in_continent_category"] = 3700, ["Year_in_continent_category/core"] = 3700, ["Year_in_country_category"] = 39000, ["Year_in_country_category/inner_core"] = 39000, ["Year_in_country_category/outer_core"] = 39000, ["Year_in_football"] = 2500, ["Year_in_nationality_television_category"] = 3200, ["Year_in_nationality_television_category/core"] = 3200, ["Year_in_region"] = 13000, ["Year_in_region/link"] = 13000, ["Year_in_various_calendars"] = 2800, ["Year_nationality_television_series_debuts_or_endings_category"] = 4800, ["Year_nationality_television_series_debuts_or_endings_category/core"] = 4800, ["Year_nav"] = 2800, ["Year_nav_topic"] = 7000, ["Year_nav_topic5"] = 6600, ["Yearly_archive_list"] = 693000, ["Yearly_archive_list/display"] = 693000, ["Years_or_months_ago"] = 76000, ["Yel"] = 14000, ["Yellow_card"] = 14000, ["Yes"] = 9800, ["Yes2"] = 10000, ["YesNo-Yes"] = 58000, ["Yesno"] = 13700000, ["Yesno-no"] = 2050000, ["Yesno-yes"] = 11000000, ["Yo"] = 17000, ["You've_got_mail"] = 10000, ["YouTube"] = 59000, ["Youtube"] = 3600, ["Yy"] = 11000, ["Yycat"] = 2400, ["Yyend"] = 10000, ["Yytop"] = 11000, ["Module:Year_category_type"] = 3200, ["Module:Year_in_various_calendars"] = 2800, ["Module:Yesno"] = 27500000, ["Module:YouTubeSubscribers"] = 2600, } 8bddc898df7c3af0fd82656359cce002eab2aafd Module:Yesno/doc 828 721 1432 1431 2023-06-23T01:30:40Z Tasha04 2 1 revision imported wikitext text/x-wiki {{used in system}} {{Module rating|protected}} This module provides a consistent interface for processing boolean or boolean-style string input. While Lua allows the <code>true</code> and <code>false</code> boolean values, wikicode templates can only express boolean values through strings such as "yes", "no", etc. This module processes these kinds of strings and turns them into boolean input for Lua to process. It also returns <code>nil</code> values as <code>nil</code>, to allow for distinctions between <code>nil</code> and <code>false</code>. The module also accepts other Lua structures as input, i.e. booleans, numbers, tables, and functions. If it is passed input that it does not recognise as boolean or <code>nil</code>, it is possible to specify a default value to return. == Syntax == <syntaxhighlight lang="lua">yesno(value, default)</syntaxhighlight> <code>value</code> is the value to be tested. Boolean input or boolean-style input (see below) always evaluates to either <code>true</code> or <code>false</code>, and <code>nil</code> always evaluates to <code>nil</code>. Other values evaluate to <code>default</code>. == Usage == First, load the module. Note that it can only be loaded from other Lua modules, not from normal wiki pages. For normal wiki pages you can use {{tl|yesno}} instead. <syntaxhighlight lang="lua"> local yesno = require('Module:Yesno') </syntaxhighlight> Some input values always return <code>true</code>, and some always return <code>false</code>. <code>nil</code> values always return <code>nil</code>. <syntaxhighlight lang="lua"> -- These always return true: yesno('yes') yesno('y') yesno('true') yesno('t') yesno('on') yesno('1') yesno(1) yesno(true) -- These always return false: yesno('no') yesno('n') yesno('false') yesno('f') yesno('off') yesno('0') yesno(0) yesno(false) -- A nil value always returns nil: yesno(nil) yesno() </syntaxhighlight> String values are converted to lower case before they are matched: <syntaxhighlight lang="lua"> -- These always return true: yesno('Yes') yesno('YES') yesno('yEs') yesno('Y') yesno('tRuE') -- These always return false: yesno('No') yesno('NO') yesno('nO') yesno('N') yesno('fALsE') </syntaxhighlight> ===Undefined input ('foo')=== You can specify a default value if yesno receives input other than that listed above. If you don't supply a default, the module will return <code>nil</code> for these inputs. <syntaxhighlight lang="lua"> -- These return nil: yesno(nil) yesno('foo') yesno({}) yesno(5) yesno('') yesno(function() return 'This is a function.' end) yesno(nil, true) yesno(nil, 'bar') -- These return true: yesno('foo', true) yesno({}, true) yesno(5, true) yesno('', true) yesno(function() return 'This is a function.' end, true) -- These return "bar": yesno('foo', 'bar') yesno({}, 'bar') yesno(5, 'bar') yesno('', 'bar') yesno(function() return 'This is a function.' end, 'bar') </syntaxhighlight> Although the empty string usually evaluates to false in wikitext, it evaluates to true in Lua. This module prefers the Lua behaviour over the wikitext behaviour. If treating the empty string as false is important for your module, you will need to convert empty strings to a value that evaluates to false before passing them to this module. In the case of arguments received from wikitext, this can be done by using [[Module:Arguments]]. ===Handling nil results=== By definition :<syntaxhighlight lang="lua"> yesno(nil) -- Returns nil. yesno('foo') -- Returns nil. yesno(nil, true) -- Returns nil. yesno(nil, false) -- Returns nil. yesno('foo', true) -- Returns true. </syntaxhighlight> To get the binary <syntaxhighlight lang="lua" inline>true/false</syntaxhighlight>-only values, use code like: <syntaxhighlight lang="lua"> myvariable = yesno(value or false) -- When value is nil, result is false. myvariable = yesno(value or true) -- When value is nil, result is true. myvariable = yesno('foo') or false -- Unknown string returns nil, result is false. myvariable = yesno('foo', true) or false -- Default value (here: true) applies, result is true. </syntaxhighlight><!-- --><includeonly>{{sandbox other|| [[Category:Lua metamodules]] }}</includeonly> acae88c54e953bbad689f511129b3d5bbf0364f3 Module:Authority control 828 722 1434 1433 2023-06-23T01:31:47Z Tasha04 2 1 revision imported Scribunto text/plain require('strict') local p = {} local configfile = 'Module:Authority control/config' -- default configuation module local arg = mw.getCurrentFrame().args.config if arg and arg~='' then configfile = 'Module:Authority control/config/' .. arg end local config if mw.title.new(configfile).exists then config = mw.loadData(configfile) else return error('Invalid configuration file',0) end local title = mw.title.getCurrentTitle() local namespace = title.namespace local testcases = title.subpageText == config.i18n.testcases local function needsAttention(sortkey) return '[[' .. config.i18n.category .. ':' .. config.i18n.attentioncat .. '|' .. sortkey .. title.text .. ']]' end local function addCat(cat,sortkey) if cat and cat ~= '' and (namespace == 0 or namespace == 14 or testcases) then local redlinkcat = '' if testcases == false and mw.title.new(cat, 14).exists == false then redlinkcat = needsAttention('N') end if sortkey then cat = '[[' .. config.i18n.category .. ':'..cat..'|' .. sortkey .. title.text .. ']]' else cat = '[[' .. config.i18n.category .. ':'..cat..']]' end cat = cat .. redlinkcat return cat else return '' end end local function getCatForId(id,faulty) local cat = config.i18n.Articles_with .. ' ' if faulty then cat = cat .. config.i18n.faulty .. ' ' end cat = cat .. id .. ' ' .. config.i18n.identifiers return addCat(cat) end local function getIdsFromWikidata(qid,property) local function getquals(statement,qualid) if statement.qualifiers and statement.qualifiers['P'..qualid] then return mw.wikibase.renderSnak(statement.qualifiers['P'..qualid][1]) else return false end end local ids = {} if qid then for _, statement in ipairs(mw.wikibase.getBestStatements(qid,property)) do if statement.mainsnak.datavalue then local val = statement.mainsnak.datavalue.value if val then local namedas = getquals(statement,1810) or getquals(statement,742) or '' table.insert(ids,{id=val,name=namedas}) end end end end return ids end local _makelink = function(conf,val,nextid,qid) --validate values and create a link local function tooltip(text,label) if label and label~='' then return mw.getCurrentFrame():expandTemplate{title = "Tooltip", args = {text,label}} else return text end end local link if nextid==1 then if conf.prefix then link = '*' .. conf.prefix .. '\n**' else link = '*' end else link = '\n**' end local valid_value = false if conf.customlink then -- use function to validate and generate link local label = nextid>1 and nextid local newlink= require(config.auxiliary)[conf.customlink](val.id,label) if newlink then link = link .. newlink valid_value = true end else if conf.pattern then -- use pattern to determine validity if defined valid_value = string.match(val.id,'^'..conf.pattern..'$') elseif conf.patterns then for _,pattern in ipairs(conf.patterns) do valid_value = val.id:match('^'..pattern..'$') if valid_value then break end end elseif conf.valid then -- otherwise use function to determine validity valid_value = require(config.auxiliary)[conf.valid](val.id) else -- no validation possible valid_value = val.id end if valid_value then local newlink local label = conf.label if not label or nextid>1 then label = tostring(nextid) end if conf.link then valid_value = valid_value:gsub('%%', '%%%%') newlink = '[' .. mw.ustring.gsub(conf.link,'%$1',valid_value) .. ' ' .. label .. ']' else newlink = valid_value end link = link .. '<span class="uid">'..tooltip(newlink,val.name)..'</span>' end end if valid_value then link = link .. getCatForId(conf.category or conf[1]) else --local preview = require("Module:If preview") local wdlink = qid and '[[:wikidata:' .. qid .. '#P' .. conf.property .. ']]' or '' link = link .. '[[File:' .. config.i18n.warningicon .. '|20px|frameless|link=' .. wdlink .. '|' .. config.i18n.The .. ' ' .. conf[1] .. ' ' .. config.i18n.identifier .. ' ' .. val.id .. ' ' .. config.i18n.isnotvalid .. '.]]' if conf.errorcat then link = link .. addCat(conf.errorcat) else link = link .. getCatForId(conf.category or conf[1],true) end link = link .. addCat(config.i18n.allfaultycat,conf[1])-- .. preview._warning({'The '..conf[1]..' id '..val..' is not valid.'}) end return link end --[[==========================================================================]] --[[ Main ]] --[[==========================================================================]] function p.authorityControl(frame) local function resolveQID(qid) if qid then qid = 'Q'..mw.ustring.gsub(qid, '^[Qq]', '') if mw.wikibase.isValidEntityId(qid) and mw.wikibase.entityExists(qid) then local sitelink = mw.wikibase.getSitelink(qid) if sitelink then return mw.wikibase.getEntityIdForTitle(sitelink) or mw.wikibase.getEntity(qid).id end return mw.wikibase.getEntity(qid).id end end end local conf = config.config local parentArgs = frame:getParent().args local auxCats = '' local rct = false -- boolean to track if there are any links to be returned local qid,topic local wikilink = function(qid,hideifequal) local label,sitelink = mw.wikibase.getLabel(qid),mw.wikibase.getSitelink(qid) if label then if sitelink then local target = mw.title.new(sitelink) if target==title or (target.isRedirect and target.redirectTarget==title) then -- do not link return label else -- make wikilink to article return '[[' .. sitelink .. '|' .. label .. ']]' end else return label end else auxCats = auxCats .. needsAttention('L') return qid end end if namespace == 0 then qid = mw.wikibase.getEntityIdForCurrentPage() end if qid then -- article is connected to Wikidata item if parentArgs.qid and (resolveQID(parentArgs.qid) ~= qid) then -- non-matching qid parameter auxCats = auxCats .. needsAttention('D') end else -- page is not connected to any Wikidata item qid = resolveQID(parentArgs.qid) -- check qid parameter if no wikidata item is connected if qid then -- qid parameter is valid, set topic to display topic = mw.wikibase.getLabel(qid) if topic then if mw.ustring.lower(title.subpageText) == mw.ustring.lower(topic) then -- suppress topic display if subpagename equals topic up to case change topic = nil end if topic and mw.wikibase.getSitelink(qid) then -- make wikilink to article topic = '[[' .. mw.wikibase.getSitelink(qid) .. '|' .. topic .. ']]' end else auxCats = auxCats .. needsAttention('L') end elseif parentArgs.qid and parentArgs.qid~='' then -- invalid qid has been supplied, add to tracking cat auxCats = auxCats .. needsAttention('Q') end end local qids = {} -- setup any additional QIDs if parentArgs.additional=='auto' and qid then -- check P527 for parts to add additional qids local checkparts = function(property) local parts = mw.wikibase.getBestStatements(qid,property) if parts then for _,part in ipairs(parts) do if part.mainsnak.datavalue and part.mainsnak.datavalue.value.id then local resolvedqid = resolveQID(part.mainsnak.datavalue.value.id) if resolvedqid then table.insert(qids,resolvedqid) end end end end end for _,part in ipairs(config.auto_additional) do checkparts('P'..tostring(part)) end elseif parentArgs.additional and parentArgs.additional ~= '' then for _,v in ipairs(mw.text.split(parentArgs.additional,"%s*,%s*")) do v = resolveQID(v) if v then if v == qid then -- duplicate of qid parameter auxCats = auxCats .. needsAttention('R') end table.insert(qids,v) else -- invalid QID specified auxCats = auxCats .. needsAttention('A') end end end local sections = {} local localparams = false local numsections = 0 for _,_ in ipairs(config.sections) do numsections = numsections + 1 end for _ = 1,#qids+numsections do table.insert(sections,{}) end local qslink = '' -- setup link to add using QuickStatements -- check which identifiers to show/suppress in template local show = {} -- setup list local showall = true local function stripP(pid) if pid:match("^[Pp]%d+$") then pid = mw.ustring.gsub(pid,'[Pp]','') --strip P from property number end if pid:match("^%d+$") then return tonumber(pid) end end local function addshowlist(list) if list and list ~= '' then for _,v in ipairs(mw.text.split(string.lower(list),"%s*,%s*")) do local vprop = stripP(v) if vprop then -- e.g. show=P214 to show one particular property show[vprop] = true else -- e.g. show=arts to use whitelist if config.whitelists[v] then for _,w in ipairs(config.whitelists[v].properties) do show[w] = true end end end end showall = false end end addshowlist(frame.args.show) -- check show= parameter on wrapper template addshowlist(parentArgs.show or parentArgs.country) -- check show parameter on article template if parentArgs.suppress then local suppresslist = mw.text.split(parentArgs.suppress,"%s*,%s*") -- split parameter by comma for _,v in ipairs(suppresslist) do v = stripP(string.upper(v)) if v then show[v] = false auxCats = auxCats .. '[[' .. config.i18n.category .. ':' .. config.i18n.suppressedcat .. ']]' else auxCats = auxCats .. needsAttention('P') end end end local function makeSections(qid,addit) local tval = {} local function parameter_is_used(property) local used = false if property then if tval[property] then if tval[property][1] then used = true end elseif tval[property] == false then -- property has been manually suppressed used = true end end return used end for _, params in ipairs(conf) do tval[params.property] = getIdsFromWikidata(qid, 'P' .. params.property) -- setup table for values with property number as key local showb = true if (show[params.property] == nil) and (show[string.upper(params[1])] == nil ) then showb = showall -- if not specified then depends on showall elseif (show[params.property] == false) or (show[string.upper(params[1])] == false) then -- if either are false then id will be suppressed showb = false end if not showb then tval[params.property] = false -- indicates the identifier is suppressed elseif not addit then local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]] if val and val~='' then -- add local parameter to list if not already in localparams = true local bnew = true for _, w in pairs(tval[params.property]) do if val == w.id then bnew = false end end if bnew then -- add new value to table if qid then qslink = qslink .. '%7C%7C' .. qid .. '%7CP' .. params.property .. '%7C%22' .. mw.uri.encode(val,"PATH") .. '%22%7CS143%7CQ328' end table.insert(tval[params.property],{id=val,name=''}) end end end local suppress = false if params.suppressedbyproperty then for _,sc in ipairs(params.suppressedbyproperty) do if parameter_is_used(sc) then suppress = true end end end if tval[params.property] ~= false and not suppress then local tlinks = {} -- setup table for links local nextIdVal = 1 local row = '' for _,val in ipairs(tval[params.property]) do local link = _makelink(params,val,nextIdVal,qid) row = row .. link table.insert(tlinks,link) nextIdVal = nextIdVal + 1 end if nextIdVal>=2 then row = row .. '\n' table.insert(sections[addit or params.section],row) rct = true end end end end local function pencil(qid) if not qid then return '' end local args = { pid = 'identifiers' } -- #target the list of identifiers args.qid = qid return require('Module:EditAtWikidata')._showMessage(args) end makeSections(qid,false) for c = 1,#qids do makeSections(qids[c],numsections+c) end --configure Navbox local outString = '' if rct or localparams then -- there is at least one link to display local Navbox = require('Module:Navbox') local sect,lastsect = 0,0 local navboxArgs = { name = 'Authority control', navboxclass = 'authority-control', bodyclass = 'hlist', state = parentArgs.state or config.i18n.autocollapse, navbar = 'off' } for c=1,numsections+#qids do if #sections[c] ~= 0 then -- section is non-empty sect = sect + 1 lastsect = c local sectname if c <= numsections then -- regular section sectname = config.sections[c].name else -- section from additional qid local qid = qids[c-numsections] sectname = wikilink(qid) .. pencil(qid) end navboxArgs['group' .. c] = sectname navboxArgs['list' .. c] = table.concat(sections[c]) end end if localparams then lastsect = lastsect + 1 sect = sect + 1 navboxArgs['group' .. lastsect] = config.i18n.warning local warning = frame:expandTemplate{title = config.i18n.errortemplate, args = {config.i18n.localparams}} if qslink ~= '' then warning = warning .. ' ' .. config.i18n.movetowd .. '<span class="qs autoconfirmed-show">&#32;[[File:Commons to Wikidata QuickStatements.svg|20px|link=https://quickstatements.toolforge.org/#/v1=' .. qslink .. '|' .. config.i18n.addtowd .. ']]</span>' elseif not qid then if namespace == 0 then warning = warning .. ' ' .. config.i18n.connecttowd elseif namespace==14 or namespace==2 or namespace==118 then warning = warning .. ' ' .. config.i18n.qidcode end end navboxArgs['list' .. lastsect] = warning end if topic then -- display in expanded form with topic navboxArgs.title = config.i18n.aclink .. ' &ndash; ' .. topic .. pencil(qid) elseif sect == 1 then -- special display when only one section if lastsect <= numsections then if config.sections[lastsect].hidelabelwhenalone then -- no special label when only general or other IDs are present navboxArgs['group' .. lastsect] = config.i18n.aclink .. pencil(qid) else -- other regular section navboxArgs['group' .. lastsect] = config.i18n.aclink .. ': ' .. navboxArgs['group' .. lastsect] .. pencil(qid) end else -- section from additional qid navboxArgs['group' .. lastsect] = config.i18n.aclink .. ': ' .. navboxArgs['group' .. lastsect] end else -- add title to navbox navboxArgs.title = config.i18n.aclink .. pencil(qid) end outString = Navbox._navbox(navboxArgs) end if parentArgs.state then if (parentArgs.state ~= config.i18n.collapsed) and (parentArgs.state ~= config.i18n.expanded) and (parentArgs.state ~= config.i18n.autocollapse) then --invalid state parameter auxCats = auxCats .. needsAttention('S') end end if testcases then auxCats = mw.ustring.gsub(auxCats, '(%[%[)(' .. config.i18n.category .. ')', '%1:%2') --for easier checking end --out outString = outString..auxCats if namespace ~= 0 then outString = mw.ustring.gsub(outString,'(%[%[)(' .. config.i18n.category .. ':' .. config.i18n.Articles .. ')([^%|%]]+)%|?[^%|%]]*(%]%])','%1:%2%3%4') outString = mw.ustring.gsub(outString,'(%[%[)(' .. config.i18n.category .. ':' .. config.i18n.All_articles .. ')([^%|%]]+)%|?[^%|%]]*(%]%])','%1:%2%3%4') end local check = require('Module:Check for unknown parameters')._check local sortkey if namespace == 0 then sortkey = '*' .. title.text else sortkey = title.fullText end outString = outString .. check({ ['unknown'] = '[[' .. config.i18n.category .. ':' .. config.i18n.pageswithparams .. '|' .. sortkey .. ']]', ['preview'] = config.i18n.previewwarning, 'show', 'country', 'suppress', 'additional', 'qid', 'state' }, parentArgs) return outString end p.makelink = function(conf,val,nextid,qid) return _makelink(conf,val,nextid,qid) end return p 6aaed059184eb51fa32b5adad4740da4796293a2 Template:T 10 723 1436 1435 2023-06-23T01:31:54Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Rcat shell| {{R from template shortcut}} }} <!-- Used as Template:tl throughout English Wikipedia; demo template referenced only on meta --> bb10dbc83695404528dbc095ea267429142c7f05 Module:Authority control/doc 828 724 1438 1437 2023-06-23T01:31:58Z Tasha04 2 1 revision imported wikitext text/x-wiki {{High-risk}} {{Module rating|protected}} {{Authority control/related}} {{Lua|Module:Navbox|Module:ResolveEntityId}} This module contains the code for the {{T|Authority control}} template. Please see [[Template:Authority control/doc]]. <includeonly>{{sandbox other|| [[Category:Modules using data from Wikidata]] [[Category:Wikipedia authority control]] }}</includeonly> 7b92fcf75d5208e71e4bbc4dd06b8171884722e4 Module:Authority control/config 828 725 1440 1439 2023-06-23T01:31:59Z Tasha04 2 1 revision imported Scribunto text/plain require('strict') local p = {} p.auxiliary = 'Module:Authority control/auxiliary' p.i18n = { aclink = '[[Help:Authority control|Authority control]]', ACmodule = 'Module:Authority control', addtowd = 'Add values to Wikidata', attentioncat = 'Pages with authority control identifiers needing attention', All_articles = 'All articles', allfaultycat = 'All articles with faulty authority control information', Appears_as = 'Appears as', -- used on documentation table to show example Articles = 'Articles', Articles_with = 'Articles with', autocollapse = 'autocollapse', -- Navbox state parameter category = 'Category', Code = 'Code', collapsed = 'collapsed', -- Navbox state parameter connecttowd = 'Please connect this article to a Wikidata item.', Description = 'Description', errortemplate = 'Error', -- e.g. [[Template:Error]], expanded = 'expanded', -- Navbox state parameter faultcat = 'Articles with faulty authority control information', Faults = 'Faults', faulty = 'faulty', Faulty = 'Faulty', identifier = 'identifier', Identifier = 'Identifier', identifiers = 'identifiers', Identifiers = 'Identifiers', isnotvalid = 'is not valid', linktemplate = 'Wikidata property link', -- refers to [[Template:Wikidata property link]] localparams = 'Local parameters are deprecated.', maincat = 'Articles with authority control information', movetowd = 'Please move values to Wikidata.', pages = 'pages', pageswithparams = 'Pages using authority control with parameters', -- name of category for tracking uses with parameters previewwarning = 'Warning: Local parameters are deprecated. Please move any identifiers to Wikidata.', -- preview message when local parameters are used qidcode = 'Please use the <code>|qid=</code> parameter to specify the Wikidata item.', sandbox = 'sandbox', Section = 'Section', suppressedcat = 'Articles with suppressed authority control identifiers', testcases = 'testcases', The = 'The', Topic = 'Topic', Totals = 'Totals', Tracking_category = 'Tracking category', warning = 'Warning', warningicon = '345-409 Ambox warning centered.svg', -- icon used for faulty ids WDproperty = 'Wikidata property', } p.config = { { 'AAG', property = 3372, section = 5, link = 'https://www.aucklandartgallery.com/explore-art-and-ideas/artist/$1/', label = 'Auckland', pattern = '%d+', }, { 'ACM-DL', property = 864, section = 4, pattern = '%d%d%d%d%d%d%d%d%d%d%d', link = 'https://dl.acm.org/profile/$1', label = 'Association for Computing Machinery', }, { 'ADB', property = 1907, section = 6, patterns = {'[a-z][-a-z]+-[1-3]%d%d?%d?%d?', '[a-z][-a-z]+-[1-9]%d?%d?%d?'}, link = 'http://adb.anu.edu.au/biography/$1', label = 'Australia', }, { 'admiralty', property = 3562, patterns = {'[A-Q]%d%d%d%d', '[A-Q]%d%d%d%d%.%d+'}, section = 3, prefix = '[[Admiralty (identifier)|Admiralty]]' }, { 'AGSA', property = 6804, section = 5, pattern = '[1-9]%d*', link = 'https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/$1/', label = 'South Australia', }, { 'ARLHS', property = 2980, section = 3, pattern = '[A-Z][A-Z][A-Z]%d%d%d%d?[A-Z]?', link = 'http://wlol.arlhs.com/lighthouse/$1.html', label = 'ARLHS', }, { 'autores.uy', property = 2558, section = 6, pattern = '[1-9]%d?%d?%d?%d?', link = 'https://autores.uy/autor/$1', label = 'Uruguay', remark = "autores.uy is an author's database, that focus on [[Uruguay]]an authors. It was created and maintained by the Uruguayan chapter of Creative Commons. It also provides access to digitized works of the authors in public domain." }, { 'AWR', property = 4186, section = 6, patterns = {'[A-Z][A-Z][A-Z]%d%d%d%d[a-z]', '[A-Z][A-Z]%d%d%d%d%d[a-z]'}, link = 'http://www.womenaustralia.info/biogs/$1.htm', label = 'Australian Women\'s Register', }, { 'BGCI', property = 5818, section = 3, link = 'https://www.bgci.org/garden.php?id=$1', label = 'BGCI garden', pattern = '%d+' }, { 'BIBSYS', property = 1015, section = 2, patterns = {'[1-9]%d?%d?%d?%d?%d?%d?%d?%d?', '[1-9]%d%d%d%d%d%d%d%d%d%d%d%d'}, link = 'https://authority.bibsys.no/authority/rest/authorities/html/$1', label = 'Norway', remark = 'BIBSYS is a supplier of library and information systems for all Norwegian university Libraries, the National Library of Norway, college libraries, and a number of research libraries and institutions.' }, { 'Bildindex', property = 2092, section = 7, pattern = '%d+', link = 'https://www.bildindex.de/document/obj$1', label = 'Bildindex', }, { 'BMLO', property = 865, section = 6, link = 'https://bmlo.de/$1', label = 'BMLO', pattern = '[a-z][0-9][0-9][0-9][0-9]' }, { 'BNC', property = 1890, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number=$1', label = 'Chile', }, { 'BNE', property = 950, section = 2, patterns = {'[XF][XF]%d%d%d%d%d?%d?%d?', 'a%d%d%d%d%d?%d?%d?', 'bi[mcsv][aoei]%d%d%d%d%d%d%d%d%d%d', 'Mi[sm][eoa]%d%d%d%d%d%d%d%d%d%d'}, link = 'http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id=$1', label = 'Spain', remark = "National Library of Spain (BNE: ''Biblioteca Nacional de España'') is a major public library, the largest in Spain." }, { 'BNF', property = 268, section = 2, pattern = '%d%d%d%d%d%d%d%d[0-9bcdfghjkmnpqrstvwxz]', link = 'https://catalogue.bnf.fr/ark:/12148/cb$1', label = 'France', remark = 'Authority data of people listed in the general catalogue of the National Library of France' }, { 'BNFdata', property = 268, section = 2, pattern = '%d%d%d%d%d%d%d%d[0-9bcdfghjkmnpqrstvwxz]', link = 'https://data.bnf.fr/ark:/12148/cb$1', label = 'BnF data' }, { 'BNMM', property = 3788, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'https://catalogo.bn.gov.ar/F/?func=direct&local_base=BNA10&doc_number=$1', label = 'Argentina', }, { 'Botanist', property = 428, section = 4, valid = 'botanistV', link = 'https://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation=$1', label = 'International Plant Names Index', remark = 'Author citation (botany): standard form (official abbreviation) of a personal name for use in an author citation (only for names of algae, fungi and plants). Links to page at [[International Plant Names Index]] (IPNI).' }, { 'BPN', property = 651, section = 6, patterns = {'%d%d%d%d%d%d%d%d', '0?%d%d%d%d%d%d%d', '0?0?%d%d%d%d%d%d'}, link = 'http://www.biografischportaal.nl/en/persoon/$1', label = 'Netherlands', remark = 'Dutch project with material for 40,000 digitized biographies, including former colonies of the Netherlands.' }, { 'BRAHMS artist', property = 5226, section = 5, link = 'http://brahms.ircam.fr/$1', label = 'BRAHMS', pattern = '[a-z%-\\]+', remark = 'Identifier of an artist in the B.R.A.H.M.S. (Base Relationnelle d\'Articles Hypertextes sur la Musique du 20e Siècle database), by the IRCAM' }, { 'BRAHMS work', property = 5302, section = 7, link = 'https://brahms.ircam.fr/works/work/$1/', label = 'BRAHMS', pattern = '[1-9]%d*', remark = "Identifier for a musical work in the B.R.A.H.M.S. (Base Relationnelle d\'Articles Hypertextes sur la Musique du 20e Siècle database) database, by the IRCAM" }, { 'CANTICN', property = 9984, section = 2, pattern = '981[0-1]%d%d%d%d%d%d%d%d%d06706', link = 'https://cantic.bnc.cat/registre/$1', label = 'Catalonia', }, { 'CCG', property = 3920, section = 3, customlink = 'ccg', remark = 'Identifier from one of 4 volumes of List of Lights, Buoys and Fog Signals issued by the Canadian Coast Guard.' }, { 'CINII', property = 271, section = 4, pattern = 'D[AB]%d%d%d%d%d%d%d[%dX]', link = 'https://ci.nii.ac.jp/author/$1?l=en', label = 'CiNii', remark = 'CiNii is a bibliographic database service for material in Japanese academic libraries. It is maintained by the [[National Institute of Informatics]].' }, { 'CWGC', property = 1908, section = 6, pattern = '[1-9]%d*', link = 'https://www.cwgc.org/find-war-dead/casualty/$1/', label = 'Commonwealth War Graves Commission', }, { 'DAAO', property = 1707, section = 5, pattern = '[a-z%-]+%d*', link = 'https://www.daao.org.au/bio/$1', label = 'Australian Artists', }, { 'Danish List of Lights and Fog signals', property = 4038, section = 3, pattern = '[1-9]%d*[A-Za-z]?', prefix = 'Denmark', }, { 'DBI', property = 1986, section = 6, link = 'https://www.treccani.it/enciclopedia/$1_(Dizionario-Biografico)', label = 'Italian People', }, { 'DBLP', property = 2456, section = 4, patterns = {'%d%d%d?%/%d+-?[%d]*[%a]*-?[%d]*', '[%a]+%/[%w]*-?[%d]*'}, link = 'https://dblp.org/pid/$1', label = 'DBLP', }, { 'Deutsche Synchronkartei', property = 11646, section = 6, label = 'Deutsche Synchronkartei', link = 'https://www.synchronkartei.de/person/$1', remark = 'Online database of voice actors in film and television productions', pattern = string.rep('[0-9a-zA-Z_-]',9) }, { 'DIB', property = 6829, section = 6, pattern = '0[01]%d%d%d%d%.?[A-D]?', link = 'https://doi.org/10.3318/dib.$1.v1', label = 'Ireland', }, { 'DSI', property = 2349, section = 5, pattern = '[1-9]%d*', link = 'http://www.uni-stuttgart.de/hi/gnt/dsi2/index.php?table_name=dsi&function=details&where_field=id&where_value=$1', label = 'Scientific illustrators', }, { 'DTBIO', property = 7902, section = 6, pattern = '1[0-9]%d%d%d%d%d%d%d?[0-9X]', link = 'https://www.deutsche-biographie.de/pnd$1.html?language=en', label = 'Deutsche Biographie', }, { 'EBIDAT', property = 9725, section = 3, label = 'EBIDAT', link = 'https://www.ebidat.de/cgi-bin/ebidat.pl?id=$1', remark = 'Identifier for an entry in the castles inventory database EBIDAT', pattern = '[1-9]%d?%d?%d?' }, { 'Emmy', property = 8381, section = 5, link = 'https://www.emmys.com/bios/$1', label = 'Emmy Awards' }, { 'EMU', property = 4613, section = 7, pattern = '%d%d?%d?%d?%d?%d?', link = 'http://esu.com.ua/search_articles.php?id=$1', label = 'Encyclopedia of Modern Ukraine', }, { 'EUTA', property = 4535, section = 3, label = 'EUTA theatre', link = 'http://www.theatre-architecture.eu/db/?theatreId=$1', pattern = '[1-9]%d*' }, { 'EUTA person', property = 4534, section = 6, label = 'EUTA', link = 'http://www.theatre-architecture.eu/db.html?personId=$1', pattern = '[1-9]%d?%d?%d?%d?%d?%d?' }, { 'FAST', property = 2163, section = 1, pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?', link = 'http://id.worldcat.org/fast/$1/', label = 'FAST', }, { 'Finnish List of Lights', property = 4143, section = 3, pattern = '%d+', prefix = 'Finland', }, { 'FNZA', property = 6792, section = 5, pattern = '[1-9]%d*', link = 'https://findnzartists.org.nz/artist/$1/', label = 'New Zealand Artists', }, { 'GND', property = 227, section = 2, patterns = {'1[012]?%d%d%d%d%d%d%d[0-9X]', '[47]%d%d%d%d%d%d%-%d', '[1-9]%d?%d?%d?%d?%d?%d?%d?%-[0-9X]', '3%d%d%d%d%d%d%d[0-9X]'}, link = 'https://d-nb.info/gnd/$1', label = 'Germany', remark = 'Authority data on people, corporations and subjects from the [[German National Library]] (DNB)' }, { 'Google Scholar', property = 1960, section = 4, pattern = '[%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u]', link = 'https://scholar.google.com/citations?user=$1', label = 'Google Scholar', }, { 'Grammy', property = 7303, section = 5, pattern = '%w[%w-]+%/%d+', link = 'https://www.grammy.com/grammys/artists/$1', label = 'Grammy Awards', }, { 'GVP', property = 1886, section = 3, link = 'https://volcano.si.edu/volcano.cfm?vn=$1', label = 'Global Volcanism Program', pattern = '%d%d%d%d%d%d' }, { 'HDS', property = 902, section = 7, pattern = '%d%d%d%d%d%d', label = 'Historical Dictionary of Switzerland', link = 'https://hls-dhs-dss.ch/fr/articles/$1', remark = 'Historical Dictionary of Switzerland is an encyclopedia on the history of Switzerland.' }, { 'IAAF', property = 1146, section = 6, pattern = '%d+', link = 'https://www.iaaf.org/athletes/_/$1', label = 'World Athletics', remark = 'The IAAF athlete database lists information about [[sport of athletics]] competitors.' }, { 'ICCU', property = 396, section = 2, pattern = '%u%u[%u0-3]V%d%d%d%d%d%d', link = 'https://opac.sbn.it/nome/$1', label = 'Italy', remark = 'Central Institute for the Union Catalogue (ICCU: {{lang|it|Istituto Centrale per il Catalogo Unico}}) is an Italian government agency created to build a single catalog of all the libraries in the nation. It manages National Library Service ({{lang|it|Servizio bibliotecario nazionale}}).' }, { 'ICIA', property = 1736, section = 5, pattern = '%d+', link = 'https://www.imj.org.il/artcenter/newsite/en/?artist=$1', label = 'ICIA (Israel)', }, { 'IEU', property = 9070, section = 7, pattern = '[A-Z]\\[A-Z]\\%w+', link = 'http://www.encyclopediaofukraine.com/display.asp?linkpath=pages\\$1', label = 'Internet Encyclopedia of Ukraine', }, { 'ISIL', property = 791, section = 6, customlink = 'ISILlink', remark = 'Libraries, museums and archives, decentralized national databases.' }, { 'ISNI', property = 213, section = 1, label = 'ISNI', valid = 'validateIsni', link = 'https://isni.org/isni/$1', remark = 'ISNI is a method for uniquely identifying the public identities of contributors to media content such as books, TV programmes, and newspaper articles. Please take care not to confuse ISNI and ORCID identifiers.' }, { 'J9U', property = 8189, section = 2, pattern = '9870[0-1]%d%d%d%d%d%d%d%d05171', link = 'http://uli.nli.org.il/F/?func=find-b&local_base=NLX10&find_code=UID&request=$1', label = 'Israel', }, { 'Joconde', property = 347, section = 7, pattern = ''..string.rep('[%-0-9A-Za-z]', 11)..'', link = 'https://www.pop.culture.gouv.fr/notice/joconde/$1', label = 'Joconde', }, { 'KANTO', property = 8980, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'https://urn.fi/URN:NBN:fi:au:finaf:$1', label = 'Finland', }, { 'KBR', property = 11249, section = 2, pattern = '%d%d%d%d%d%d%d%d', link = 'https://opac.kbr.be/LIBRARY/doc/AUTHORITY/$1', label = 'Belgium', }, { 'KULTURNAV', property = 1248, section = 5, pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'http://kulturnav.org/$1', label = 'KulturNav', remark = 'KulturNav is a Norwegian cloud-based software service, allowing users to create, manage and distribute name authorities and terminology, focusing on the needs of museums and other cultural heritage institutions. The software is developed by KulturIT ANS and the development project is funded by the [[Arts Council Norway]].' }, { 'LCCN', property = 244, section = 2, pattern = '%l%l?%d%d%d%d%d%d%d%d%d?%d?', link = 'https://id.loc.gov/authorities/$1', label = 'United States', remark = 'See [[Wikipedia:Authority control#LCCN]] for formatting instructions' }, { 'Libris', property = 5587, section = 2, pattern = '%w+', link = 'https://libris.kb.se/$1', label = 'Sweden' }, { 'LIR', property = 886, section = 7, pattern = '%d+', link = 'http://www.e-lir.ch/e-LIR___Lexicon.$1.450.0.html', label = 'Lexicon Istoric Retic', remark = '{{lang|rm|Lexicon Istoric Retic}} (LIR) is a two volume version with a selection of articles published in Romansh.' }, { 'LNB', property = 1368, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'https://kopkatalogs.lv/F?func=direct&local_base=lnc10&doc_number=$1&P_CON_LNG=ENG', label = 'Latvia', }, { 'Marina Militare', property = 3863, section = 3, pattern = '[1-9]%d*', link = 'http://www.marina.difesa.it/cosa-facciamo/per-la-difesa-sicurezza/fari/Pagine/$1.aspx', label = 'Italy', }, { 'MarineTraffic', property = 3601, section = 3, pattern = '%d%d%d%d%d%d%d%d%d%d', link = 'https://www.marinetraffic.com/en/ais/details/lights/$1', label = 'MarineTraffic', }, { 'MATHSN', property = 4955, section = 4, pattern = '[1-9]%d%d%d%d%d?%d?', link = 'https://mathscinet.ams.org/mathscinet/MRAuthorID/$1', label = 'MathSciNet', }, { 'MBA', property = 434, section = 5, category = 'MusicBrainz', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/artist/$1', label = 'MusicBrainz', remark = 'MusicBrainz is an open music encyclopedia that collects music metadata and makes it available to the public.' }, { 'MBAREA', property = 982, section = 3, category = 'MusicBrainz area', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/area/$1', label = 'MusicBrainz area', }, { 'MBI', property = 1330, section = 7, category = 'MusicBrainz instrument', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/instrument/$1', label = 'MusicBrainz instrument', }, { 'MBL', property = 966, section = 7, category = 'MusicBrainz label', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', label = 'MusicBrainz label', link = 'https://musicbrainz.org/label/$1', }, { 'MBP', property = 1004, section = 3, category = 'MusicBrainz place', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/place/$1', label = 'MusicBrainz place', }, { 'MBRG', property = 436, section = 7, category = 'MusicBrainz release group', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/release-group/$1', label = 'MusicBrainz release group', }, { 'MBS', property = 1407, section = 7, category = 'MusicBrainz series', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/series/$1', label = 'MusicBrainz series', }, { 'MBW', property = 435, section = 7, category = 'MusicBrainz work', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x', link = 'https://musicbrainz.org/work/$1', label = 'MusicBrainz work', }, { 'Mérimée', property = 380, section = 3, link = 'https://www.pop.culture.gouv.fr/notice/merimee/$1', label = 'Mérimée', patterns = {'[PEI]A%d[0-9AB]%d%d%d%d%d%d','ACR%d%d%d%d%d%d%d', 'MI%d%d%dB?', 'JAR%d%d%d%d%d%d%d', 'SPR%d%d%d%d%d%d%d'} }, { 'MGP', property = 549, section = 4, pattern = '%d%d?%d?%d?%d?%d?', link = 'https://www.mathgenealogy.org/id.php?id=$1', label = 'Mathematics Genealogy Project', remark = 'Mathematics Genealogy Project is a web-based database for the academic genealogy of mathematicians.' }, { 'MoMA', property = 2174, section = 5, link = 'https://www.moma.org/artists/$1', label = 'Museum of Modern Art', pattern = '%d+' }, { 'Musée d\'Orsay', property = 2268, section = 5, link = 'https://www.musee-orsay.fr/en/ressources/repertoire-artistes-personnalites/$1', label = 'Musée d\'Orsay', pattern = '[1-9]%d?%d?%d?%d?%d?' }, { 'NARA', property = 1225, section = 7, pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?', link = 'https://catalog.archives.gov/id/$1', label = 'NARA', remark = 'National Archives and Records Administration (NARA) is an independent agency of the United States government charged with preserving and documenting government and historical records.' }, { 'National Gallery of Canada', property = 5368, section = 5, label = 'National Gallery of Canada', link = 'https://www.gallery.ca/collection/artist/$1', pattern = '%C+' }, { 'NCL', property = 1048, section = 2, pattern = '%d+', link = 'http://aleweb.ncl.edu.tw/F/?func=accref&acc_sequence=$1&CON_LNG=ENG', label = 'Taiwan', remark = 'National Central Library is the national library of Taiwan, Republic of China.' }, { 'NDL', property = 349, section = 2, link = 'https://id.ndl.go.jp/auth/ndlna/$1', patterns = {'a1%d?%d%d%d%d%d%d%d%d', 's?%d?%d%d%d%d%d%d%d%d'}, label = 'Japan', remark = 'Authority data listed in the catalog of the national library of Japan. Search also available via [http://viaf.org/ VIAF].' }, { 'NGA', property = 3563, section = 3, pattern = '11[0-6]%-%d+%.?%d*', link = 'https://wikidata-externalid-url.toolforge.org/?url=https%3A%2F%2Fmsi.nga.mil%2FqueryResults%3Fpublications%2Fngalol%2Flights-buoys%3Fvolume%3D%251%26featureNumber%3D%252%26includeRemovals%3Dfalse%26output%3Dhtml&exp=(%5Cd%7B3%7D)-(.*)&id=$1', label = 'NGA', }, { 'NGV', property = 2041, section = 5, pattern = '%d+', link = 'https://www.ngv.vic.gov.au/explore/collection/artist/$1/', label = 'Victoria', }, { 'NKC', property = 691, section = 2, pattern = '[a-z][a-z][a-z]?[a-z]?%d%d%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?', link = 'https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica=$1&CON_LNG=ENG', label = 'Czech Republic', remark = 'National Library of the Czech Republic ({{lang|cs|Národní knihovna České republiky}}) is the central library of the Czech Republic.' }, { 'NLA', property = 409, section = 2, pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?', link = 'https://nla.gov.au/anbd.aut-an$1', label = 'Australia', remark = "NLA Trove's People and Organisation view allows the discovery of biographical and other contextual information about people and organisations. Search also available via [http://viaf.org/ VIAF]." }, { 'NLG', property = 3348, section = 2, pattern = '[1-9]%d*', link = 'https://data.nlg.gr/resource/authority/record$1', label = 'Greece', }, { 'NLK', property = 5034, section = 2, link = 'https://lod.nl.go.kr/resource/$1', label = 'Korea', patterns = {'%u%u%u%d%d%d%d%a?%d%d%d%d%d?%d?', 'CNTS%-%d%d%d%d%d%d%d%d%d%d%d'} }, { 'NLR', property = 1003, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'http://aleph.bibnat.ro:8991/F/?func=direct&local_base=NLR10&doc_number=$1', label = 'Romania', }, { 'Norwegian List of Lights', property = 4055, section = 3, pattern = '%d+', prefix = 'Norway', }, { 'NSK', property = 1375, section = 2, pattern = '%d%d%d%d%d%d%d%d%d', link = 'http://katalog.nsk.hr/F/?func=direct&doc_number=$1&local_base=nsk10', label = 'Croatia', }, { 'NTA', property = 1006, section = 2, pattern = '%d%d%d%d%d%d%d%d[%dX]', link = 'http://data.bibliotheken.nl/id/thes/p$1', label = 'Netherlands', }, { 'Online List of Lights', property = 3223, section = 3, pattern = '[1-9]%d*', label = 'OLL', link = 'http://listoflights.org/leuchtfeuer/detail?id=$1.aspx' }, { 'ORCID', property = 496, section = 4, label = 'ORCID', valid = 'orcidV', link = 'https://orcid.org/$1', remark = 'Authority data on researchers, academics, etc. The ID range is a subset of the [[ISNI]] range. For free text links (for example when mentioning a person on page which is not about them), it is also possible to use {{tl|ORCID}}. Authors—including Wikipedia editors—may obtain an ORCID by signing up at [https://orcid.org/register orcid.org/register]. Please take care not to confuse ORCID and ISNI identifiers.' }, { 'PIC', property = 2750, section = 5, pattern = '[1-9]%d*', link = 'https://pic.nypl.org/constituents/$1', label = 'Photographers\' Identities', remark = "PIC is a photographer's database. It is maintained by the New York Public Library." }, { 'Pleiades', property = 1584, section = 3, label = 'Pleiades', link = 'https://pleiades.stoa.org/places/$1', pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?', remark = "Pleiades is a joint project of the Institute for the Study of the Ancient World at [[New York University]] and the Ancient World Mapping Center at the [[University of North Carolina]] at Chapel Hill." }, { 'PLWABN', property = 7293, section = 2, pattern = '981%d%d%d%d%d%d%d%d05606*', link = 'http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=1&NU=1&IM=4&WI=$1', label = 'Poland', }, { 'PortugalA', property = 1005, section = 2, pattern = '[1-9]%d*', link = 'http://id.bnportugal.gov.pt/aut/catbnp/$1', label = 'Portugal', }, { 'Portuguese lighthouse', property = 4423, section = 3, patterns = {'[1-9]%d*', '[1-9]%d*.%d+'}, prefix = 'Portugal', }, { 'NLP', property = 1695, section = 2, patterns = {'9810%d+', 'A%d%d%d%d%d%d%d[%dX]'}, link = 'https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id=$1', label = 'Poland', suppressedbyproperty = {7293} }, { 'Prado', property = 5321, section = 5, link = 'https://www.museodelprado.es/en/the-collection/artist/wd/$1', label = 'Prado', pattern = '%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x' }, { 'Publons', property = 3829, section = 4, pattern = '%d+', link = 'https://publons.com/author/$1/', label = 'Publons' }, { 'RID', property = 1053, section = 4, patterns = {'[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-19%d%d', '[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-20%d%d'}, link = 'https://www.researcherid.com/rid/$1', label = 'ResearcherID', remark = 'An identifying system for scientific authors. The system was introduced in January 2008 by [[Thomson Reuters]]. The combined use of the [[digital object identifier]] with the ResearcherID allows for a unique association of authors and scientific articles.' }, { 'RISM', property = 5504, section = 7, label = 'RISM', patterns = {'pe[1-9]%d*', 'ks[1-9]%d*', '[1-9]%d*'}, link = 'https://opac.rism.info/search?id=$1', }, { 'RKDartists', property = 650, section = 5, pattern = '[1-9]%d?%d?%d?%d?%d?', link = 'https://rkd.nl/en/explore/artists/$1', label = 'RKD Artists', remark = 'RKDartists is an online database using a controlled vocabulary currently containing around 200,000+ names and other information about artists. Names in RKDartists may include given names, pseudonyms, variant spellings, names in multiple languages, and names that have changed over time (e.g., married names).' }, { 'RKDID', property = 350, section = 7, pattern = '[1-9]%d?%d?%d?%d?%d?', link = 'https://rkd.nl/nl/explore/images/$1', label = 'RKD ID', }, { 'RSL', property = 947, section = 2, pattern = '%d%d?%d?%d?%d?%d?%d?%d?%d?', link = 'http://aleph.rsl.ru/F?func=find-b&find_code=SYS&adjacent=Y&local_base=RSL11&request=$1&CON_LNG=ENG', label = 'Russia', remark = 'Russian State Library ({{lang|ru|Российская государственная библиотека}}) is the national library of Russia.' }, { 'Scopus', property = 1153, section = 4, pattern = '[1-9]%d%d%d%d%d%d%d%d%d%d?', link = 'https://www.scopus.com/authid/detail.uri?authorId=$1', label = 'Scopus', remark = 'SciVerse Scopus is a bibliographic database containing abstracts and citations for academic journal articles. It covers nearly 19,500 titles from over 5,000 international publishers, of which 16,500 are peer-reviewed journals in the scientific, technical, medical, and social sciences (including arts and humanities).' }, { 'SELIBR', property = 906, section = 2, pattern = '[1-9]%d%d%d%d%d?', link = 'https://libris.kb.se/auth/$1', label = 'Sweden', remark = 'Authority data from the [[National Library of Sweden]]', suppressedbyproperty = {5587} }, { 'SIKART', property = 781, section = 5, pattern = '%d%d%d%d%d%d%d%d?%d?', link = 'http://www.sikart.ch/KuenstlerInnen.aspx?id=$1&lng=en', label = 'SIKART', remark = 'SIKART is a biographical dictionary and a database on visual art in Switzerland and Liechtenstein. It is published online by the Swiss Institute for Art Research (SIAR).' }, { 'SNAC-ID', property = 3430, section = 7, pattern = '%d*[A-Za-z][0-9A-Za-z]*', link = 'https://snaccooperative.org/ark:/99166/$1', label = 'SNAC', }, { 'Städel', property = 4581, section = 5, label = 'Städel', link = 'https://sammlung.staedelmuseum.de/en/person/$1', pattern = '%C+' }, { 'StadiumDB', property = 5288, section = 3, label = 'StadiumDB', link = 'http://stadiumdb.com/stadiums/$1', pattern = '%l%l%l/[_%w]+' }, { 'Structurae structure', property = 454, section = 3, pattern = '[12]0%d%d%d%d%d%d', label = 'Structurae', link = 'https://structurae.net/structures/$1', }, { 'Structurae person', property = 2418, section = 6, pattern = '10%d%d%d%d%d', label = 'Structurae', link = 'https://structurae.net/persons/$1', }, { 'SUDOC', property = 269, section = 7, label = 'IdRef', pattern = '%d%d%d%d%d%d%d%d[%dxX]', link = 'https://www.idref.fr/$1', remark = 'Authority data of people listed in the general catalogue of the University Documentation System of France. Also available from [http://www.sudoc.abes.fr/xslt//DB=2.1/SET=2/TTL=1/LNG=EN/ English-speaking catalog] (search author, click one book, click author name, take PPN= value of the URL)' }, { 'Sycomore', property = 1045, section = 6, link = 'https://www2.assemblee-nationale.fr/sycomore/fiche/(num_dept)/$1', label = 'Sycomore', pattern = '[1-9]%d?%d?%d?%d?' }, { 'TA98', property = 1323, section = 7, pattern = 'A%d%d%.%d%.%d%d%.%d%d%d[FM]?', link = 'http://tools.wmflabs.org/wikidata-externalid-url/?p=1323&url_prefix=https:%2F%2Fwww.unifr.ch%2Fifaa%2FPublic%2FEntryPage%2FTA98%20Tree%2FEntity%20TA98%20EN%2F&url_suffix=%20Entity%20TA98%20EN.htm&id=$1', label = 'Terminologia Anatomica', }, { 'TDVİA', property = 7314, section = 7, pattern = '[%d%l/-]+', link = 'https://islamansiklopedisi.org.tr/$1', label = 'İslâm Ansiklopedisi', }, { 'TePapa', property = 3544, section = 5, pattern = '%d+', link = 'https://collections.tepapa.govt.nz/agent/$1', label = 'Te Papa (New Zealand)' }, { 'TLS', property = 1362, section = 7, valid = 'tlsV', link = 'http://tls.theaterwissenschaft.ch/wiki/$1', label = 'Theaterlexikon', remark = '{{lang|de|Theaterlexikon der Schweiz}} (TLS) is an encyclopedia about theatre in Switzerland. It was developed by the Institute of Theatre Studies of the [[University of Berne]].' }, { 'Trove', property = 1315, section = 6, label = 'Trove', pattern = '[1-9]%d%d%d%d%d%d?%d?', link = 'https://trove.nla.gov.au/people/$1', }, { 'UKPARL', property = 6213, section = 6, pattern = '[a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d]', link = 'https://id.parliament.uk/$1', label = 'UK Parliament', remark = 'UK parliament member data' }, { 'ULAN', property = 245, section = 5, pattern = '500%d%d%d%d%d%d', link = 'https://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=$1', label = 'ULAN', remark = 'ULAN is an online database using a controlled vocabulary currently containing around 293,000 names and other information about artists. Names in ULAN may include given names, pseudonyms, variant spellings, names in multiple languages, and names that have changed over time (e.g., married names).' }, { 'USCG', property = 3723, section = 3, prefix = '[[USCG (identifier)|USCG]]', customlink = 'uscgLink' }, { 'USCongress', property = 1157, section = 6, pattern = '[A-Z]00[01]%d%d%d', link = 'http://bioguide.congress.gov/scripts/biodisplay.pl?index=$1', label = 'US Congress', remark = 'Biographical Directory of the United States Congress is a biographical dictionary of all present and former members of the United States Congress and its predecessor, the Continental Congress. Also included are Delegates from territories and the District of Columbia and Resident Commissioners from the Philippines and Puerto Rico.' }, { 'VcBA', property = 8034, section = 2, pattern = '49[0-9]%/[1-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?', link = 'https://wikidata-externalid-url.toolforge.org/?p=8034&url_prefix=https://opac.vatlib.it/auth/detail/&id=$1', label = 'Vatican', remark = 'Vatican Library document data' }, { 'VIAF', property = 214, section = 1, label = 'VIAF', patterns = {'[1-9]%d%d?%d?%d?%d?%d?%d?%d?', '[1-9]%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d?%d?%d?'}, link = 'https://viaf.org/viaf/$1', remark = 'International authority data from the Online Computer Library Center (OCLC)' }, { 'Vitaskrá', property = 3993, section = 3, pattern = '[1-9]%d*', prefix = 'Iceland' }, { 'WorldCat Entities', property = 10832, section = 1, link = 'https://id.oclc.org/worldcat/entity/$1', label = 'WorldCat', patterns = {'%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w%w', '[QP][1-9]%d*'}, remark = 'WorldCat Entities for persons and works, by [[OCLC]]', }, { 'WORLDCATID', property = 7859, section = 1, patterns = {'viaf%-%d+', 'lccn%-n[a-z]?[0-9%-]+', 'n[cps]%-.+'}, link = 'https://www.worldcat.org/identities/$1/', label = 'WorldCat', category = 'WorldCat', suppressedbyproperty = {10832} }, { 'World Waterfall', property = 3326, section = 3, link = 'https://www.worldwaterfalldatabase.com/index.php/waterfall/$1', label = 'World Waterfall', pattern = '%d+' }, { 'ZBMATH', property = 1556, section = 4, patterns = {'%l[%l%-]*','%l[%l%-]*%.%l[%l%-]*','%l[%l%-]*.%d*','%l[%l%-]*%.%l[%l%-]*%.%d*'}, link = 'https://zbmath.org/authors/?q=ai:$1', label = 'zbMATH', } } p.sections = { [1] = {name = 'International', hidelabelwhenalone = true}, [2] = {name = 'National'}, [3] = {name = 'Geographic'}, [4] = {name = 'Academics'}, [5] = {name = 'Artists'}, [6] = {name = 'People'}, [7] = {name = 'Other', hidelabelwhenalone = true} } p.whitelists = { arts = { topic = 2018526, properties = {268, 214, 7859, 3372, 6804, 1907, 4186, 2092, 1908, 1707, 6829, 2349, 6792, 227, 1960, 347, 1248, 244, 1225, 2041, 409, 2750, 650, 350, 781, 3430, 3544, 1315, 245, 1986, 7902, 651, 791, 7303} }, lighthouse = { topic = 39715, properties = {3563, 4055, 3223, 4423, 3723, 3993, 3562, 2980, 4038, 3920, 4143, 3863, 3601} }, ch = { topic = 39, properties = {902, 886, 3065, 781, 1362}, }, cz = {topic = 213, properties = {691}}, cl = {topic = 298, properties = {1890}}, es = {topic = 29, properties = {950, 9984}}, gr = {topic = 41, properties = {3348}}, hr = {topic = 224, properties = {1375}}, il = {topic = 801, properties = {8189, 1736}}, it = {topic = 38, properties = {396, 3863, 1986, 8034}}, ja = {topic = 17, properties = {349, 271}}, kr = {topic = 884, properties = {5034}}, lv = {topic = 211, properties = {1368}}, nl = {topic = 55, properties = {651, 1006, 650, 350}}, pl = {topic = 36, properties = {1695, 7293}}, ro = {topic = 218, properties = {1003}}, ru = {topic = 159, properties = {947}}, sv = {topic = 34, properties = {906, 5587}}, tr = {topic = 43, properties = {7314}}, tw = {topic = 865, properties = {1048}}, uy = {topic = 77, properties = {2558}} } p.auto_additional = { -- defines properties to check when additional=auto 527, -- has part(s) 150, -- contains the administrative territorial entity 355, -- has subsidiary } return p 3d16330392ae8f98e913a645e15b749c50168d90 Module:Infobox/doc 828 727 1444 1443 2023-06-23T01:32:22Z Tasha04 2 1 revision imported wikitext text/x-wiki {{High-use|3308957|all-pages = yes}} {{module rating|protected}} {{Lua|Module:Navbar|Module:Italic title}} {{Uses TemplateStyles|Module:Infobox/styles.css|Template:Hlist/styles.css|Template:Plainlist/styles.css}} '''Module:Infobox''' is a [[WP:Module|module]] that implements the {{tl|Infobox}} template. Please see the template page for usage instructions. == Tracking categories == * {{clc|Pages using infobox templates with ignored data cells}} * {{clc|Articles using infobox templates with no data rows}} * {{clc|Pages using embedded infobox templates with the title parameter}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:Modules that add a tracking category]] [[Category:Wikipedia infoboxes]] [[Category:Infobox modules]] [[Category:Modules that check for strip markers]] }}</includeonly> 936ad219eb263a6f3293d62f667bd7b5db1059c1 Module:Navbar/doc 828 728 1446 1445 2023-06-23T01:33:48Z Tasha04 2 1 revision imported wikitext text/x-wiki {{used in system}} {{module rating|protected}} {{Lua|Module:Navbar/configuration|Module:Arguments|Module:TableTools}} {{Uses TemplateStyles|Module:Navbar/styles.css|Template:Hlist/styles.css}} This is a [[WP:Lua|Lua]] implementation of {{tl|Navbar}}. It is used in [[Module:Navbox]]. 8525efb014e023829e4454a637299cf4a8cd958b Template:DMCA 10 729 1448 1447 2023-06-23T01:34:11Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Dated maintenance category (articles)]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} 711d3f1c53fa704297f675a8dcf1a56719c5b654 Module:Ns has subpages 828 733 1456 1455 2023-06-23T01:34:14Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p e133068ba73738b16e1e3eba47735516a461eb5b Module:Section link 828 736 1462 1461 2023-06-23T01:34:18Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements {{section link}}. require('strict'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 5cc61d43dc601ca43e9472500fc5cd09ca7cea44 Template:Mlx 10 738 1466 1465 2023-06-23T01:34:22Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Module link expanded]] {{Redirect category shell| {{R from move}} }} 3a80cf77e735d41b1611f1bd7f028ce9941330a2 Module:InfoboxImage/doc 828 739 1468 1467 2023-06-23T01:34:32Z Tasha04 2 1 revision imported wikitext text/x-wiki {{used in system}} {{Module rating|protected}} ==Overview== This module is used within infoboxes to process the image parameters and tidy up the formatting of the result. ==Parameters== {| class="wikitable" ! Parameter ! Description |- | image | Required. The main parameter that should be passed over which contains the image info. |- | size | Size to display image, in pixels. Use is discouraged per [[WP:THUMBSIZE]]; see {{Para|upright}} below instead. |- | maxsize | Maximum size to display image. Note: If no size or sizedefault params specified then image will be shown at maxsize. |- | sizedefault | The size to use for the image if no size param is specified. Defaults to [[Wikipedia:Autosizing images|frameless]]. |- | alt | Alt text for the image. |- | title | Title text for image (mouseover text). |- | border | If yes, then a border is added. |- | page | The page number to be displayed when using a multi-page image. |- | upright | If upright=yes, adds "upright" which displays image at 75% of default image size (which is 220px if not changed at [[Special:Preferences]]). If a value, adds "upright=''value''" to image, where values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%). |- | center | If yes, then the image is centered. |- | thumbtime | thumbtime param, used for video clips. |- | suppressplaceholder | If no, then will not suppress certain placeholder images. See {{section link||Placeholder images which can be suppressed}}. |- | link | Page to go to when clicking on the image. |- | class | HTML classes to add to the image. |} Note: If you specify the maxsize or sizedefault params, then you should include the px after the number. {{Use dmy dates|date=July 2016}} ==Parameters displayed in image syntax== All parameters: :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}} }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}}}}</code> When "size" and "maxsize" are defined, the smaller of the two is used (if "px" is omitted it will be added by the module): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</code> When "size" is not defined, "sizedefault" is used, even if larger than "maxsize" (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</code> When "size" and "sizedefault" are not defined, "maxsize" is used (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</code> When "size", "sizedefault", and "maxsize" are not defined, "frameless" is added, which displays the image at the default thumbnail size (220px, but logged in users can change this at [[Special:Preferences]]) and is required if using "upright" to scale the default size: :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</code> Use of "upright" without a number value, which displays the image at approximately 75% of the user's default size (multiplied by 0.75 then rounded to nearest 10): :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</code> When "alt" is used without "title", the alt text is also used as the title: :<syntaxhighlight lang="wikitext" style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</syntaxhighlight> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</code> For more information, see [[Wikipedia:Extended image syntax]]. ==Sample usage== <syntaxhighlight lang="wikitext" style="overflow:auto;"> |image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{{image_upright|1}}}|alt={{{alt|}}}}} </syntaxhighlight> ==Examples== {| class="wikitable" |- | {{mlx|InfoboxImage|InfoboxImage}} | {{#invoke:InfoboxImage|InfoboxImage}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}}} | {{#invoke:InfoboxImage|InfoboxImage|image=}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg}}<br /> {{mlx|InfoboxImage|InfoboxImage|image{{=}}File:Abbey Rd Studios.jpg}}<br /> {{mlx|InfoboxImage|InfoboxImage|image{{=}}Image:Abbey Rd Studios.jpg}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|upright{{=}}yes}}<br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|upright{{=}}1.2}}<br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size{{=}}100px}}<br /> {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size{{=}}100}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|Image:Abbey Rd Studios.jpg|200px}}}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|Image:Abbey Rd Studios.jpg|200px}}|title=Abbey Road!}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|sizedefault{{=}}250px|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|sizedefault{{=}}250|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|sizedefault{{=}}250px|alt{{=}}The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size{{=}}100px|alt{{=}}The front stairs and door of Abbey Road Studios}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Bandera de Bilbao.svg|size{{=}}100|border{{=}}yes}} | {{#invoke:InfoboxImage|InfoboxImage|image=Bandera de Bilbao.svg|size=200|border=yes}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Image is needed male.svg}} | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Image is needed male.svg|suppressplaceholder=no}} | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|File:Image is needed male.svg|200px}}}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|File:Image is needed male.svg|200px}}|suppressplaceholder{{=}}no}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size=50px|maxsize{{=}}100px}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|size=200px|maxsize{{=}}100px}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}{{elc|File:Abbey Rd Studios.jpg|200px}}|maxsize{{=}}100px}} | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}Abbey Rd Studios.jpg|maxsize{{=}}100px|center{{=}}yes}} | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}} |- | {{mlx|InfoboxImage|InfoboxImage|image{{=}}no such image|maxsize{{=}}100px|center{{=}}yes}}<!-- this issue sh'd be fixed somewhow--> | {{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}} |} == Placeholder images which can be suppressed == {| | style="vertical-align:top;" | * [[:File:Blue - replace this image female.svg]] * [[:File:Blue - replace this image male.svg]] * [[:File:Female no free image yet.png]] * [[:File:Male no free image yet.png]] * [[:File:Flag of None (square).svg]] * [[:File:Flag of None.svg]] * [[:File:Flag of.svg]] * [[:File:Green - replace this image female.svg]] * [[:File:Green - replace this image male.svg]] * [[:File:Image is needed female.svg]] * [[:File:Image is needed male.svg]] * [[:File:Location map of None.svg]] * [[:File:Male no free image yet.png]] * [[:File:Missing flag.png]] * [[:File:No flag.svg]] * [[:File:No free portrait.svg]] * [[:File:No portrait (female).svg]] * [[:File:No portrait (male).svg]] * [[:File:Red - replace this image female.svg]] * [[:File:Red - replace this image male.svg]] * [[:File:Replace this image female (blue).svg]] * [[:File:Replace this image female.svg]] * [[:File:Replace this image male (blue).svg]] * [[:File:Replace this image male.svg]] * [[:File:Silver - replace this image female.svg]] * [[:File:Silver - replace this image male.svg]] * [[:File:Replace this image.svg]] * [[:File:Cricket no pic.png]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:Example.jpg]] * [[:File:Image placeholder.png]] * [[:File:No male portrait.svg]] * [[:File:Nocover-upload.png]] * [[:File:NoDVDcover copy.png]] * [[:File:Noribbon.svg]] | style="vertical-align:top;" | * [[:File:No portrait-BFD-test.svg]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] * [[:File:Sin bandera.svg]] * [[:File:Sin escudo.svg]] * [[:File:Replace this image - temple.png]] * [[:File:Replace this image butterfly.png]] * [[:File:Replace this image.svg]] * [[:File:Replace this image1.svg]] * [[:File:Resolution angle.png]] * [[:File:Image-No portrait-text-BFD-test.svg]] * [[:File:Insert image here.svg]] * [[:File:No image available.png]] * [[:File:NO IMAGE YET square.png]] * [[:File:NO IMAGE YET.png]] * [[:File:No Photo Available.svg]] * [[:File:No Screenshot.svg]] * [[:File:No-image-available.jpg]] * [[:File:Null.png]] * [[:File:PictureNeeded.gif]] * [[:File:Place holder.jpg]] * [[:File:Unbenannt.JPG]] * [[:File:UploadACopyrightFreeImage.svg]] * [[:File:UploadAnImage.gif]] * [[:File:UploadAnImage.svg]] * [[:File:UploadAnImageShort.svg]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:No male portrait.svg]] * [[:File:NoDVDcover copy.png]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] |} == Tracking categories == * {{clc|Pages using infoboxes with thumbnail images}} <includeonly>{{Sandbox other|| {{DEFAULTSORT:Image, {{PAGENAME}}}} [[Category:Modules for image handling]] [[Category:Modules that add a tracking category]] [[Category:Infobox modules]] }}</includeonly> c94fcbc786f35c8e23c8f499b3090efc604852c7 Module:Transclusion count/data/C 828 742 1474 1473 2023-06-23T01:34:55Z Tasha04 2 1 revision imported Scribunto text/plain return { ["C"] = 865000, ["C-Class"] = 78000, ["C-SPAN"] = 12000, ["C-cmn"] = 2600, ["C-pl"] = 52000, ["C."] = 3900, ["CAN"] = 20000, ["CANelec"] = 14000, ["CANelec/gain"] = 2600, ["CANelec/hold"] = 4800, ["CANelec/source"] = 7000, ["CANelec/top"] = 6200, ["CANelec/total"] = 6100, ["CAS"] = 3800, ["CBB_Standings_End"] = 15000, ["CBB_Standings_Entry"] = 15000, ["CBB_Standings_Start"] = 15000, ["CBB_Yearly_Record_End"] = 3000, ["CBB_Yearly_Record_Entry"] = 3100, ["CBB_Yearly_Record_Start"] = 3000, ["CBB_Yearly_Record_Subhead"] = 3600, ["CBB_Yearly_Record_Subtotal"] = 2800, ["CBB_roster/Footer"] = 7800, ["CBB_roster/Header"] = 7800, ["CBB_roster/Player"] = 7800, ["CBB_schedule_end"] = 10000, ["CBB_schedule_entry"] = 11000, ["CBB_schedule_start"] = 11000, ["CBB_yearly_record_end"] = 4100, ["CBB_yearly_record_end/legend"] = 3600, ["CBB_yearly_record_entry"] = 4000, ["CBB_yearly_record_start"] = 4000, ["CBB_yearly_record_subhead"] = 3700, ["CBB_yearly_record_subtotal"] = 3800, ["CBSB_Standings_End"] = 4400, ["CBSB_Standings_Entry"] = 4400, ["CBSB_Standings_Start"] = 4400, ["CBSB_link"] = 3500, ["CC0"] = 4000, ["CENTURY"] = 16000, ["CFB_Standings_End"] = 34000, ["CFB_Standings_Entry"] = 34000, ["CFB_Standings_Start"] = 34000, ["CFB_Yearly_Record_End"] = 6600, ["CFB_Yearly_Record_End/legend"] = 2300, ["CFB_Yearly_Record_Entry"] = 6600, ["CFB_Yearly_Record_Start"] = 6600, ["CFB_Yearly_Record_Subhead"] = 6600, ["CFB_Yearly_Record_Subtotal"] = 6500, ["CFB_schedule"] = 26000, ["CFB_schedule_entry"] = 19000, ["CFL_Year"] = 5600, ["CGF_year"] = 2600, ["CHE"] = 10000, ["CHI"] = 2700, ["CHL"] = 3600, ["CHN"] = 11000, ["CN"] = 3400, ["CO2"] = 3200, ["COI"] = 14000, ["COIUL"] = 128000, ["COI_editnotice"] = 6600, ["COL"] = 4900, ["COLON"] = 13000, ["CRI"] = 2200, ["CRO"] = 5000, ["CSK"] = 2800, ["CSS_image_crop"] = 4400, ["CUB"] = 3600, ["CURRENTDATE"] = 3600, ["CURRENTMINUTE"] = 2500, ["CYP"] = 2000, ["CZE"] = 15000, ["Calendar"] = 2400, ["California/color"] = 11000, ["Call_sign_disambiguation"] = 3000, ["Campaignbox"] = 22000, ["CanProvName"] = 13000, ["CanadaByProvinceCatNav"] = 9700, ["CanadaProvinceThe"] = 4000, ["Canadian_English"] = 6800, ["Canadian_Parliament_links"] = 5100, ["Canadian_election_result"] = 14000, ["Canadian_election_result/gain"] = 2600, ["Canadian_election_result/hold"] = 4900, ["Canadian_election_result/source"] = 8000, ["Canadian_election_result/top"] = 13000, ["Canadian_election_result/top/ElectionYearTest"] = 5700, ["Canadian_election_result/total"] = 10000, ["Canadian_party_colour"] = 8000, ["Canadian_party_colour/colour"] = 18000, ["Canadian_party_colour/colour/default"] = 17000, ["Canadian_party_colour/name"] = 15000, ["Canadian_party_colour/name/default"] = 6800, ["Canned_search"] = 5300, ["Cascite"] = 15000, ["Caselaw_source"] = 4000, ["Cassini-Ehess"] = 2600, ["Cast_listing"] = 15000, ["Castlist"] = 2300, ["Cat"] = 343000, ["CatAutoTOC"] = 653000, ["CatAutoTOC/core"] = 652000, ["CatRel"] = 3800, ["CatTrack"] = 3100, ["Cat_class"] = 6600, ["Cat_in_use"] = 50000, ["Cat_main"] = 198000, ["Cat_more"] = 100000, ["Cat_more_if_exists"] = 41000, ["Cat_see_also"] = 3500, ["Catalog_lookup_link"] = 513000, ["Category-Class"] = 14000, ["Category-inline"] = 8900, ["Category_TOC"] = 72000, ["Category_TOC/tracking"] = 72000, ["Category_U.S._State_elections_by_year"] = 7300, ["Category_U.S._State_elections_by_year/core"] = 7300, ["Category_class"] = 35000, ["Category_class/column"] = 35000, ["Category_class/second_row_column"] = 35000, ["Category_described_in_year"] = 5700, ["Category_diffuse"] = 8000, ["Category_disambiguation"] = 2400, ["Category_disambiguation/category_link"] = 2400, ["Category_explanation"] = 235000, ["Category_handler"] = 3280000, ["Category_ifexist"] = 5000, ["Category_importance"] = 10000, ["Category_importance/column"] = 10000, ["Category_importance/second_row_column"] = 10000, ["Category_link"] = 126000, ["Category_link_with_count"] = 6800, ["Category_more"] = 110000, ["Category_more_if_exists"] = 41000, ["Category_ordered_by_date"] = 11000, ["Category_other"] = 886000, ["Category_redirect"] = 105000, ["Category_see_also"] = 39000, ["Category_see_also/Category_pair_check"] = 39000, ["Category_see_also_if_exists"] = 72000, ["Category_see_also_if_exists_2"] = 88000, ["Category_title"] = 2400, ["Catexp"] = 7800, ["CathEncy"] = 2300, ["Catholic"] = 4100, ["Catholic_Encyclopedia"] = 5100, ["Catmain"] = 26000, ["Catmore"] = 9300, ["Cbb_link"] = 8500, ["Cbignore"] = 100000, ["Cbsb_link"] = 2100, ["Cc-by-2.5"] = 3900, ["Cc-by-3.0"] = 8800, ["Cc-by-sa-2.5"] = 2600, ["Cc-by-sa-2.5,2.0,1.0"] = 2700, ["Cc-by-sa-3.0"] = 26000, ["Cc-by-sa-3.0,2.5,2.0,1.0"] = 2300, ["Cc-by-sa-3.0-migrated"] = 25000, ["Cc-by-sa-4.0"] = 11000, ["Cc-zero"] = 3900, ["CensusAU"] = 9300, ["Census_2016_AUS"] = 7100, ["Cent"] = 5700, ["Center"] = 287000, ["Centralized_discussion"] = 6000, ["Centralized_discussion/core"] = 6000, ["Centralized_discussion/styles.css"] = 6000, ["Centre"] = 3100, ["Century"] = 2100, ["Century_name_from_decade"] = 2400, ["Century_name_from_decade_or_year"] = 77000, ["Century_name_from_title_decade"] = 7600, ["Century_name_from_title_year"] = 7500, ["Certification_Cite/Title"] = 30000, ["Certification_Cite/URL"] = 33000, ["Certification_Cite/archivedate"] = 6000, ["Certification_Cite/archiveurl"] = 6000, ["Certification_Cite_Ref"] = 29000, ["Certification_Table_Bottom"] = 28000, ["Certification_Table_Entry"] = 30000, ["Certification_Table_Entry/Foot"] = 28000, ["Certification_Table_Entry/Foot/helper"] = 28000, ["Certification_Table_Entry/Region"] = 29000, ["Certification_Table_Entry/Sales"] = 28000, ["Certification_Table_Entry/Sales/BelgianPeriod"] = 2100, ["Certification_Table_Entry/Sales/DanishPeriod"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper1"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper2"] = 3200, ["Certification_Table_Entry/Sales/GermanPeriod"] = 3900, ["Certification_Table_Entry/Sales/ItalianHelper"] = 3200, ["Certification_Table_Entry/Sales/NewZealandPeriod"] = 2000, ["Certification_Table_Entry/Sales/SwedishPeriod"] = 2100, ["Certification_Table_Separator"] = 2300, ["Certification_Table_Top"] = 30000, ["Cfb_link"] = 24000, ["Cfd_all"] = 2700, ["Cfd_result"] = 2400, ["Cfdend"] = 4000, ["Chart"] = 4600, ["Chart/end"] = 4700, ["Chart/start"] = 4600, ["Chart_bottom"] = 3400, ["Chart_top"] = 3400, ["Check_completeness_of_transclusions"] = 7300, ["Check_talk"] = 30000, ["Check_talk_wp"] = 1370000, ["Check_winner_by_scores"] = 13000, ["CheckedSockpuppet"] = 7200, ["Checked_sockpuppet"] = 18000, ["Checkedsockpuppet"] = 5300, ["Checkip"] = 13000, ["Checkuser"] = 75000, ["Checkuserblock-account"] = 16000, ["Chem"] = 5800, ["Chem/atom"] = 5800, ["Chem/link"] = 5800, ["Chem2"] = 4600, ["Chem_molar_mass"] = 18000, ["Chem_molar_mass/format"] = 18000, ["Chembox"] = 14000, ["Chembox/styles.css"] = 14000, ["Chembox_3DMet"] = 14000, ["Chembox_3DMet/format"] = 14000, ["Chembox_AllOtherNames"] = 13000, ["Chembox_AllOtherNames/format"] = 13000, ["Chembox_Appearance"] = 6000, ["Chembox_BoilingPt"] = 3800, ["Chembox_CASNo"] = 14000, ["Chembox_CASNo/format"] = 14000, ["Chembox_CalcTemperatures"] = 6700, ["Chembox_ChEBI"] = 14000, ["Chembox_ChEBI/format"] = 14000, ["Chembox_ChEMBL"] = 14000, ["Chembox_ChEMBL/format"] = 14000, ["Chembox_ChemSpiderID"] = 14000, ["Chembox_ChemSpiderID/format"] = 14000, ["Chembox_CompTox"] = 14000, ["Chembox_CompTox/format"] = 14000, ["Chembox_Datapage_check"] = 14000, ["Chembox_Density"] = 4800, ["Chembox_DrugBank"] = 14000, ["Chembox_DrugBank/format"] = 14000, ["Chembox_ECHA"] = 7500, ["Chembox_ECNumber"] = 14000, ["Chembox_ECNumber/format"] = 14000, ["Chembox_Elements"] = 13000, ["Chembox_Elements/molecular_formula"] = 18000, ["Chembox_Footer"] = 14000, ["Chembox_Footer/tracking"] = 14000, ["Chembox_GHS_(set)"] = 3400, ["Chembox_Hazards"] = 11000, ["Chembox_IUPHAR_ligand"] = 14000, ["Chembox_IUPHAR_ligand/format"] = 14000, ["Chembox_Identifiers"] = 14000, ["Chembox_InChI"] = 12000, ["Chembox_InChI/format"] = 12000, ["Chembox_Indexlist"] = 14000, ["Chembox_Jmol"] = 14000, ["Chembox_Jmol/format"] = 14000, ["Chembox_KEGG"] = 14000, ["Chembox_KEGG/format"] = 14000, ["Chembox_MeltingPt"] = 5800, ["Chembox_Properties"] = 14000, ["Chembox_PubChem"] = 14000, ["Chembox_PubChem/format"] = 14000, ["Chembox_RTECS"] = 14000, ["Chembox_RTECS/format"] = 14000, ["Chembox_Related"] = 3300, ["Chembox_SMILES"] = 13000, ["Chembox_SMILES/format"] = 13000, ["Chembox_SolubilityInWater"] = 3900, ["Chembox_Structure"] = 2100, ["Chembox_UNII"] = 14000, ["Chembox_UNII/format"] = 14000, ["Chembox_headerbar"] = 14000, ["Chembox_image"] = 13000, ["Chembox_image_cell"] = 12000, ["Chembox_image_sbs"] = 13000, ["Chembox_parametercheck"] = 13000, ["Chembox_setDatarow"] = 4400, ["Chembox_setHeader"] = 4400, ["Chembox_templatePar/formatPreviewMessage"] = 14000, ["Chembox_verification"] = 7100, ["Chemicals"] = 7400, ["Chemistry"] = 3100, ["Chemspidercite"] = 11000, ["Chessgames_player"] = 3600, ["Chinese"] = 7300, ["Chr"] = 9100, ["ChristianityWikiProject"] = 5800, ["Circa"] = 67000, ["Circular_reference"] = 4200, ["Citation"] = 399000, ["Citation/make_link"] = 6000, ["Citation/styles.css"] = 46000, ["Citation_needed"] = 539000, ["Citation_needed_span"] = 3500, ["Citation_style"] = 4200, ["Cite_AV_media"] = 42000, ["Cite_AV_media_notes"] = 26000, ["Cite_Appletons'"] = 2400, ["Cite_Australian_Dictionary_of_Biography"] = 3300, ["Cite_Catholic_Encyclopedia"] = 8100, ["Cite_Colledge2006"] = 3100, ["Cite_DCB"] = 2800, ["Cite_DNB"] = 18000, ["Cite_EB1911"] = 25000, ["Cite_GNIS"] = 2300, ["Cite_Gaia_DR2"] = 2100, ["Cite_Jewish_Encyclopedia"] = 2900, ["Cite_NIE"] = 3600, ["Cite_NSW_Parliament"] = 3300, ["Cite_NSW_SHR"] = 2600, ["Cite_ODNB"] = 17000, ["Cite_Q"] = 43000, ["Cite_QHR"] = 3000, ["Cite_QPN"] = 4000, ["Cite_Rowlett"] = 2500, ["Cite_Russian_law"] = 7800, ["Cite_Ryan"] = 3200, ["Cite_Sports-Reference"] = 54000, ["Cite_USGov"] = 24000, ["Cite_WoRMS"] = 5400, ["Cite_act"] = 2600, ["Cite_arXiv"] = 4900, ["Cite_bcgnis"] = 3100, ["Cite_book"] = 1580000, ["Cite_certification"] = 33000, ["Cite_cgndb"] = 3200, ["Cite_conference"] = 15000, ["Cite_court"] = 5300, ["Cite_court/styles.css"] = 5300, ["Cite_dictionary"] = 3700, ["Cite_document"] = 6800, ["Cite_encyclopedia"] = 200000, ["Cite_episode"] = 17000, ["Cite_gnis"] = 34000, ["Cite_interview"] = 7600, ["Cite_iucn"] = 57000, ["Cite_journal"] = 949000, ["Cite_magazine"] = 259000, ["Cite_manual"] = 2000, ["Cite_map"] = 37000, ["Cite_news"] = 1490000, ["Cite_newspaper_The_Times"] = 6500, ["Cite_patent"] = 5400, ["Cite_patent/authors"] = 4400, ["Cite_patent/core"] = 5700, ["Cite_peakbagger"] = 4500, ["Cite_podcast"] = 3700, ["Cite_press_release"] = 63000, ["Cite_report"] = 35000, ["Cite_rowlett"] = 2500, ["Cite_simbad"] = 4400, ["Cite_sports-reference"] = 59000, ["Cite_thesis"] = 31000, ["Cite_tweet"] = 35000, ["Cite_video"] = 12000, ["Cite_video_game"] = 3100, ["Cite_web"] = 4530000, ["Cite_wikisource"] = 5500, ["Cite_wikisource/make_link"] = 58000, ["Civil_navigation"] = 2700, ["Cl"] = 123000, ["Clade"] = 7500, ["Clade/styles.css"] = 7500, ["Clarify"] = 40000, ["Class"] = 8850000, ["Class/colour"] = 548000, ["Class/icon"] = 28000, ["Class_mask"] = 8540000, ["Class_mask/b"] = 347000, ["Classical"] = 6900, ["Classicon"] = 4700, ["Clc"] = 5800, ["Cleanup"] = 10000, ["Cleanup_bare_URLs"] = 30000, ["Cleanup_reorganize"] = 2500, ["Cleanup_rewrite"] = 5800, ["Clear"] = 2930000, ["Clear-left"] = 16000, ["Clear_left"] = 30000, ["Clear_right"] = 2900, ["Clerk-Note"] = 9800, ["Clerknote"] = 7400, ["Clickable_button"] = 16000, ["Clickable_button_2"] = 956000, ["Closed_access"] = 4400, ["Closed_rfc_top"] = 2200, ["Clr"] = 3700, ["Clubplayerscat"] = 8300, ["Cmbox"] = 414000, ["Cn"] = 91000, ["Cnote2"] = 2200, ["Cnote2_Begin"] = 2300, ["Cnote2_End"] = 2300, ["Coat_of_arms"] = 5300, ["Cob"] = 12000, ["Code"] = 49000, ["Col-1-of-2"] = 2400, ["Col-2"] = 170000, ["Col-2-of-2"] = 2300, ["Col-3"] = 9800, ["Col-4"] = 3500, ["Col-begin"] = 212000, ["Col-break"] = 210000, ["Col-end"] = 210000, ["Col-float"] = 2700, ["Col-float-break"] = 2600, ["Col-float-end"] = 2600, ["Col-float/styles.css"] = 2700, ["Col-start"] = 20000, ["Colbegin"] = 21000, ["Colend"] = 24000, ["Collapse"] = 9600, ["Collapse_bottom"] = 51000, ["Collapse_top"] = 51000, ["Collapsebottom"] = 3800, ["Collapsetop"] = 3800, ["Collapsible_list"] = 53000, ["Collapsible_option"] = 134000, ["College"] = 8700, ["CollegePrimaryHeader"] = 5700, ["CollegePrimaryStyle"] = 95000, ["CollegeSecondaryStyle"] = 3400, ["College_Athlete_Recruit_End"] = 2800, ["College_Athlete_Recruit_Entry"] = 3000, ["College_Athlete_Recruit_Start"] = 2900, ["College_athlete_recruit_end"] = 4000, ["College_athlete_recruit_entry"] = 4100, ["College_athlete_recruit_start"] = 4100, ["College_color_list"] = 3900, ["Colon"] = 17000, ["Color"] = 464000, ["Color_box"] = 73000, ["Colorbox"] = 3600, ["Colorbull"] = 4900, ["Colored_link"] = 62000, ["Colors"] = 3500, ["Colour"] = 5800, ["Coloured_link"] = 6900, ["Column"] = 2400, ["Column/styles.css"] = 2500, ["Columns-end"] = 2200, ["Columns-list"] = 99000, ["Columns-start"] = 2200, ["Comedy"] = 2500, ["Comic_Book_DB"] = 3500, ["Comicbookdb"] = 3500, ["Comics-replaceability"] = 2900, ["Comics_infobox_sec/creator_nat"] = 2800, ["Comics_infobox_sec/formcat"] = 3200, ["Comics_infobox_sec/genre"] = 3900, ["Comics_infobox_sec/genrecat"] = 3600, ["Comics_infobox_sec/styles.css"] = 8100, ["Comicsproj"] = 28000, ["Comma_separated_entries"] = 425000, ["Comma_separated_values"] = 44000, ["Comment"] = 5200, ["Committed_identity"] = 3000, ["Committed_identity/styles.css"] = 3000, ["Commons"] = 66000, ["Commons-inline"] = 19000, ["Commons_cat"] = 48000, ["Commons_category"] = 842000, ["Commons_category-inline"] = 145000, ["Commons_category_inline"] = 6000, ["Commonscat"] = 66000, ["Commonscat-inline"] = 18000, ["Commonscat_inline"] = 2400, ["Commonscatinline"] = 6500, ["Compact_TOC"] = 6900, ["Compact_ToC"] = 4900, ["Compare"] = 5000, ["Compare_image_with_Wikidata"] = 10000, ["Composition_bar"] = 10000, ["Confirmed"] = 16000, ["Confused"] = 2700, ["Confusing"] = 2300, ["CongBio"] = 9700, ["CongLinks"] = 4500, ["Connected_contributor"] = 17000, ["Connected_contributor_(paid)"] = 6800, ["Constellation_navbox"] = 6700, ["Container"] = 11000, ["Container_cat"] = 7500, ["Container_category"] = 42000, ["Containercat"] = 2600, ["Contains_special_characters"] = 4000, ["Contains_special_characters/core"] = 4000, ["Contains_special_characters/styles.css"] = 4000, ["Content_category"] = 7600, ["Contentious_topics/list"] = 13000, ["Contentious_topics/page_restriction_editnotice_base"] = 2400, ["Contentious_topics/page_restriction_talk_notice_base"] = 3600, ["Contentious_topics/talk_notice"] = 6500, ["Context"] = 2700, ["Continent2continental"] = 16000, ["Continent_adjective_to_noun"] = 2200, ["Controversial"] = 3200, ["Convert"] = 1160000, ["Convinfobox"] = 203000, ["Convinfobox/2"] = 16000, ["Convinfobox/3"] = 118000, ["Convinfobox/pri2"] = 62000, ["Convinfobox/prisec2"] = 3000, ["Convinfobox/prisec3"] = 25000, ["Convinfobox/sec2"] = 9200, ["Coord"] = 1320000, ["Coord_missing"] = 96000, ["Coord_missing/CheckCat"] = 95000, ["Coords"] = 8000, ["Copied"] = 18000, ["Copy_edit"] = 2500, ["Copy_to_Wikimedia_Commons"] = 112000, ["Copyvios"] = 5000, ["Cospar"] = 2500, ["Cot"] = 12000, ["Count"] = 655000, ["Country2continent"] = 36000, ["Country2continental"] = 2400, ["Country2nationality"] = 339000, ["CountryPrefixThe"] = 109000, ["Country_abbreviation"] = 88000, ["Country_alias"] = 15000, ["Country_at_games_navbox"] = 2600, ["Country_at_games_navbox/below"] = 2600, ["Country_data"] = 6700, ["Country_data_AFG"] = 2200, ["Country_data_ALB"] = 6500, ["Country_data_ALG"] = 9200, ["Country_data_AND"] = 2900, ["Country_data_ANG"] = 3800, ["Country_data_ARG"] = 47000, ["Country_data_ARM"] = 7200, ["Country_data_AUS"] = 75000, ["Country_data_AUT"] = 45000, ["Country_data_AZE"] = 9000, ["Country_data_Afghanistan"] = 12000, ["Country_data_Alaska"] = 2100, ["Country_data_Albania"] = 20000, ["Country_data_Alberta"] = 3600, ["Country_data_Algeria"] = 24000, ["Country_data_American_Samoa"] = 2900, ["Country_data_Andorra"] = 7800, ["Country_data_Angola"] = 11000, ["Country_data_Anguilla"] = 2500, ["Country_data_Antigua_and_Barbuda"] = 6000, ["Country_data_Apulia"] = 7900, ["Country_data_Argentina"] = 80000, ["Country_data_Arizona"] = 2300, ["Country_data_Arkansas"] = 2000, ["Country_data_Armenia"] = 22000, ["Country_data_Aruba"] = 3600, ["Country_data_Australia"] = 125000, ["Country_data_Austria"] = 78000, ["Country_data_Azerbaijan"] = 27000, ["Country_data_BAH"] = 3800, ["Country_data_BAN"] = 3800, ["Country_data_BAR"] = 2400, ["Country_data_BEL"] = 50000, ["Country_data_BER"] = 2300, ["Country_data_BHR"] = 4500, ["Country_data_BIH"] = 13000, ["Country_data_BLR"] = 24000, ["Country_data_BOL"] = 5700, ["Country_data_BOT"] = 2200, ["Country_data_BRA"] = 57000, ["Country_data_BUL"] = 26000, ["Country_data_Bahamas"] = 9600, ["Country_data_Bahrain"] = 12000, ["Country_data_Bangladesh"] = 18000, ["Country_data_Barbados"] = 8000, ["Country_data_Belarus"] = 43000, ["Country_data_Belgium"] = 88000, ["Country_data_Belize"] = 5200, ["Country_data_Benin"] = 7300, ["Country_data_Bermuda"] = 5700, ["Country_data_Bhutan"] = 4600, ["Country_data_Bolivia"] = 14000, ["Country_data_Bosnia_and_Herzegovina"] = 29000, ["Country_data_Botswana"] = 9100, ["Country_data_Brazil"] = 101000, ["Country_data_British_Columbia"] = 3400, ["Country_data_British_Raj"] = 2200, ["Country_data_British_Virgin_Islands"] = 3200, ["Country_data_Brunei"] = 6200, ["Country_data_Bulgaria"] = 52000, ["Country_data_Burkina_Faso"] = 10000, ["Country_data_Burma"] = 2700, ["Country_data_Burundi"] = 6000, ["Country_data_CAM"] = 2100, ["Country_data_CAN"] = 58000, ["Country_data_CGO"] = 2400, ["Country_data_CHE"] = 4700, ["Country_data_CHI"] = 17000, ["Country_data_CHL"] = 2100, ["Country_data_CHN"] = 41000, ["Country_data_CIV"] = 8000, ["Country_data_CMR"] = 8600, ["Country_data_COD"] = 3200, ["Country_data_COL"] = 24000, ["Country_data_CPV"] = 2000, ["Country_data_CRC"] = 6500, ["Country_data_CRO"] = 33000, ["Country_data_CUB"] = 9800, ["Country_data_CYP"] = 9000, ["Country_data_CZE"] = 46000, ["Country_data_California"] = 5800, ["Country_data_Cambodia"] = 8700, ["Country_data_Cameroon"] = 18000, ["Country_data_Canada"] = 121000, ["Country_data_Cape_Verde"] = 6300, ["Country_data_Castile_and_León"] = 2000, ["Country_data_Catalonia"] = 3100, ["Country_data_Cayman_Islands"] = 4100, ["Country_data_Central_African_Republic"] = 5000, ["Country_data_Chad"] = 5500, ["Country_data_Chile"] = 40000, ["Country_data_China"] = 83000, ["Country_data_Chinese_Taipei"] = 19000, ["Country_data_Colombia"] = 46000, ["Country_data_Colorado"] = 5600, ["Country_data_Comoros"] = 4400, ["Country_data_Confederate_States_of_America"] = 3100, ["Country_data_Connecticut"] = 3200, ["Country_data_Cook_Islands"] = 3800, ["Country_data_Costa_Rica"] = 18000, ["Country_data_Croatia"] = 56000, ["Country_data_Cuba"] = 22000, ["Country_data_Curaçao"] = 3500, ["Country_data_Cyprus"] = 22000, ["Country_data_Czech_Republic"] = 81000, ["Country_data_Czechoslovakia"] = 19000, ["Country_data_DEN"] = 34000, ["Country_data_DEU"] = 8600, ["Country_data_DNK"] = 3600, ["Country_data_DOM"] = 7100, ["Country_data_Democratic_Republic_of_the_Congo"] = 13000, ["Country_data_Denmark"] = 68000, ["Country_data_Djibouti"] = 4500, ["Country_data_Dominica"] = 4200, ["Country_data_Dominican_Republic"] = 17000, ["Country_data_ECU"] = 12000, ["Country_data_EGY"] = 13000, ["Country_data_ENG"] = 46000, ["Country_data_ESA"] = 2200, ["Country_data_ESP"] = 72000, ["Country_data_EST"] = 14000, ["Country_data_ETH"] = 3300, ["Country_data_EU"] = 3700, ["Country_data_East_Germany"] = 14000, ["Country_data_East_Timor"] = 4900, ["Country_data_Ecuador"] = 25000, ["Country_data_Egypt"] = 31000, ["Country_data_El_Salvador"] = 13000, ["Country_data_Empire_of_Japan"] = 4000, ["Country_data_England"] = 96000, ["Country_data_Equatorial_Guinea"] = 5100, ["Country_data_Eritrea"] = 5400, ["Country_data_Estonia"] = 34000, ["Country_data_Eswatini"] = 5000, ["Country_data_Ethiopia"] = 13000, ["Country_data_Europe"] = 2400, ["Country_data_European_Union"] = 7300, ["Country_data_FIJ"] = 3800, ["Country_data_FIN"] = 34000, ["Country_data_FRA"] = 97000, ["Country_data_FRG"] = 15000, ["Country_data_FR_Yugoslavia"] = 4000, ["Country_data_Faroe_Islands"] = 5400, ["Country_data_Federated_States_of_Micronesia"] = 3000, ["Country_data_Fiji"] = 12000, ["Country_data_Finland"] = 68000, ["Country_data_Florida"] = 6500, ["Country_data_France"] = 191000, ["Country_data_French_Guiana"] = 2100, ["Country_data_French_Polynesia"] = 3800, ["Country_data_GAB"] = 2400, ["Country_data_GAM"] = 2000, ["Country_data_GBR"] = 54000, ["Country_data_GDR"] = 8100, ["Country_data_GEO"] = 14000, ["Country_data_GER"] = 81000, ["Country_data_GHA"] = 9700, ["Country_data_GRE"] = 25000, ["Country_data_GUA"] = 4900, ["Country_data_GUI"] = 3100, ["Country_data_GUY"] = 2300, ["Country_data_Gabon"] = 7500, ["Country_data_Gambia"] = 6700, ["Country_data_Georgia"] = 8100, ["Country_data_Georgia_(U.S._state)"] = 2800, ["Country_data_Georgia_(country)"] = 29000, ["Country_data_German_Empire"] = 5400, ["Country_data_Germany"] = 149000, ["Country_data_Ghana"] = 23000, ["Country_data_Gibraltar"] = 4900, ["Country_data_Great_Britain"] = 73000, ["Country_data_Greece"] = 57000, ["Country_data_Greenland"] = 2800, ["Country_data_Grenada"] = 5100, ["Country_data_Guadeloupe"] = 2800, ["Country_data_Guam"] = 4700, ["Country_data_Guatemala"] = 13000, ["Country_data_Guernsey"] = 2100, ["Country_data_Guinea"] = 8300, ["Country_data_Guinea-Bissau"] = 5000, ["Country_data_Guyana"] = 7400, ["Country_data_HAI"] = 3100, ["Country_data_HKG"] = 13000, ["Country_data_HON"] = 4300, ["Country_data_HUN"] = 37000, ["Country_data_Haiti"] = 8600, ["Country_data_Honduras"] = 12000, ["Country_data_Hong_Kong"] = 26000, ["Country_data_Hungary"] = 70000, ["Country_data_IDN"] = 4900, ["Country_data_INA"] = 10000, ["Country_data_IND"] = 30000, ["Country_data_IRE"] = 10000, ["Country_data_IRI"] = 5400, ["Country_data_IRL"] = 21000, ["Country_data_IRN"] = 6200, ["Country_data_IRQ"] = 4100, ["Country_data_ISL"] = 8500, ["Country_data_ISR"] = 21000, ["Country_data_ITA"] = 85000, ["Country_data_Iceland"] = 23000, ["Country_data_Idaho"] = 2100, ["Country_data_Illinois"] = 4500, ["Country_data_India"] = 108000, ["Country_data_Indiana"] = 2800, ["Country_data_Indonesia"] = 36000, ["Country_data_Iowa"] = 3000, ["Country_data_Iran"] = 91000, ["Country_data_Iraq"] = 14000, ["Country_data_Ireland"] = 34000, ["Country_data_Isle_of_Man"] = 2800, ["Country_data_Israel"] = 45000, ["Country_data_Italy"] = 143000, ["Country_data_Ivory_Coast"] = 18000, ["Country_data_JAM"] = 9300, ["Country_data_JOR"] = 4000, ["Country_data_JP"] = 8100, ["Country_data_JPN"] = 58000, ["Country_data_Jamaica"] = 21000, ["Country_data_Japan"] = 117000, ["Country_data_Jersey"] = 2500, ["Country_data_Jordan"] = 12000, ["Country_data_KAZ"] = 19000, ["Country_data_KEN"] = 7100, ["Country_data_KGZ"] = 3700, ["Country_data_KOR"] = 31000, ["Country_data_KOS"] = 2300, ["Country_data_KSA"] = 5800, ["Country_data_KUW"] = 4000, ["Country_data_Kazakhstan"] = 33000, ["Country_data_Kenya"] = 19000, ["Country_data_Kingdom_of_France"] = 2100, ["Country_data_Kingdom_of_Great_Britain"] = 4800, ["Country_data_Kingdom_of_Italy"] = 4200, ["Country_data_Kiribati"] = 2900, ["Country_data_Kosovo"] = 8700, ["Country_data_Kuwait"] = 11000, ["Country_data_Kyrgyzstan"] = 9200, ["Country_data_LAT"] = 14000, ["Country_data_LBN"] = 2300, ["Country_data_LIB"] = 2500, ["Country_data_LIE"] = 3100, ["Country_data_LIT"] = 3000, ["Country_data_LTU"] = 12000, ["Country_data_LUX"] = 10000, ["Country_data_LVA"] = 2500, ["Country_data_Laos"] = 7400, ["Country_data_Latvia"] = 32000, ["Country_data_Lebanon"] = 15000, ["Country_data_Lesotho"] = 5200, ["Country_data_Liberia"] = 7200, ["Country_data_Libya"] = 8600, ["Country_data_Liechtenstein"] = 7800, ["Country_data_Lithuania"] = 31000, ["Country_data_Luxembourg"] = 24000, ["Country_data_MAC"] = 2400, ["Country_data_MAR"] = 12000, ["Country_data_MAS"] = 11000, ["Country_data_MDA"] = 7600, ["Country_data_MEX"] = 30000, ["Country_data_MGL"] = 2900, ["Country_data_MKD"] = 7500, ["Country_data_MLI"] = 4300, ["Country_data_MLT"] = 5500, ["Country_data_MNE"] = 7700, ["Country_data_MON"] = 3700, ["Country_data_MOZ"] = 2100, ["Country_data_MRI"] = 2000, ["Country_data_MYA"] = 3000, ["Country_data_MYS"] = 3700, ["Country_data_Macau"] = 6300, ["Country_data_Macedonia"] = 4900, ["Country_data_Madagascar"] = 9000, ["Country_data_Malawi"] = 5600, ["Country_data_Malaysia"] = 36000, ["Country_data_Maldives"] = 6000, ["Country_data_Mali"] = 12000, ["Country_data_Malta"] = 17000, ["Country_data_Manitoba"] = 2500, ["Country_data_Marshall_Islands"] = 3700, ["Country_data_Martinique"] = 2800, ["Country_data_Maryland"] = 3100, ["Country_data_Massachusetts"] = 3000, ["Country_data_Mauritania"] = 5800, ["Country_data_Mauritius"] = 7900, ["Country_data_Mexico"] = 66000, ["Country_data_Michigan"] = 4300, ["Country_data_Minnesota"] = 3700, ["Country_data_Missouri"] = 2100, ["Country_data_Moldova"] = 19000, ["Country_data_Monaco"] = 10000, ["Country_data_Mongolia"] = 9600, ["Country_data_Montana"] = 2100, ["Country_data_Montenegro"] = 18000, ["Country_data_Montserrat"] = 2500, ["Country_data_Morocco"] = 27000, ["Country_data_Mozambique"] = 7300, ["Country_data_Myanmar"] = 13000, ["Country_data_NAM"] = 3400, ["Country_data_NED"] = 60000, ["Country_data_NEP"] = 2800, ["Country_data_NGA"] = 8100, ["Country_data_NGR"] = 7900, ["Country_data_NIR"] = 9900, ["Country_data_NLD"] = 6100, ["Country_data_NOR"] = 29000, ["Country_data_NZ"] = 3100, ["Country_data_NZL"] = 32000, ["Country_data_Namibia"] = 9700, ["Country_data_Nauru"] = 2500, ["Country_data_Nazi_Germany"] = 9700, ["Country_data_Nepal"] = 17000, ["Country_data_Netherlands"] = 112000, ["Country_data_Netherlands_Antilles"] = 2300, ["Country_data_New_Brunswick"] = 2500, ["Country_data_New_Caledonia"] = 3400, ["Country_data_New_Jersey"] = 4200, ["Country_data_New_South_Wales"] = 5800, ["Country_data_New_York"] = 4800, ["Country_data_New_York_(state)"] = 6800, ["Country_data_New_Zealand"] = 66000, ["Country_data_Newfoundland_and_Labrador"] = 2300, ["Country_data_Nicaragua"] = 8200, ["Country_data_Niger"] = 5900, ["Country_data_Nigeria"] = 32000, ["Country_data_North_Carolina"] = 3500, ["Country_data_North_Korea"] = 13000, ["Country_data_North_Macedonia"] = 17000, ["Country_data_Northern_Ireland"] = 15000, ["Country_data_Northern_Mariana_Islands"] = 2900, ["Country_data_Norway"] = 72000, ["Country_data_Nova_Scotia"] = 2300, ["Country_data_OMA"] = 2700, ["Country_data_Ohio"] = 4800, ["Country_data_Oman"] = 8600, ["Country_data_Ontario"] = 3800, ["Country_data_Ottoman_Empire"] = 2600, ["Country_data_PAK"] = 8000, ["Country_data_PAN"] = 5600, ["Country_data_PAR"] = 9900, ["Country_data_PER"] = 12000, ["Country_data_PHI"] = 11000, ["Country_data_PHL"] = 2500, ["Country_data_PNG"] = 2700, ["Country_data_POL"] = 49000, ["Country_data_POR"] = 31000, ["Country_data_PRC"] = 2100, ["Country_data_PRK"] = 4600, ["Country_data_PRT"] = 2800, ["Country_data_PUR"] = 7200, ["Country_data_Pakistan"] = 28000, ["Country_data_Palau"] = 3000, ["Country_data_Palestine"] = 6600, ["Country_data_Panama"] = 16000, ["Country_data_Papua_New_Guinea"] = 7900, ["Country_data_Paraguay"] = 20000, ["Country_data_Pennsylvania"] = 3700, ["Country_data_People's_Republic_of_China"] = 3300, ["Country_data_Peru"] = 30000, ["Country_data_Philippines"] = 34000, ["Country_data_Poland"] = 149000, ["Country_data_Portugal"] = 68000, ["Country_data_Prussia"] = 2600, ["Country_data_Puerto_Rico"] = 17000, ["Country_data_QAT"] = 7600, ["Country_data_Qatar"] = 17000, ["Country_data_Quebec"] = 4200, ["Country_data_ROM"] = 13000, ["Country_data_ROU"] = 26000, ["Country_data_RSA"] = 31000, ["Country_data_RUS"] = 62000, ["Country_data_Republic_of_China"] = 5600, ["Country_data_Republic_of_Ireland"] = 25000, ["Country_data_Republic_of_the_Congo"] = 7600, ["Country_data_Romania"] = 68000, ["Country_data_Russia"] = 114000, ["Country_data_Russian_Empire"] = 4900, ["Country_data_Rwanda"] = 7600, ["Country_data_SAM"] = 3100, ["Country_data_SCG"] = 3100, ["Country_data_SCO"] = 26000, ["Country_data_SEN"] = 7900, ["Country_data_SER"] = 3600, ["Country_data_SGP"] = 2600, ["Country_data_SIN"] = 6900, ["Country_data_SLO"] = 19000, ["Country_data_SLV"] = 3000, ["Country_data_SMR"] = 3100, ["Country_data_SPA"] = 4600, ["Country_data_SRB"] = 26000, ["Country_data_SRI"] = 4600, ["Country_data_SUI"] = 42000, ["Country_data_SUR"] = 2000, ["Country_data_SVK"] = 28000, ["Country_data_SVN"] = 6600, ["Country_data_SWE"] = 56000, ["Country_data_SWI"] = 4700, ["Country_data_SYR"] = 3500, ["Country_data_Saint_Kitts_and_Nevis"] = 4700, ["Country_data_Saint_Lucia"] = 4900, ["Country_data_Saint_Vincent_and_the_Grenadines"] = 4800, ["Country_data_Samoa"] = 7700, ["Country_data_San_Marino"] = 8400, ["Country_data_Saskatchewan"] = 2900, ["Country_data_Saudi_Arabia"] = 19000, ["Country_data_Scotland"] = 51000, ["Country_data_Senegal"] = 17000, ["Country_data_Serbia"] = 54000, ["Country_data_Serbia_and_Montenegro"] = 5100, ["Country_data_Seychelles"] = 5400, ["Country_data_Sierra_Leone"] = 7200, ["Country_data_Singapore"] = 27000, ["Country_data_Slovakia"] = 50000, ["Country_data_Slovenia"] = 42000, ["Country_data_Solomon_Islands"] = 4700, ["Country_data_Somalia"] = 6100, ["Country_data_South_Africa"] = 69000, ["Country_data_South_Carolina"] = 3300, ["Country_data_South_Korea"] = 66000, ["Country_data_South_Sudan"] = 4000, ["Country_data_Soviet_Union"] = 36000, ["Country_data_Spain"] = 132000, ["Country_data_Sri_Lanka"] = 19000, ["Country_data_Sudan"] = 8000, ["Country_data_Suriname"] = 6400, ["Country_data_Sweden"] = 100000, ["Country_data_Switzerland"] = 82000, ["Country_data_Syria"] = 15000, ["Country_data_São_Tomé_and_Príncipe"] = 3400, ["Country_data_TAN"] = 2400, ["Country_data_TCH"] = 11000, ["Country_data_THA"] = 21000, ["Country_data_TJK"] = 2600, ["Country_data_TKM"] = 2700, ["Country_data_TPE"] = 15000, ["Country_data_TRI"] = 4700, ["Country_data_TUN"] = 10000, ["Country_data_TUR"] = 27000, ["Country_data_Taiwan"] = 13000, ["Country_data_Tajikistan"] = 8900, ["Country_data_Tanzania"] = 12000, ["Country_data_Texas"] = 5300, ["Country_data_Thailand"] = 44000, ["Country_data_Togo"] = 6900, ["Country_data_Tonga"] = 6400, ["Country_data_Trinidad_and_Tobago"] = 14000, ["Country_data_Tunisia"] = 22000, ["Country_data_Turkey"] = 76000, ["Country_data_Turkmenistan"] = 7800, ["Country_data_Turks_and_Caicos_Islands"] = 2600, ["Country_data_Tuvalu"] = 2800, ["Country_data_U.S."] = 2100, ["Country_data_U.S._Virgin_Islands"] = 4800, ["Country_data_UAE"] = 9200, ["Country_data_UGA"] = 4000, ["Country_data_UK"] = 18000, ["Country_data_UKGBI"] = 3100, ["Country_data_UKR"] = 36000, ["Country_data_URS"] = 14000, ["Country_data_URU"] = 15000, ["Country_data_US"] = 4900, ["Country_data_USA"] = 132000, ["Country_data_USSR"] = 4500, ["Country_data_UZB"] = 11000, ["Country_data_Uganda"] = 13000, ["Country_data_Ukraine"] = 72000, ["Country_data_United_Arab_Emirates"] = 20000, ["Country_data_United_Kingdom"] = 89000, ["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 4400, ["Country_data_United_Nations"] = 4000, ["Country_data_United_States"] = 281000, ["Country_data_United_States_of_America"] = 5000, ["Country_data_Uruguay"] = 29000, ["Country_data_Uzbekistan"] = 20000, ["Country_data_VEN"] = 16000, ["Country_data_VIE"] = 6200, ["Country_data_Vanuatu"] = 5000, ["Country_data_Vatican_City"] = 2300, ["Country_data_Venezuela"] = 33000, ["Country_data_Vietnam"] = 23000, ["Country_data_Virginia"] = 2900, ["Country_data_WAL"] = 17000, ["Country_data_Wales"] = 34000, ["Country_data_Washington"] = 3400, ["Country_data_Washington,_D.C."] = 2200, ["Country_data_Washington_(state)"] = 3700, ["Country_data_West_Germany"] = 24000, ["Country_data_West_Indies"] = 2600, ["Country_data_Wisconsin"] = 5300, ["Country_data_YUG"] = 9700, ["Country_data_Yemen"] = 7700, ["Country_data_Yugoslavia"] = 18000, ["Country_data_ZAF"] = 4700, ["Country_data_ZAM"] = 3200, ["Country_data_ZIM"] = 8200, ["Country_data_Zambia"] = 9500, ["Country_data_Zimbabwe"] = 17000, ["Country_flagbio"] = 27000, ["Country_name"] = 23000, ["Country_showdata"] = 6100, ["Country_topics"] = 22000, ["County"] = 6500, ["County_(judet)_of_Romania"] = 3300, ["Course_assignment"] = 4200, ["Course_details"] = 6100, ["Course_instructor"] = 2400, ["Cquote"] = 37000, ["Cr"] = 4300, ["Cr-rt"] = 2100, ["Create_taxonomy/link"] = 106000, ["Cref2"] = 2300, ["Cricinfo"] = 24000, ["Cricketarchive"] = 2900, ["Crime_opentask"] = 48000, ["Croatian_Census_2011"] = 2100, ["Cross"] = 3200, ["Crossreference"] = 2500, ["Crossreference/styles.css"] = 2500, ["Csv"] = 3000, ["Ct"] = 12000, ["Curlie"] = 6800, ["Currency"] = 3500, ["Current_events"] = 8200, ["Current_events/styles.css"] = 8200, ["Currentdate"] = 22000, ["Cvt"] = 102000, ["Cycling_Archives"] = 4300, ["Cycling_archives"] = 2600, ["Cycling_data_LTS"] = 2100, ["Cycling_team_link"] = 12000, ["Module:CFB_schedule"] = 26000, ["Module:CallAssert"] = 241000, ["Module:CanElecResTopTest"] = 5700, ["Module:CanadaByProvinceCatNav"] = 9700, ["Module:Cat_main"] = 198000, ["Module:Catalog_lookup_link"] = 513000, ["Module:Category_described_in_year"] = 5700, ["Module:Category_described_in_year/conf"] = 5700, ["Module:Category_handler"] = 4410000, ["Module:Category_handler/blacklist"] = 4410000, ["Module:Category_handler/config"] = 4410000, ["Module:Category_handler/data"] = 4410000, ["Module:Category_handler/shared"] = 4410000, ["Module:Category_more_if_exists"] = 41000, ["Module:Category_pair"] = 6100, ["Module:Category_see_also"] = 39000, ["Module:Celestial_object_quadrangle"] = 2300, ["Module:Check_DYK_hook"] = 114000, ["Module:Check_for_clobbered_parameters"] = 1200000, ["Module:Check_for_deprecated_parameters"] = 59000, ["Module:Check_for_unknown_parameters"] = 17900000, ["Module:Check_isxn"] = 480000, ["Module:Check_winner_by_scores"] = 13000, ["Module:Checkuser"] = 75000, ["Module:Chem2"] = 4600, ["Module:Chem2/styles.css"] = 4600, ["Module:Citation/CS1"] = 5550000, ["Module:Citation/CS1/COinS"] = 5550000, ["Module:Citation/CS1/Configuration"] = 5550000, ["Module:Citation/CS1/Date_validation"] = 5550000, ["Module:Citation/CS1/Identifiers"] = 5550000, ["Module:Citation/CS1/Suggestions"] = 26000, ["Module:Citation/CS1/Utilities"] = 5550000, ["Module:Citation/CS1/Whitelist"] = 5550000, ["Module:Citation/CS1/styles.css"] = 5690000, ["Module:Cite_Q"] = 43000, ["Module:Cite_iucn"] = 57000, ["Module:Cite_tweet"] = 35000, ["Module:Cite_web"] = 39000, ["Module:Clade"] = 7500, ["Module:Class"] = 9610000, ["Module:Class/definition.json"] = 9610000, ["Module:Class/styles.css"] = 8850000, ["Module:Class_mask"] = 10200000, ["Module:Clickable_button_2"] = 956000, ["Module:Collapsible_list"] = 54000, ["Module:College_color"] = 127000, ["Module:College_color/data"] = 127000, ["Module:Color_contrast"] = 499000, ["Module:Color_contrast/colors"] = 501000, ["Module:Commons_link"] = 254000, ["Module:Complex_date"] = 65000, ["Module:Convert"] = 1230000, ["Module:Convert/data"] = 1230000, ["Module:Convert/helper"] = 8300, ["Module:Convert/text"] = 1230000, ["Module:Convert/wikidata"] = 3300, ["Module:Convert/wikidata/data"] = 3300, ["Module:ConvertNumeric"] = 15000, ["Module:Convert_character_width"] = 2800, ["Module:Convert_character_width/data"] = 2800, ["Module:Coordinates"] = 1330000, ["Module:Coordinates/styles.css"] = 1330000, ["Module:Copied"] = 18000, ["Module:CountryAdjectiveDemonym"] = 44000, ["Module:CountryAdjectiveDemonym/Adjectives"] = 44000, ["Module:CountryAdjectiveDemonym/Demonyms"] = 44000, ["Module:CountryAdjectiveDemonym/The"] = 44000, ["Module:CountryData"] = 142000, ["Module:CountryData/cacheA"] = 12000, ["Module:CountryData/cacheB"] = 8200, ["Module:CountryData/cacheC"] = 12000, ["Module:CountryData/cacheD"] = 4500, ["Module:CountryData/cacheE"] = 2800, ["Module:CountryData/cacheF"] = 2600, ["Module:CountryData/cacheG"] = 2700, ["Module:CountryData/summary"] = 142000, ["Module:Country_adjective"] = 4300, ["Module:Country_alias"] = 51000, ["Module:Country_alias/data"] = 51000, ["Module:Currency"] = 3500, ["Module:Currency/Presentation"] = 3500, } 657538c55d7dfefdb7bc51a9521fea093eca3e10 Module:Check for unknown parameters/doc 828 743 1476 1475 2023-06-23T01:34:56Z Tasha04 2 1 revision imported wikitext text/x-wiki {{used in system|in [[MediaWiki:Abusefilter-warning-DS]]}} {{module rating|p}} {{Lua|Module:If preview|noprotcat=yes}} This module may be appended to a template to check for uses of unknown parameters. Unlike many other modules, this module is ''not'' implemented by a template. == Usage == === Basic usage === <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category]] |arg1|arg2|arg3|argN}} </pre> or to sort the entries in the tracking category by parameter with a preview error message <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category|_VALUE_]] |preview=unknown parameter "_VALUE_" |arg1|arg2|...|argN}} </pre> or for an explicit red error message <pre> {{#invoke:check for unknown parameters|check |unknown=<span class="error">Sorry, I don't recognize _VALUE_</span> |arg1|arg2|...|argN}} </pre> Here, <code>arg1</code>, <code>arg2</code>, ..., <code>argN</code>, are the known parameters. Unnamed (positional) parameters can be added too: <code><nowiki>|1|2|argname1|argname2|...</nowiki></code>. Any parameter which is used, but not on this list, will cause the module to return whatever is passed with the <code>unknown</code> parameter. The <code>_VALUE_</code> keyword, if used, will be changed to the name of the parameter. This is useful for either sorting the entries in a tracking category, or for provide more explicit information. By default, the module makes no distinction between a defined-but-blank parameter and a non-blank parameter. That is, both unlisted {{para|foo|x}} and {{para|foo}} are reported. To only track non-blank parameters use {{para|ignoreblank|1}}. By default, the module ignores blank positional parameters. That is, an unlisted {{para|2}} is ignored. To ''include'' blank positional parameters in the tracking use {{para|showblankpositional|1}}. === Lua patterns === This module supports [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]] (similar to [[regular expression]]s), which are useful when there are many known parameters which use a systematic pattern. For example, {{tl|Infobox3cols}} uses <pre> | regexp1 = header[%d]+ | regexp2 = label[%d]+ | regexp3 = data[%d]+[abc]? | regexp4 = class[%d]+[abc]? | regexp5 = rowclass[%d]+ | regexp6 = rowstyle[%d]+ | regexp7 = rowcellstyle[%d]+ </pre> to match all parameters of the form <code>headerNUM</code>, <code>labelNUM</code>, <code>dataNUM</code>, <code>dataNUMa</code>, <code>dataNUMb</code>, <code>dataNUMc</code>, ..., <code>rowcellstyleNUM</code>, where NUM is a string of digits. == Example == <pre> {{Infobox | above = {{{name|}}} | label1 = Height | data1 = {{{height|}}} | label2 = Weight | data2 = {{{weight|}}} | label3 = Website | data3 = {{{website|}}} }}<!-- end infobox, start tracking -->{{#invoke:Check for unknown parameters|check | unknown = {{main other|[[Category:Some tracking category|_VALUE_]]}} | preview = unknown parameter "_VALUE_" | name | height | weight | website }} </pre> ==Call from within Lua code== See the end of [[Module:Rugby box]] for a simple example or [[Module:Infobox3cols]] or [[Module:Flag]] for more complicated examples. ==See also== * {{clc|Unknown parameters}} (category page can have header {{tl|Unknown parameters category}}) * [[Template:Checks for unknown parameters]] – adds documentation to templates using this module * [[Module:Check for deprecated parameters]] – similar module that checks for deprecated parameters * [[Module:Check for clobbered parameters]] – module that checks for conflicting parameters * [[Module:TemplatePar]] – similar function (originally from dewiki) * [[Template:Parameters]] and [[Module:Parameters]] – generates a list of parameter names for a given template * [[Project:TemplateData]] based template parameter validation * [[Module:Parameter validation]] checks a lot more * [[User:Bamyers99/TemplateParametersTool]] - A tool for checking usage of template parameters <includeonly>{{sandbox other|| <!-- Categories go here and interwikis go in Wikidata. --> [[Category:Modules that add a tracking category]] }}</includeonly> 4a8def527d795ff7957b9621293228925cb83596 Module:If empty/doc 828 744 1478 1477 2023-06-23T01:35:26Z Tasha04 2 1 revision imported wikitext text/x-wiki {{Module rating|protected}} {{Lua|Module:Arguments}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-use}} This module supports [[Template:If empty]]. See [[Template:If empty/testcases|here]] for test cases. <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly> 0844a4ab85f2957e0875fd5df410d374ab611346 Test 0 775 5449 2023-06-23T05:37:56Z Tasha04 2 Created page with "{{ | color = <!-- headers background color; the foreground color is automatically computed --> | full_name = | nickname = <!-- or |nicknames= --> | alias = <!-- or |aliases= --> | species = <!-- or |race=; for non-humans only --> | gender = <!-- if not obvious --> | title = | occupation = <!-- or |position= or |class= --> | affiliation = <!-- or |alignment= --> | fighting_style =..." wikitext text/x-wiki {{ | color = <!-- headers background color; the foreground color is automatically computed --> | full_name = | nickname = <!-- or |nicknames= --> | alias = <!-- or |aliases= --> | species = <!-- or |race=; for non-humans only --> | gender = <!-- if not obvious --> | title = | occupation = <!-- or |position= or |class= --> | affiliation = <!-- or |alignment= --> | fighting_style = | weapon = | family = | spouse = <!-- or |spouses= --> | significant_other = <!-- or |significant_others= --> | children = | relatives = | religion = | origin = <!-- or |home= --> | nationality = }} 26723cbd6ffc8531001a4de17a3c11515442a538 Template:OS-tan Character/doc 10 797 5494 5493 2023-06-23T21:27:29Z Tasha04 2 1 revision imported wikitext text/x-wiki <pre> <nowiki> {{OS-tan Character |tanname = -tan name of this character |image = name of the image to be used |imgsize = size of the image (200x200px if omitted) |cname = common or complete name of this character |alias = other names or nicknames for this character |hname = the human name of this character |creator = who created this character |roleplayer = who is roleplaying this character |debut = when the character first appeared in the roleplay (YYYY-MM-DD) |height = character's height in "cm (ft in)" form |haircolor = character's hair color |eyecolor = character's eye color |weapon = character's weapon(s) of choice |phfaction = character's faction in the roleplay |lineage = character's lineage, matriline, etc. |osper = what software or hardware this character personifies |osdev = who developed the software/hardware |platform = the platform(s) for which this software was released (not applicable if hardware) |reldate = when that software or hardware was first released (YYYY-MM-DD) |lastrel = when this software (or hardware, if applicable) was last updated (YYYY-MM-DD) }} </nowiki> </pre> {{OS-tan Character |tanname = 7.5-tan |image = 75picph.png |imgsize = 200x200px |cname = System 7.5-tan |alias = Capone, Mozart, Unity |hname = Amadea Pippin |creator = Futaba |roleplayer = [[User:Volarevia|VolareVia]] |debut = 2019-09-19 |height = 175.5cm (5'9") |haircolor = blonde |eyecolor = light-blue to lilac |weapon = Guns, Mecha |phfaction = Wanderer |lineage = Classic Macintosh |osper = System 7.x (PowerPC) |osdev = Apple |platform = PPC |reldate = System 7.1.2 (1994-03-14) |lastrel = System 7.6.1 (1997-04-07) }} [[Category:Character templates]] 723c06ec11a4c603b7d870c5f1fef3d812b93918 Module:Infobox 828 273 5500 537 2023-06-23T21:27:31Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:Navbar 828 283 5502 557 2023-06-23T21:27:32Z Tasha04 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 79f907e59eaa8bbf8dd50bb751933ebeaaa7eb17 Module:Documentation 828 296 5510 583 2023-06-23T21:28:40Z Tasha04 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle local purgeLink = makeWikilink("Special:Purge/" .. docTitle.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 728908c27cb1e65ac402f1af8a9e4f144ddc3d0d MediaWiki:Common.css 8 800 5515 2023-06-23T22:21:40Z Tasha04 2 Created page with "/* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; }" css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; } a443d42539c0346684694acf8572dd7a57b09083 5517 5515 2023-06-23T22:24:12Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 100px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 100px; } .infobox-table td { vertical-align: top; } 898f8af617875f283268023d7cd4283b2eead845 5518 5517 2023-06-23T22:24:33Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; float: right; margin: 0 0 1em 1em; width: 100px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 100px; } .infobox-table td { vertical-align: top; } f67febe5d79b088d40b25a24dd53d12c8572b3ad 5519 5518 2023-06-23T22:25:18Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; float: right; margin: 0 0 1em 1em; width: 100px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 50px; } .infobox-table td { vertical-align: top; } e344428988ab6e65e832d27b2de1f9421771bc4d 5520 5519 2023-06-23T22:26:48Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; float: right; margin: 0 0 1em 1em; width: 50px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 50px; } .infobox-table td { vertical-align: top; } 141eb68084ae4f5bb43a139a9fc62586299ce283 5521 5520 2023-06-23T22:27:09Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; float: right; width: 50px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { width: 50px; } .infobox-table td { vertical-align: top; } 1905d9d76444ce79d08bf10a6b5670ac0a2e8081 5525 5521 2023-06-23T22:33:27Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; } a443d42539c0346684694acf8572dd7a57b09083 5527 5525 2023-06-23T22:37:29Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; float: right; margin: 0 0 1em 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; } de7a772a27376bc5ca37913b6a4b58f604eee4f7 5528 5527 2023-06-23T22:37:46Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ f23a4358c198efde0025fa6fb8082854aa392a65 5529 5528 2023-06-23T22:38:04Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; } a443d42539c0346684694acf8572dd7a57b09083 5532 5529 2023-06-23T22:39:34Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 50px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 50px; } .infobox-table td { vertical-align: top; } 336aa7e72c39918e75c30ddc2de7a4cc0b3ee8cc 5533 5532 2023-06-23T22:41:35Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { border: 1px solid #a2a9b1; background: #f8f9fa; color: black; margin-bottom: 0.5em; /* @noflip */ margin-left: 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; } .infobox td, .infobox th { vertical-align: middle; } .infobox caption { font-size: larger; margin-left: inherit; } .infobox.bordered { border-collapse: collapse; } .infobox.bordered td, .infobox.bordered th { border: 1px solid #a2a9b1; } .infobox.bordered .borderless td, .infobox.bordered .borderless th { border: 0 solid #a2a9b1; } .infobox.sisterproject { width: 20em; font-size: 90%; } .archive-box { border: 1px solid #aaf; background: #f2f2f9; color: #000; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align: center; } 4e66881162a821bad44ebc58979e5977ec11cef1 5535 5533 2023-06-23T22:42:09Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 50px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 50px; } .infobox-table td { vertical-align: top; } 336aa7e72c39918e75c30ddc2de7a4cc0b3ee8cc 5536 5535 2023-06-23T22:43:17Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; float: right; margin: 0 0 1em 1em; width: 50px; } .infobox-title { font-size: 16px; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 50px; } .infobox-table td { vertical-align: top; } 76c4de0369af3bbd4fccd1c3684fd23612912462 5541 5536 2023-06-24T00:00:11Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox-continent { background: #eee; float: right; margin: 0 0 1em 1em; width: 50px; } .infobox-title { font-size: 16px; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 50px; } .infobox-table td { vertical-align: top; } 386acd4e25fb98f99b2e09d62deb0aac8315abd8 5542 5541 2023-06-24T00:01:14Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox-continent { background: #eee; float: right; margin: 0 0 1em 1em; width: 10px; } .infobox-title { font-size: 16px; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 10px; } .infobox-table td { vertical-align: top; } 64dea3e7d1db9daf85ba405da0632f31fade1029 5543 5542 2023-06-24T00:02:02Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; } a443d42539c0346684694acf8572dd7a57b09083 5544 5543 2023-06-24T00:02:29Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox-continent { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; } d17cf4fbc50b2e244f71d776b44a056d5a9cdcc7 5563 5544 2023-06-24T02:47:41Z Tasha04 2 css text/css /* CSS placed here will be applied to all skins */ .infobox { background: #eee; border: 1px solid #aaa; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { font-size: 2em; text-align: center; } .infobox-image { text-align: center; } .infobox-table th { text-align: right; vertical-align: top; width: 120px; } .infobox-table td { vertical-align: top; } 32deac692c371e6f8d8fa9331858710fe41cb469 Valmore 0 801 5522 2023-06-23T22:28:00Z Tasha04 2 Created page with "{{Infobox continent | title = Valmore | area = ??? | population = ??? | ethnicgroups = Various | religions = Various }}" wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = ??? | ethnicgroups = Various | religions = Various }} 6b2ad47319aa4e5bb93e186adcdb17a6aeaf280e 5526 5522 2023-06-23T22:34:21Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = ??? | ethnicgroups = Various | religions = Various | demonym = ??? | countries = Various | languages = Various }} 8f5956e79a28b214e2791faf09bfdc13a19dc178 5531 5526 2023-06-23T22:38:30Z Tasha04 2 Blanked the page wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 5537 5531 2023-06-23T22:43:38Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = ??? | ethnicgroups = Various | religions = Various | demonym = ??? | countries = Various | languages = Various }} 8f5956e79a28b214e2791faf09bfdc13a19dc178 File:Fire emblem.png 6 803 5545 2023-06-24T00:10:53Z Tasha04 2 Fire emblem wikitext text/x-wiki == Summary == Fire emblem 9671f86786647706886f10168f5899f5a611e003 File:Earth emblem.png 6 804 5546 2023-06-24T00:14:23Z Tasha04 2 Earth emblem wikitext text/x-wiki == Summary == Earth emblem 168d584fe58a3e61649d6ddcc482201a7cd31ecb File:Water emblem.png 6 805 5547 2023-06-24T00:18:36Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Air emblem.png 6 806 5548 2023-06-24T00:22:18Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Ice emblem.png 6 807 5549 2023-06-24T00:23:44Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Plant emblem.png 6 808 5550 2023-06-24T00:25:03Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Lightning emblem.png 6 809 5551 2023-06-24T00:27:30Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Metal emblem.png 6 810 5552 2023-06-24T00:29:23Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Light emblem.png 6 811 5553 2023-06-24T00:32:08Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Dark emblem.png 6 812 5554 2023-06-24T00:37:06Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Main Page 0 1 5555 1356 2023-06-24T00:37:44Z Tasha04 2 wikitext text/x-wiki {|style="width: 100%; background: none; border-collapse: separate; border-spacing: 8px 4px;" |style="width: 70%; border: 2px solid #c99157; background: #ffec9e; vertical-align: top;"| {|style="width: 100%; background: none;" |- {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:The Main 10 Elemental Kingdoms|The Main 10 Elemental Kingdoms]] |{{CharacterIcon|name=Sodor Empire|link=Sodor Empire|icon=Sodor Empire.png|size=80}} {{CharacterIcon|name=Etrathen Kingdom|link=Etrathen Kingdom|icon=Etrathen Kingdom.png|size=80}} {{CharacterIcon|name=Wraphegia Kingdom|link=Kingdom of Wraphegia|icon=Kingdom of Wraphegia.png|size=80}} {{CharacterIcon|name=Aihekar Kingdom|link=Kingdom of Aihekar|icon=Kingdom of Aihekar.png|size=80}} {{CharacterIcon|name=Icrourynese Empire|link=Icrourynese Empire|icon=Icrourynese Empire.png|size=80}} {{CharacterIcon|name=Preapia Kingdom|link=Kingdom of Preapia|icon=Kingdom of Preapia.png|size=80}} {{CharacterIcon|name=Lakya Kingdom|link=Lakya Kingdom|icon=Lakya Kingdom.png|size=80}} {{CharacterIcon|name=Madian Empire|link=Madian Empire|icon=Madian Empire.png|size=80}} {{CharacterIcon|name=Divine Kingdom of Luithia Palatinatee|link=Divine Kingdom of Luithia Palatinate|icon=Luithia Palatinate.png|size=80}} {{CharacterIcon|name=Dremmutian Brotherhood|link=Dremmutian Brotherhood|icon=Dremmutian Brotherhood.png|size=80}}}} {{CharacterIconGroup |[[:Category:Continents|Continents]] |{{CharacterIcon|name=Valmore|link=Valmore|icon=Valmore emblem.png|size=80}} {{CharacterIcon|name=Margaia|link=Margaia|icon=Margaia emblem.png|size=80}} {{CharacterIcon|name=Cavaarkite|link=Cavaarkite|icon=Cavaarkite emblem.png|size=80}} {{CharacterIcon|name=Sanctus Darius|link=Sanctus Darius|icon=Sanctus Darius emblem.png|size=80}} {{CharacterIcon|name=Docarus|link=Docarus|icon=Docarus emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:Important Characters|Important Characters]] |{{CharacterIcon|name=|link=|icon=.png|size=80}}}} All [[:Category:Characters|Characters]] on this Wiki All [[:Category:Artifacts|Artifacts]] on this Wiki |} |style="width:30%; border:2px solid #c99157; background:#ffec9e; vertical-align:top;"| {|style="width: 100%; background:none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Other stuff</h2> |- | * [[Termination of Dusk|What is Termination of Dusk]]? |- | |} 47c75b572242a0d27888f7362d36fa66825be0fc 5559 5555 2023-06-24T02:39:38Z Tasha04 2 wikitext text/x-wiki {|style="width: 100%; background: none; border-collapse: separate; border-spacing: 8px 4px;" |style="width: 70%; border: 2px solid #c99157; background: #ffec9e; vertical-align: top;"| {|style="width: 100%; background: none;" |- {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:The Main 10 Elemental Kingdoms|The Main 10 Elemental Kingdoms]] |{{CharacterIcon|name=Sodor Empire|link=Sodor Empire|icon=Sodor Empire.png|size=80}} {{CharacterIcon|name=Etrathen Kingdom|link=Etrathen Kingdom|icon=Etrathen Kingdom.png|size=80}} {{CharacterIcon|name=Wraphegia Kingdom|link=Kingdom of Wraphegia|icon=Kingdom of Wraphegia.png|size=80}} {{CharacterIcon|name=Aihekar Kingdom|link=Kingdom of Aihekar|icon=Kingdom of Aihekar.png|size=80}} {{CharacterIcon|name=Icrourynese Empire|link=Icrourynese Empire|icon=Icrourynese Empire.png|size=80}} {{CharacterIcon|name=Preapia Kingdom|link=Kingdom of Preapia|icon=Kingdom of Preapia.png|size=80}} {{CharacterIcon|name=Lakya Kingdom|link=Lakya Kingdom|icon=Lakya Kingdom.png|size=80}} {{CharacterIcon|name=Madian Empire|link=Madian Empire|icon=Madian Empire.png|size=80}} {{CharacterIcon|name=Divine Kingdom of Luithia Palatinatee|link=Divine Kingdom of Luithia Palatinate|icon=Luithia Palatinate.png|size=80}} {{CharacterIcon|name=Dremmutian Brotherhood|link=Dremmutian Brotherhood|icon=Dremmutian Brotherhood.png|size=80}}}} {{CharacterIconGroup |[[:Category:Continents|Continents]] |{{CharacterIcon|name=Valmore|link=Valmore|icon=Valmore emblem.png|size=80}} {{CharacterIcon|name=Margaia|link=Margaia|icon=Margaia emblem.png|size=80}} {{CharacterIcon|name=Cavaarkite|link=Cavaarkite|icon=Cavaarkite emblem.png|size=80}} {{CharacterIcon|name=Sanctus Darius|link=Sanctus Darius|icon=Sanctus Darius emblem.png|size=80}} {{CharacterIcon|name=Docarus|link=Docarus|icon=Docarus emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:Important Characters|Important Characters]] |{{CharacterIcon|name=|link=|icon=.png|size=80}}}} All [[:Category:Characters|Characters]] on this Wiki All [[:Category:Artifacts|Artifacts]] on this Wiki All [[:Category:Locations|Locations]] on this Wiki |} |style="width:30%; border:2px solid #c99157; background:#ffec9e; vertical-align:top;"| {|style="width: 100%; background:none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Other stuff</h2> |- | * [[Termination of Dusk|What is Termination of Dusk]]? |- | |} b278b8434e0f3800585c26a7abc7e210fcff1c7c 5562 5559 2023-06-24T02:45:36Z Tasha04 2 wikitext text/x-wiki {|style="width: 100%; background: none; border-collapse: separate; border-spacing: 8px 4px;" |style="width: 70%; border: 2px solid #c99157; background: #ffec9e; vertical-align: top;"| {|style="width: 100%; background: none;" |- {{CharacterIconGroup |[[:Category:The Main 10 Elements|The Main 10 Elements]] |{{CharacterIcon|name=Fire|link=Fire element|icon=Fire emblem.png|size=80}} {{CharacterIcon|name=Earth|link=Earth element|icon=Earth emblem.png|size=80}} {{CharacterIcon|name=Water|link=Water element|icon=Water emblem.png|size=80}} {{CharacterIcon|name=Air|link=Air element|icon=Air emblem.png|size=80}} {{CharacterIcon|name=Ice|link=Ice element|icon=Ice emblem.png|size=80}} {{CharacterIcon|name=Plant|link=Plant element|icon=Plant emblem.png|size=80}} {{CharacterIcon|name=Lightning|link=Lightning element|icon=Lightning emblem.png|size=80}} {{CharacterIcon|name=Metal|link=Metal element|icon=Metal emblem.png|size=80}} {{CharacterIcon|name=Light|link=Light element|icon=Light emblem.png|size=80}} {{CharacterIcon|name=Dark|link=Dark element|icon=Dark emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:The Main 10 Elemental Kingdoms|The Main 10 Elemental Kingdoms]] |{{CharacterIcon|name=Sodor Empire|link=Sodor Empire|icon=Sodor Empire.png|size=80}} {{CharacterIcon|name=Etrathen Kingdom|link=Etrathen Kingdom|icon=Etrathen Kingdom.png|size=80}} {{CharacterIcon|name=Kingdom of Wraphegia|link=Kingdom of Wraphegia|icon=Kingdom of Wraphegia.png|size=80}} {{CharacterIcon|name=Kingdom of Aihekar|link=Kingdom of Aihekar|icon=Kingdom of Aihekar.png|size=80}} {{CharacterIcon|name=Icrourynese Empire|link=Icrourynese Empire|icon=Icrourynese Empire.png|size=80}} {{CharacterIcon|name=Kingdom of Preapia|link=Kingdom of Preapia|icon=Kingdom of Preapia.png|size=80}} {{CharacterIcon|name=Lakya Kingdom|link=Lakya Kingdom|icon=Lakya Kingdom.png|size=80}} {{CharacterIcon|name=Madian Empire|link=Madian Empire|icon=Madian Empire.png|size=80}} {{CharacterIcon|name=Divine Kingdom of Luithia Palatinatee|link=Divine Kingdom of Luithia Palatinate|icon=Luithia Palatinate.png|size=80}} {{CharacterIcon|name=Dremmutian Brotherhood|link=Dremmutian Brotherhood|icon=Dremmutian Brotherhood.png|size=80}}}} {{CharacterIconGroup |[[:Category:Continents|Continents]] |{{CharacterIcon|name=Valmore|link=Valmore|icon=Valmore emblem.png|size=80}} {{CharacterIcon|name=Margaia|link=Margaia|icon=Margaia emblem.png|size=80}} {{CharacterIcon|name=Cavaarkite|link=Cavaarkite|icon=Cavaarkite emblem.png|size=80}} {{CharacterIcon|name=Sanctus Darius|link=Sanctus Darius|icon=Sanctus Darius emblem.png|size=80}} {{CharacterIcon|name=Docarus|link=Docarus|icon=Docarus emblem.png|size=80}}}} {{CharacterIconGroup |[[:Category:Important Characters|Important Characters]] |{{CharacterIcon|name=|link=|icon=.png|size=80}}}} All [[:Category:Characters|Characters]] on this Wiki All [[:Category:Artifacts|Artifacts]] on this Wiki All [[:Category:Locations|Locations]] on this Wiki |} |style="width:30%; border:2px solid #c99157; background:#ffec9e; vertical-align:top;"| {|style="width: 100%; background:none;" |<h2 style="margin: 0; padding: 0.2em; background: #e1ad6d; font-size: 1.5em; font-weight: bold; border: 1px solid #c99157;">Other stuff</h2> |- | * [[Termination of Dusk|What is Termination of Dusk]]? |- | |} f0c070e007e3ebe86eb418838860ec8c48c943f3 File:Valmore emblem.png 6 813 5556 2023-06-24T00:41:20Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Margaia emblem.png 6 814 5557 2023-06-24T00:43:00Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Cavaarkite emblem.png 6 815 5558 2023-06-24T00:44:27Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Docarus emblem.png 6 816 5560 2023-06-24T02:42:38Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Sanctus Darius emblem.png 6 817 5561 2023-06-24T02:43:35Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Module:Text 828 842 5615 5614 2023-06-24T02:53:32Z Tasha04 2 1 revision imported Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2022-07-21", suite = "Text" } --[=[ Text utilities ]=] -- local globals local PatternCJK = false local PatternCombined = false local PatternLatin = false local PatternTerminated = false local QuoteLang = false local QuoteType = false local RangesLatin = false local SeekQuote = false local function initLatinData() if not RangesLatin then RangesLatin = { { 7, 687 }, { 7531, 7578 }, { 7680, 7935 }, { 8194, 8250 } } end if not PatternLatin then local range PatternLatin = "^[" for i = 1, #RangesLatin do range = RangesLatin[ i ] PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], 45, range[ 2 ] ) end -- for i PatternLatin = PatternLatin .. "]*$" end end local function initQuoteData() -- Create quote definitions if not QuoteLang then QuoteLang = { af = "bd", ar = "la", be = "labd", bg = "bd", ca = "la", cs = "bd", da = "bd", de = "bd", dsb = "bd", et = "bd", el = "lald", en = "ld", es = "la", eu = "la", -- fa = "la", fi = "rd", fr = "laSPC", ga = "ld", he = "ldla", hr = "bd", hsb = "bd", hu = "bd", hy = "labd", id = "rd", is = "bd", it = "ld", ja = "x300C", ka = "bd", ko = "ld", lt = "bd", lv = "bd", nl = "ld", nn = "la", no = "la", pl = "bdla", pt = "lald", ro = "bdla", ru = "labd", sk = "bd", sl = "bd", sq = "la", sr = "bx", sv = "rd", th = "ld", tr = "ld", uk = "la", zh = "ld", ["de-ch"] = "la", ["en-gb"] = "lsld", ["en-us"] = "ld", ["fr-ch"] = "la", ["it-ch"] = "la", ["pt-br"] = "ldla", ["zh-tw"] = "x300C", ["zh-cn"] = "ld" } end if not QuoteType then QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } }, bdla = { { 8222, 8220 }, { 171, 187 } }, bx = { { 8222, 8221 }, { 8218, 8217 } }, la = { { 171, 187 }, { 8249, 8250 } }, laSPC = { { 171, 187 }, { 8249, 8250 }, true }, labd = { { 171, 187 }, { 8222, 8220 } }, lald = { { 171, 187 }, { 8220, 8221 } }, ld = { { 8220, 8221 }, { 8216, 8217 } }, ldla = { { 8220, 8221 }, { 171, 187 } }, lsld = { { 8216, 8217 }, { 8220, 8221 } }, rd = { { 8221, 8221 }, { 8217, 8217 } }, x300C = { { 0x300C, 0x300D }, { 0x300E, 0x300F } } } end end -- initQuoteData() local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite initQuoteData() local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" if not patternCJK then patternCJK = mw.ustring.char( 91, 4352, 45, 4607, 11904, 45, 42191, 43072, 45, 43135, 44032, 45, 55215, 63744, 45, 64255, 65072, 45, 65103, 65381, 45, 65500, 131072, 45, 196607, 93 ) end return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string initLatinData() return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end if not SeekQuote then SeekQuote = mw.ustring.char( 34, -- " 39, -- ' 171, -- laquo 187, -- raquo 8216, -- lsquo 8217, -- rsquo 8218, -- sbquo 8220, -- ldquo 8221, -- rdquo 8222, -- bdquo 8249, -- lsaquo 8250, -- rsaquo 0x300C, -- CJK 0x300D, -- CJK 0x300E, -- CJK 0x300F ) -- CJK end return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed if not PatternCombined then PatternCombined = mw.ustring.char( 91, 0x0300, 45, 0x036F, 0x1AB0, 45, 0x1AFF, 0x1DC0, 45, 0x1DFF, 0xFE20, 45, 0xFE2F, 93 ) end decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r if not PatternTerminated then PatternTerminated = mw.ustring.char( 91, 12290, 65281, 65294, 65311 ) .. "!%.%?…][\"'%]‹›«»‘’“”]*$" end if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r initLatinData() if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range for i = 1, #RangesLatin do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then initQuoteData() r = { } r.QuoteLang = QuoteLang r.QuoteType = QuoteType end return r end -- Text.test() -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 07f1fc4d39342fd92bdae1c5463bbfede7eeda1a Module:Citation 828 843 5617 5616 2023-06-24T02:53:52Z Tasha04 2 1 revision imported Scribunto text/plain error('This module is retained for historical and structural reasons; consider using [[Module:Citation/CS1]].') b09b01dacd314f37060769a4fc6b8f027c247b86 Template:Tmbox 10 844 5619 5618 2023-06-24T02:53:58Z Tasha04 2 1 revision imported wikitext text/x-wiki {{#invoke:Message box|tmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> a594c2ad0c7763e89761e3a24c69dca724b974be Template:Cs1 10 846 5623 5622 2023-06-24T02:53:59Z Tasha04 2 1 revision imported wikitext text/x-wiki [[Help:Citation Style 1|Citation Style 1]]<noinclude> [[Category:Documentation assistance templates]] </noinclude> 1da8ad17d867e11fdecfe858aa0b0e5a632bb6e8 Template:Cs2 10 847 5625 5624 2023-06-24T02:54:00Z Tasha04 2 1 revision imported wikitext text/x-wiki [[Help:Citation Style 2|Citation Style 2]]<noinclude> [[Category:Documentation assistance templates]] </noinclude> 858b36b946491e8f374a732e2a72589c9d6f7f00 Template:Oldtfdfull 10 848 5627 5626 2023-06-24T02:54:00Z Tasha04 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Old TfD]] {{XFDcloser standard installation}} 79f7fbecc5e58d2a3dd7644e99aed3dc3df4775b Template:Old TfD 10 849 5629 5628 2023-06-24T02:54:01Z Tasha04 2 1 revision imported wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||$B={{Tmbox | small = {{{small|}}} | image = [[File:Clipboard.svg|{{#ifeq:{{{small|}}}|yes|30x20|50x40}}px]] | style = text-align:center | text = This {{#switch:{{{demospace|{{NAMESPACE}}}}} | {{ns:Category_talk}} = category | {{ns:Module_talk}} = module | template }} {{#if:{{{1|}}}|([[{{{1}}}]])}} was considered for {{#if:{{{merge|}}}|[[Wikipedia:Merging|merging]]|[[Wikipedia:Deletion policy|deletion]]}}{{#if:{{{merge|}}}|{{#ifeq:{{{merge}}}|self||&#32;with [[{{{merge}}}]]}} {{#if:{{{more_merge|}}}|&#32;{{{more_merge}}}}}}} on {{#formatdate:{{{date}}}}}. The result of the <!-- IF OLD LOG -->{{#ifexist:Wikipedia:Templates for deletion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date}}}|ymd}}}} |<!-- Listed in Templates for deletion -->'''[[Wikipedia:Templates for deletion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date|}}}|ymd}}}}#{{{talk|{{{disc|{{{discuss|{{{1|Template:{{PAGENAME}}}}}}}}}}}}}}|discussion]]''' |<!-- Listed in Templates for discussion -->'''[[Wikipedia:Templates for discussion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date|}}}|ymd}}}}#{{{talk|{{{disc|{{{discuss|{{{1|Template:{{PAGENAME}}}}}}}}}}}}}}|discussion]]'''}}<!-- END IF --> was "'''{{{result|keep}}}'''". }}}}<noinclude>{{Documentation}}</noinclude> f16f9178aee8fb8f2ed0da7868a40baa37d25647 Module:Citation/doc 828 850 5631 5630 2023-06-24T02:54:02Z Tasha04 2 1 revision imported wikitext text/x-wiki {{Mbox | type = style | image = [[File:Imbox content.png|40px|alt=|link=]] | text = '''{{FULLPAGENAME}}''' is retained for historical and structural reasons; consider using [[Module:Citation/CS1]]. }} {{oldtfdfull|date= 2018 May 13 |result=Blank |disc=Module:Citation}} Development of [[WP:LUA|Lua]] support for both {{cs1}} and {{cs2}} began at '''Module:Citation'''. That development was abandoned in 2013 as development of [[Module:Citation/CS1]] began. Though this module remained unused, it is and has been the root page of the [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Citation&namespace=828 several module subpages that implement cs1 and cs2]. The content of this module was replaced with an error message return as the result of a [[Wikipedia:Templates for discussion/Log/2018_May_13#Module:Citation|2018 TfD]]. 25a0fddb78cbfd1d8810e11eadb540c1dba6bf9a MediaWiki:Common.css 8 800 5682 5563 2023-06-24T03:02:45Z Tasha04 2 css text/css .infobox { background-color: #ffff00; border: 2px solid #008600; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { border: 1px solid #000000; font-size: 1.5em; text-align: center; background-color: #ff0000; } .infobox-subtitle { font-size: 1em; text-align: center; background-color: #fff00; } .infobox-image { text-align: center; background-color: #ffff00; } f1ee32133b0e461e1b8d2c28a69d7387f3787c72 5683 5682 2023-06-24T03:03:46Z Tasha04 2 css text/css .infobox { background-color: #D2ED9E; font-family: "Helvetica"; float: right; margin: 0 0 1em 1em; padding: 1em; width: 400px; } .infobox-title { border: 2px solid #008600; font-family: "Verdana"; font-variant: small-caps; color: white; font-size: 1.5em; text-align: center; background-color: #344F00; padding: 2px; } .infobox-subtitle { font-size: 1em; color: white; text-align: center; background-color: #7A9E35; padding: 2px; } .infobox-image { text-align: center; background-color: #D2ED9E; } .infoboxtd1strow { padding-left: 5%; } 039d03e80a4ed2c7c1cae478dcf1c6d609f70df1 5684 5683 2023-06-24T03:06:03Z Tasha04 2 css text/css .infobox { background-color: #b8ae8f; font-family: "Helvetica"; float: right; margin: 0 0 1em 1em; width: 400px; } .infobox-title { border: 2px solid #008600; font-family: "Verdana"; font-variant: small-caps; color: white; font-size: 1.5em; text-align: center; background-color: #344F00; padding: 2px; } .infobox-subtitle { font-size: 1em; color: white; text-align: center; background-color: #7A9E35; padding: 2px; } .infobox-image { text-align: center; background-color: #D2ED9E; } .infoboxtd1strow { padding-left: 5%; } c640155445a9037c040e3156b4e6f755ff629206 5685 5684 2023-06-24T03:06:44Z Tasha04 2 css text/css .infobox { background-color: #b8ae8f; font-family: "Helvetica"; float: right; margin: 0 0 1em 1em; width: 400px; } .infobox-title { border: 2px solid #008600; font-family: "Verdana"; font-variant: small-caps; color: white; font-size: 1.5em; text-align: center; background-color: #736c4b; padding: 2px; } .infobox-subtitle { font-size: 1em; color: white; text-align: center; background-color: #7A9E35; padding: 2px; } .infobox-image { text-align: center; background-color: #D2ED9E; } .infoboxtd1strow { padding-left: 5%; } 7929ce280ece4aca34335c49e6dc952b9dd13d5a 5687 5685 2023-06-24T03:15:26Z Tasha04 2 css text/css .infobox { background-color: #b8ae8f; font-family: "Helvetica"; float: right; margin: 0 0 1em 1em; width: 40px; } .infobox-title { border: 2px solid #736c4b; font-family: "Verdana"; font-variant: small-caps; color: white; font-size: 1.5em; text-align: center; background-color: #736c4b; padding: 2px; } .infobox-subtitle { font-size: 1em; color: white; text-align: center; background-color: #736c4b; padding: 2px; } .infobox-image { text-align: center; background-color: #736c4b; } .infoboxtd1strow { padding-left: 5%; } c628ac599f0318f64d24cb70a19e4e8bf25cf0a3 5689 5687 2023-06-24T03:21:02Z Tasha04 2 css text/css cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for <small>, <sub> and <sup> */ small { font-size: 85%; } .mw-body-content sub, .mw-body-content sup { font-size: 80%; } /* Same spacing for indented and unindented paragraphs on talk pages */ .ns-talk .mw-body-content dd { margin-top: 0.4em; margin-bottom: 0.4em; } /* Reduce page jumps by hiding collapsed/dismissed content */ .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child), /* Avoid FOUC/reflows on collapsed elements. */ /* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */ /* TODO: Use :is() selector at some reasonable future when support is good for Most Clients */ /* Reference: https://gerrit.wikimedia.org/g/mediawiki/core/+/ecda06cb2aef55b77c4b4d7ecda492d634419ead/resources/src/jquery/jquery.makeCollapsible.styles.less#75 */ .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > p, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > table, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > thead + tbody, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) tr:not( :first-child ), .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) .mw-collapsible-content, /* Hide charinsert base for those not using the gadget */ #editpage-specialchars { display: none; } /* Make the list of references smaller * Keep in sync with Template:Refbegin/styles.css * And Template:Reflist/styles.css */ ol.references { font-size: 90%; margin-bottom: 0.5em; } /* Cite customizations for Parsoid * Once everything uses the one true parser these are just customizations */ span[ rel="mw:referencedBy" ] { counter-reset: mw-ref-linkback 0; } span[ rel='mw:referencedBy' ] > a::before { content: counter( mw-ref-linkback, lower-alpha ); font-size: 80%; font-weight: bold; font-style: italic; } a[ rel="mw:referencedBy" ]::before { font-weight: bold; content: "^"; } span[ rel="mw:referencedBy" ]::before { content: "^ "; } .mw-ref > a[data-mw-group=lower-alpha]::after { content: '[' counter( mw-Ref, lower-alpha ) ']'; } .mw-ref > a[data-mw-group=upper-alpha]::after { content: '[' counter( mw-Ref, upper-alpha ) ']'; } .mw-ref > a[data-mw-group=decimal]::after { content: '[' counter( mw-Ref, decimal ) ']'; } .mw-ref > a[data-mw-group=lower-roman]::after { content: '[' counter( mw-Ref, lower-roman ) ']'; } .mw-ref > a[data-mw-group=upper-roman]::after { content: '[' counter( mw-Ref, upper-roman ) ']'; } .mw-ref > a[data-mw-group=lower-greek]::after { content: '[' counter( mw-Ref, lower-greek ) ']'; } /* Styling for jQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { font-weight: normal; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; } /* Lists in wikitable data cells are always left-aligned */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* Change the external link icon to a PDF icon for all PDF files */ .mw-parser-output a[href$=".pdf"].external, .mw-parser-output a[href*=".pdf?"].external, .mw-parser-output a[href*=".pdf#"].external, .mw-parser-output a[href$=".PDF"].external, .mw-parser-output a[href*=".PDF?"].external, .mw-parser-output a[href*=".PDF#"].external { background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right; /* @noflip */ padding: 8px 18px 8px 0; } /* System messages styled similarly to fmbox */ div.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon { clear: both; margin: 0.2em 0; border: 1px solid #bb7070; background-color: #ffdbdb; padding: 0.25em 0.9em; box-sizing: border-box; } /* default colors for partial block message */ .mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt { border-color: #fc3; background-color: #fef6e7; } /* Minimum thumb width */ figure[typeof~='mw:File/Thumb'], figure[typeof~='mw:File/Frame'], .thumbinner { min-width: 100px; } /* Prevent floating boxes from overlapping any category listings, file histories, edit previews, and edit [Show changes] views. */ #mw-subcategories, #mw-pages, #mw-category-media, #filehistory, #wikiPreview, #wikiDiff { clear: both; } /* Styling for tags in changes pages */ .mw-tag-markers { font-style: italic; font-size: 90%; 0d8d76de8045325b85c442d75c72c60b91d1802c Valmore 0 801 5686 5537 2023-06-24T03:12:26Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 1,000,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} e0243c4695409d96e09d7059ec7fd59a56d6af60 5688 5686 2023-06-24T03:18:01Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 1,000,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} == History == === Background === 7ade6a4583b0f70a07f4c463721a71edaddfce07 5727 5688 2023-06-24T05:12:52Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on Malvounus, a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Background === == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == 1855601c96dc34e45d7809fc388652125f661461 5728 5727 2023-06-24T05:42:18Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on Malvounus, a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Discovery === Valmore's discovery can be traced back to the tumultuous "Battle of Eternal Regrets," a devastating conflict that unfolded in the once-thriving land of Margaia. Mythic rulers, consumed by power and ambition, clashed in this momentous war, leaving Margaia and its elemental kingdoms in ruins. In the aftermath, shattered and desperate survivors yearned for a fresh start. Led by the fearless explorer Aella, they embarked on a courageous expedition in the year 15 AW (After War), venturing into uncharted waters beyond Margaia's borders. Their goal was to find a new home and rebuild their shattered lives. After enduring arduous weeks at sea, Aella and her crew were filled with awe as they stepped foot on an undiscovered land. Valmore, as it would be named, revealed itself as a lush and pristine continent, untouched by the scars of war. It became a haven of natural beauty, thriving with vibrant life and free from the corruption and violence that plagued Margaia. == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == dae79d631aa0fb4a6574a8340d695a4e040db6e5 5729 5728 2023-06-24T05:45:55Z Tasha04 2 /* Discovery */ wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on Malvounus, a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Origins === Valmore's discovery can be traced back to the tumultuous "Battle of Eternal Regrets," a devastating conflict that unfolded in the once-thriving land of Margaia. Mythic rulers, consumed by power and ambition, clashed in this momentous war, leaving Margaia and its elemental kingdoms in ruins. In the aftermath, shattered and desperate survivors yearned for a fresh start. Led by the fearless explorer Aella, they embarked on a courageous expedition in the year 15 AW (After War), venturing into uncharted waters beyond Margaia's borders. Their goal was to find a new home and rebuild their shattered lives. After enduring arduous weeks at sea, Aella and her crew were filled with awe as they stepped foot on an undiscovered land. Valmore, as it would be named, revealed itself as a lush and pristine continent, untouched by the scars of war. It became a haven of natural beauty, thriving with vibrant life and free from the corruption and violence that plagued Margaia. == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == cbb8385417dc506f558ad85c5d49cbec0656f179 5730 5729 2023-06-24T05:46:20Z Tasha04 2 /* Origins */ wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on Malvounus, a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Origins === Valmore's origins can be traced back to the tumultuous "Battle of Eternal Regrets," a devastating conflict that unfolded in the once-thriving land of Margaia. Mythic rulers, consumed by power and ambition, clashed in this momentous war, leaving Margaia and its elemental kingdoms in ruins. In the aftermath, shattered and desperate survivors yearned for a fresh start. Led by the fearless explorer Aella, they embarked on a courageous expedition in the year 15 AW (After War), venturing into uncharted waters beyond Margaia's borders. Their goal was to find a new home and rebuild their shattered lives. After enduring arduous weeks at sea, Aella and her crew were filled with awe as they stepped foot on an undiscovered land. Valmore, as it would be named, revealed itself as a lush and pristine continent, untouched by the scars of war. It became a haven of natural beauty, thriving with vibrant life and free from the corruption and violence that plagued Margaia. == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == d92413f00b90e0ca8cb5f2e4fb88032a417951f9 5731 5730 2023-06-24T05:48:10Z Tasha04 2 /* Origins */ wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on Malvounus, a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Origins === Valmore's discovery can be traced back to the tumultuous "Battle of Eternal Regrets," a devastating conflict that unfolded in the once-thriving land of Margaia. Mythic rulers, consumed by power and ambition, clashed in this momentous war, leaving Margaia and its elemental kingdoms in ruins. In the aftermath, shattered and desperate survivors yearned for a fresh start. Led by the fearless explorer Aella, they embarked on a courageous expedition in the year 15 AW (After War), venturing into uncharted waters beyond Margaia's borders. Their goal was to find a new home and rebuild their shattered lives. After enduring arduous weeks at sea, Aella and her crew were filled with awe as they stepped foot on an undiscovered land. Valmore, as it would be named, revealed itself as a lush and pristine continent, untouched by the scars of war. It became a haven of natural beauty, thriving with vibrant life and free from the corruption and violence that plagued Margaia. Valmore blossomed as a haven of unparalleled beauty with lush forests, meandering rivers, majestic mountains, and fertile valleys. Its vibrant ecosystems flourished, creating a harmonious balance between flora and fauna. In this new land, the survivors found solace, a sanctuary where the corruption and violence that plagued Margaia seemed but distant echoes of a troubled past. The arrival of the survivors marked the birth of a new era in Valmore's history. Inspired by the unspoiled beauty and untapped potential of their newfound home, they set out to rebuild their lives and forge a society based on principles of harmony, cooperation, and reverence for the natural world. == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == 1edcc7e8a73e307ebb36d4fe8f7d25e2787c3f7b 5732 5731 2023-06-24T05:55:29Z Tasha04 2 /* Origins */ wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on Malvounus, a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Origins === Valmore's discovery can be traced back to the tumultuous "Battle of Eternal Regrets," a devastating conflict that unfolded in the once-thriving land of Margaia. Mythic rulers, consumed by power and ambition, clashed in this momentous war, leaving Margaia and its elemental kingdoms in ruins. In the aftermath, shattered and desperate survivors yearned for a fresh start. Led by the fearless explorer Aella, they embarked on a courageous expedition in the year 15 AW (After War), venturing into uncharted waters beyond Margaia's borders. Their goal was to find a new home and rebuild their shattered lives. After enduring arduous weeks at sea, [[Aella|Aella]] and her crew were filled with awe as they stepped foot on an undiscovered land. Valmore, as it would be named, revealed itself as a lush and pristine continent, untouched by the scars of war. It became a haven of natural beauty, thriving with vibrant life and free from the corruption and violence that plagued Margaia. Valmore blossomed as a haven of unparalleled beauty with lush forests, meandering rivers, majestic mountains, and fertile valleys. Its vibrant ecosystems flourished, creating a harmonious balance between flora and fauna. In this new land, the survivors found solace, a sanctuary where the corruption and violence that plagued Margaia seemed but distant echoes of a troubled past. The arrival of the survivors marked the birth of a new era in Valmore's history. Inspired by the unspoiled beauty and untapped potential of their newfound home, they set out to rebuild their lives and forge a society based on principles of harmony, cooperation, and reverence for the natural world. == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == f11173ed46d607b5ce0dfb8ba7dd3ed3fcda33ba Test 0 775 5708 5449 2023-06-24T03:23:53Z Tasha04 2 wikitext text/x-wiki {{Infobox |title = An amazing Infobox |header1 = It works! |label2 = Configured by |data2 = trog |label3 = Web |data3 = [https://trog.qgl.org trog.qgl.org] }} 14471af9c73689c2f616f7a06c014a0b851d635e Template:Infobox 10 885 5710 5709 2023-06-24T03:46:10Z Tasha04 2 1 revision imported wikitext text/x-wiki <includeonly><onlyinclude><div style="float: right; width: 288px; margin: 0 0 0 1em;"><table style="width: 100%; padding: 0.25em; border: 2px solid #808080; text-align:left;">{{ #if:{{{header0|}}}|<tr style="background: rgba(0, 0, 0, 0.125); font-size: 1.25em; text-align:center;"><th colspan="2">{{{header0}}}</th></tr>}}{{ #if:{{{image|}}}|<tr style="text-align: center;"><td colspan="2">[[File:{{{image}}}|256px]]</td></tr>}}{{ #if:{{{header1|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header1}}}</th></tr>|{{#if:{{{key1|}}}|<tr><th>{{{key1}}}</th><td>{{{value1}}}</td></tr>}}}}{{ #if:{{{header2|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header2}}}</th></tr>|{{#if:{{{key2|}}}|<tr><th>{{{key2}}}</th><td>{{{value2}}}</td></tr>}}}}{{ #if:{{{header3|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header3}}}</th></tr>|{{#if:{{{key3|}}}|<tr><th>{{{key3}}}</th><td>{{{value3}}}</td></tr>}}}}{{ #if:{{{header4|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header4}}}</th></tr>|{{#if:{{{key4|}}}|<tr><th>{{{key4}}}</th><td>{{{value4}}}</td></tr>}}}}{{ #if:{{{header5|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header5}}}</th></tr>|{{#if:{{{key5|}}}|<tr><th>{{{key5}}}</th><td>{{{value5}}}</td></tr>}}}}{{ #if:{{{header6|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header6}}}</th></tr>|{{#if:{{{key6|}}}|<tr><th>{{{key6}}}</th><td>{{{value6}}}</td></tr>}}}}{{ #if:{{{header7|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header7}}}</th></tr>|{{#if:{{{key7|}}}|<tr><th>{{{key7}}}</th><td>{{{value7}}}</td></tr>}}}}{{ #if:{{{header8|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header8}}}</th></tr>|{{#if:{{{key8|}}}|<tr><th>{{{key8}}}</th><td>{{{value8}}}</td></tr>}}}}{{ #if:{{{header9|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header9}}}</th></tr>|{{#if:{{{key9|}}}|<tr><th>{{{key9}}}</th><td>{{{value9}}}</td></tr>}}}}{{ #if:{{{header10|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header10}}}</th></tr>|{{#if:{{{key10|}}}|<tr><th>{{{key10}}}</th><td>{{{value10}}}</td></tr>}}}}{{ #if:{{{header11|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header11}}}</th></tr>|{{#if:{{{key11|}}}|<tr><th>{{{key11}}}</th><td>{{{value11}}}</td></tr>}}}}{{ #if:{{{header12|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header12}}}</th></tr>|{{#if:{{{key12|}}}|<tr><th>{{{key12}}}</th><td>{{{value12}}}</td></tr>}}}}{{ #if:{{{header13|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header13}}}</th></tr>|{{#if:{{{key13|}}}|<tr><th>{{{key13}}}</th><td>{{{value13}}}</td></tr>}}}}{{ #if:{{{header14|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header14}}}</th></tr>|{{#if:{{{key14|}}}|<tr><th>{{{key14}}}</th><td>{{{value14}}}</td></tr>}}}}{{ #if:{{{header15|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header15}}}</th></tr>|{{#if:{{{key15|}}}|<tr><th>{{{key15}}}</th><td>{{{value15}}}</td></tr>}}}}{{ #if:{{{header16|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header16}}}</th></tr>|{{#if:{{{key16|}}}|<tr><th>{{{key16}}}</th><td>{{{value16}}}</td></tr>}}}}{{ #if:{{{header17|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header17}}}</th></tr>|{{#if:{{{key17|}}}|<tr><th>{{{key17}}}</th><td>{{{value17}}}</td></tr>}}}}{{ #if:{{{header18|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header18}}}</th></tr>|{{#if:{{{key18|}}}|<tr><th>{{{key18}}}</th><td>{{{value18}}}</td></tr>}}}}{{ #if:{{{header19|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header19}}}</th></tr>|{{#if:{{{key19|}}}|<tr><th>{{{key19}}}</th><td>{{{value19}}}</td></tr>}}}}{{ #if:{{{header20|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header20}}}</th></tr>|{{#if:{{{key20|}}}|<tr><th>{{{key20}}}</th><td>{{{value20}}}</td></tr>}}}}{{ #if:{{{header21|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header21}}}</th></tr>|{{#if:{{{key21|}}}|<tr><th>{{{key21}}}</th><td>{{{value21}}}</td></tr>}}}}{{ #if:{{{header22|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header22}}}</th></tr>|{{#if:{{{key22|}}}|<tr><th>{{{key22}}}</th><td>{{{value22}}}</td></tr>}}}}{{ #if:{{{header23|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header23}}}</th></tr>|{{#if:{{{key23|}}}|<tr><th>{{{key23}}}</th><td>{{{value23}}}</td></tr>}}}}{{ #if:{{{header24|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header24}}}</th></tr>|{{#if:{{{key24|}}}|<tr><th>{{{key24}}}</th><td>{{{value24}}}</td></tr>}}}}{{ #if:{{{header25|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header25}}}</th></tr>|{{#if:{{{key25|}}}|<tr><th>{{{key25}}}</th><td>{{{value25}}}</td></tr>}}}}{{ #if:{{{header26|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header26}}}</th></tr>|{{#if:{{{key26|}}}|<tr><th>{{{key26}}}</th><td>{{{value26}}}</td></tr>}}}}{{ #if:{{{header27|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header27}}}</th></tr>|{{#if:{{{key27|}}}|<tr><th>{{{key27}}}</th><td>{{{value27}}}</td></tr>}}}}{{ #if:{{{header28|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header28}}}</th></tr>|{{#if:{{{key28|}}}|<tr><th>{{{key28}}}</th><td>{{{value28}}}</td></tr>}}}}{{ #if:{{{header29|}}}|<tr><th colspan="2" style="background: rgba(0, 0, 0, 0.125); text-align:center;">{{{header29}}}</th></tr>|{{#if:{{{key29|}}}|<tr><th>{{{key29}}}</th><td>{{{value29}}}</td></tr>}}}} </table> {{#if:{{{footnote|}}}|<div style="text-align: right; font-size: 0.75em;">{{{footnote}}}</div>}} </div></onlyinclude></includeonly> General purpose Infobox, can be used as a base for other Infobox Templates or custom Infoboxes which Template existence is not justified. == Usage == An Infobox consists of a title, an image, and the data in a key-value form, which may also be organized with headers. There can also be a footnote. Everything is optional, but if a key if used, its value must also be set. Setting a value without its key will do nothing. The title is set with the <code>header0</code> parameter and the image with the <code>image</code> parameter, which value must be the file name of an existing image (without <code>File:</code> prefix). 29 fields/headers are available for the data. Headers can be set with <code>header1</code>, <code>header2</code>, ..., <code>header29</code> while data are set with <code>key1</code> and its respective <code>value1</code>, up to <code>key29</code>/<code>value29</code>. The lines will be presented from top to bottom as the number increase, and it is not necessary to use consecutive numbers. The use of a given header will disable its corresponding key/value, so if <code>header10</code> was used, then <code>key10</code> and <code>value10</code> will do nothing. A footnote can be provided with the <code>footnote</code> parameter. == Examples == {|style="width: 100%; background: none;" |{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key3 = key3 |value3 = value3 |header4 = header4 |key5 = key5 |value5 = value5 |key6 = key6 |value6 = value6 |key7 = key7 |value7 = value7 }} <nowiki>{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key3 = key3 |value3 = value3 |header4 = header4 |key5 = key5 |value5 = value5 |key6 = key6 |value6 = value6 |key7 = key7 |value7 = value7 }}</nowiki> |- |{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key5 = key5 |value5 = value5 |header10 = header10 |key11 = key11 |value11 = value11 |key13 = key13 |value13 = value13 |key17 = key17 |value17 = value17 }} Numbers do not have to be contiguous, this may be useful for future proofing, for example if one desires to add something between 2 and 5 with key3/value3 later without having to change 5, 10, 11, 13 and 17. <nowiki>{{Infobox |header0 = header0 |image = No image.png |header1 = header1 |key2 = key2 |value2 = value2 |key5 = key5 |value5 = value5 |header10 = header10 |key11 = key11 |value11 = value11 |key13 = key13 |value13 = value13 |key17 = key17 |value17 = value17 }}</nowiki> |- |{{Infobox |header0 = header0 |key1 = key1 |value1 = value1 |key2 = key2 |value2 = value2 |footnote = [[Template:Infobox|How to make your own Infobox]] }} <nowiki>{{Infobox |header0 = header0 |key1 = key1 |value1 = value1 |key2 = key2 |value2 = value2 |footnote = [[Template:Infobox|How to make your own Infobox]] }}</nowiki> |} d7d59541db85562f457c114d853d32fccfb54dc3 Template:Infobox Universe 10 886 5712 5711 2023-06-24T03:46:27Z Tasha04 2 1 revision imported wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = [[:Category:Universes|Universe]] |image = {{{logo|}}} |key2 = Name |value2 = {{{name}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{author|}}}|Author(s)}} |value4 = {{{author|}}} |key5 = {{#if:{{{activity|}}}|Activity}} |value5 = {{{activity|}}} |key6 = {{#if:{{{published|}}}|Published}} |value6 = {{{published|}}} |key7 = {{#if:{{{status|}}}|Status}} |value7 = {{{status|}}} |footnote = [[Template:Infobox Universe|How to make your own Universe Infobox]] }}</onlyinclude></includeonly> Infobox for OS-tan Universes. == General Template == Everything is optional except the name. <nowiki>{{Infobox Universe |logo = Universe Logo.png |name = Universe name |alias = Aliases (shortened form,...) |author = Who worked on the Universe |activity = Period during which the Universe was worked on (the time before publication can be counted) |published = When the work was first published or available to the public |status = The status of the work }}</nowiki> == Examples == {|style="width: 100%; background: none;" |{{Infobox Universe |logo = Mona's Museum Logo.png |name = Mona's Museum |author = [[User:Pttn|Pttn]] |activity = 2023-present |published = 2023 |status = Very early work in progress }} <nowiki>{{Infobox Universe |logo = Mona's Museum Logo.png |name = Mona's Museum |author = [[User:Pttn|Pttn]] |activity = 2023-present |published = 2023 |status = Very early work in progress }}</nowiki> |- |{{Infobox Universe |logo = UNIVER.SYS Logo.png |name = UNIVER.SYS |author = [[User:SpacePuffer|SpacePuffer]] |activity = 2019-present |published = 2023-04-04 (on the Wiki) }} <nowiki>{{Infobox Universe |logo = UNIVER.SYS Logo.png |name = UNIVER.SYS |author = [[User:SpacePuffer|SpacePuffer]] |activity = 2019-present |published = 2023-04-04 (on the Wiki) }}</nowiki> |- |{{Infobox Universe |logo = WNRUniverse Logo .png |name = Windows Never Released Universe |alias = WNR Universe, Windows Never Released |author = [[User:VistaIroha|VistaIroha]] |published = 2023-02-19 }} <nowiki>{{Infobox Universe |logo = WNRUniverse Logo .png |name = Windows Never Released Universe |alias = WNR Universe, Windows Never Released |author = [[User:VistaIroha|VistaIroha]] |published = 2023-02-19 }}</nowiki> |} a2b6a8bc9f46f293755c603ba21436ffcfc57f54 Template:Infobox Organization 10 887 5714 5713 2023-06-24T03:46:36Z Tasha04 2 1 revision imported wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = {{{type|}}} |image = {{{image|}}} |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{universe|}}}|Universe}} |value4 = {{{universe|}}} |key5 = {{#if:{{{inspiration|}}}|Inspired by}} |value5 = {{{inspiration|}}} |key6 = {{#if:{{{founded|}}}|Founded}} |value6 = {{{founded|}}} |key7 = {{#if:{{{founder|}}}|Founder(s)}} |value7 = {{{founder|}}} |key8 = {{#if:{{{keypeople|}}}|Key People}} |value8 = {{{keypeople|}}} |key9 = {{#if:{{{defunct|}}}|Defunct}} |value9 = {{{defunct|}}} |key10 = {{#if:{{{fate|}}}|Fate}} |value10 = {{{fate|}}} |footnote = [[Template:Infobox Organization|How to make your own Organization Infobox]] }}</onlyinclude></includeonly> Infobox for organizations or groups, which may be real. == General Template == If not applicable, then simply completely remove a line (don't keep it with something like N/A). The image can be a logo, or a picture of something like the headquarters or key people. If both are available, the convention, which is optional to follow for Original Content, is to put the latter here, and the logo somewhere else in the article. <nowiki>{{Infobox Organization |type = Type of Organization (company, faction...) |image = Image for your Organization.png |fullname = Full Organization name |alias = Aliases (nicknames,...) |universe = For fictional Organizations, which Universe it belongs to |inspiration = From which real or fictional organization this one is inspired by, if not purely original and not real |founded = When the Organization's was founded. If it is a date, its format should be one of "YYYY", "YYYY-MM", or "YYYY-MM-DD". Or it could be something like "xx years before the story's events". |founder = Who founded the Organization |keypeople = Important people of the Organization (like a Ceo, etc.) |defunct = If applicable, when the Organization's was disbanded, bought by another, etc. If it is a date, the format should be one of "YYYY", "YYYY-MM", or "YYYY-MM-DD". Or it could be something like "xx years before the story's event". |fate = You can add details about what happened if the organization is defunct. }}</nowiki> == Examples == {|style="width: 100%; background: none;" |{{Infobox Organization |type = Company |fullname = Microsoft Corporation |alias = Microsoft, MS, M$ |founded = 1975-04-04 |founder = Bill Gates, Paul Allen |keypeople = Satya Nadella (current CEO) }} <nowiki>{{Infobox Organization |type = Company |fullname = Microsoft Corporation |alias = Microsoft, MS, M$ |founded = 1975-04-04 |founder = Bill Gates, Paul Allen |keypeople = Satya Nadella (current CEO) }}</nowiki> |- |{{Infobox Organization |type = Faction |fullname = The Infinite Loop |universe = [[The Mainframe]] |founded = 1993 |founder = Apple I-tan |keypeople = macOS Ventura-kun (leader), Apple Inc. (owner) }} <nowiki>{{Infobox Organization |type = Faction |fullname = The Infinite Loop |universe = [[The Mainframe]] |founded = 1993 |founder = Apple I-tan |keypeople = macOS Ventura-kun (leader), Apple Inc. (owner) }}</nowiki> |- |{{Infobox Organization |type = Ensemble |fullname = Logiciel Technologies |universe = [[UNIVER.SYS]] |inspiration = Microsoft Corporation }} <nowiki>{{Infobox Organization |type = Ensemble |fullname = Logiciel Technologies |universe = [[UNIVER.SYS]] |inspiration = Microsoft Corporation }}</nowiki> |} 5c8f92b06bf3e48e7d24fad90cca3d324cbcf156 Template:Infobox Character 10 888 5716 5715 2023-06-24T03:46:43Z Tasha04 2 1 revision imported wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = {{{type|}}} |image = {{{image|}}} |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{born|}}}|Born|{{#if:{{{birthday|}}}|Birthday}}}} |value4 = {{#if:{{{born|}}}|{{{born}}}|{{#if:{{{birthday|}}}|{{{birthday}}}}}}} |key5 = {{#if:{{{pronouns|}}}|Pronouns}} |value5 = {{{pronouns|}}} |key6 = {{#if:{{{universe|}}}|Universe/Origin}} |value6 = {{{universe|}}} |key7 = {{#if:{{{designer|}}}|Designer}} |value7 = {{{designer|}}} |key8 = {{#if:{{{inspiration|}}}|Inspired by}} |value8 = {{{inspiration|}}} |key9 = {{#if:{{{debut|}}}|Debut}} |value9 = {{{debut|}}} |header10 = {{#if:{{{personification|}}}|Personification}} |key11 = {{#if:{{{personification|}}}|Personifies}} |value11 = {{{personification|}}} |key12 = {{#if:{{{developer|}}}|Developer}} |value12 = {{{developer|}}} |key13 = {{#if:{{{owner|}}}|Owner}} |value13 = {{{owner|}}} |header20 = {{#if:{{{measurements|{{{haircolor|{{{eyecolor|}}}}}}}}}|Appearance}} |key21 = {{#if:{{{measurements|}}}|Measurements|{{#if:{{{height|}}}|Height}}}} |value21 = {{#if:{{{measurements|}}}|{{{measurements}}}|{{#if:{{{height|}}}|{{{height}}}}}}} |key22 = {{#if:{{{haircolor|}}}|Hair Color}} |value22 = {{{haircolor|}}} |key23 = {{#if:{{{eyecolor|}}}|Eye Color}} |value23 = {{{eyecolor|}}} |header25 = {{#if:{{{affiliation|{{{customkey1|{{{customkey2|{{{customkey3|}}}}}}}}}}}}|Other Information}} |key26 = {{#if:{{{affiliation|}}}|Affiliation}} |value26 = {{{affiliation|}}} |key27 = {{{customkey1|}}} |value27 = {{{customvalue1|}}} |key28 = {{{customkey2|}}} |value28 = {{{customvalue2|}}} |key29 = {{{customkey3|}}} |value29 = {{{customvalue3|}}} |footnote = [[Template:Infobox Character|How to make your own Character Infobox]] }}</onlyinclude></includeonly> Infobox for characters, also suitable for User Pages (humoristically treating Real Life like any Universe on the Wiki). == General Template == If not applicable or redundant (like don't fill both measurements and height), then simply completely remove a line (don't keep it with something like N/A). <nowiki>{{Infobox Character |type = Type of character (OS-tan, OS-kun, App-tan,...) |image = Image of your character.png |fullname = Full character name |alias = Aliases (nicknames,...) |born = Character's Date of Birth. The format should be "YYYY-MM-DD". |birthday = Character's Birthday if indeterminate year (do not use both born and birthday). The format should be "Month Day". |pronouns = The pronouns to use to refer to this character |universe = Character's origin/which universe it belongs |designer = Who designed/created the character |inspiration = From which character this one is inspired, if not purely original |debut = When the character was first published, in the YYYY-MM-DD format |personification = What this character personifies |developer = Who develops what is personified (in case it is a software personification) |owner = Who owns what is personified (in case it is something like a company personification) |measurements = Character's height and weight |height = Character's height if weight not known |haircolor = Character's Hair Color |eyecolor = Character's Eye Color |affiliation = To which group/organization this character might belong to or be affiliated with, if any |customkey1 = Custom Key 1 (use these to create fields not proposed by the Template, it could be something like Friends/Family, Likes/Dislikes,...) |customvalue1 = Custom Value 1 |customkey2 = Custom Key 2 |customvalue2 = Custom Value 2 |customkey3 = Custom Key 3 |customvalue3 = Custom Value 3 }}</nowiki> == Examples == {|style="width: 100%; background: none;" |{{Infobox Character |type = [[:Category:Site personifications|Site-tan]] |image = Mona Cropped.png |fullname = Mona |birthday = October 29 |universe = [[Mona's Museum]] |designer = [[User:Pttn|Pttn]] |debut = 2022-12-29 |personification = OS-tans.moe |measurements = 164 cm, 58 kg |haircolor = Light Brown |eyecolor = Light Brown |affiliation = [[Mona's Museum (location)|Mona's Museum]] |customkey1 = Occupation |customvalue1 = IT Museum Curator }} <nowiki>{{Infobox Character |type = [[:Category:Site personifications|Site-tan]] |image = Mona Cropped.png |fullname = Mona |birthday = October 29 |universe = [[Mona's Museum]] |designer = [[User:Pttn|Pttn]] |debut = 2022-12-29 |personification = OS-tans.moe |measurements = 164 cm, 58 kg |haircolor = Light Brown |eyecolor = Light Brown |affiliation = [[Mona's Museum (location)|Mona's Museum]] |customkey1 = Occupation |customvalue1 = IT Museum Curator }}</nowiki> |- |{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Nanami_Madobe_Cropped.png |fullname = Nanami Madobe |universe = [[:Category:Madobe Universe|Madobe Universe]] |designer = [[Wakaba]] |debut = 2009-09-14 |personification = [[Windows 7]] |developer = [[Microsoft]] |haircolor = Blue |eyecolor = Blue, with rainbow reflect }} <nowiki>{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Nanami_Madobe_Cropped.png |fullname = Nanami Madobe |universe = [[:Category:Madobe Universe|Madobe Universe]] |designer = [[Wakaba]] |debut = 2009-09-14 |personification = [[Windows 7]] |developer = [[Microsoft]] |haircolor = Blue |eyecolor = Blue, with rainbow reflect }}</nowiki> |- |{{Infobox Character |type = Phone-tan |image = Jasper Ive.jpg |fullname = Jasper Ive |universe = [[The Mainframe]] |designer = [[User:Sinclair-Speccy|Sinclair-Speccy]] |debut = 2019 |personification = iPhone 3G and 3GS |owner = Apple |height = 127 cm (4 ft 2 in) |haircolor = Black |eyecolor = Purple }} <nowiki>{{Infobox Character |type = [[:Category:Hardware personifications|Phone-tan]] |image = Jasper Ive.jpg |fullname = Jasper Ive |universe = [[The Mainframe]] |designer = [[User:Sinclair-Speccy|Sinclair-Speccy]] |debut = 2019 |personification = iPhone 3G and 3GS |owner = Apple |height = 127 cm (4 ft 2 in) |haircolor = Black |eyecolor = Purple }}</nowiki> |- |{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Win9.png |fullname = Kyuubi Madobe |universe = [[Very troubl'd winbows, macks & lintux]] |designer = [[User:Francispwn|Francispwn]] |personification = [[Windows 9]] |developer = Microshaft Corporation |height = 9'0 |haircolor = Light Blue |eyecolor = Blue }} <nowiki>{{Infobox Character |type = [[:Category:OS personifications|OS-tan]] |image = Win9.png |fullname = Kyuubi Madobe |universe = [[Very troubl'd winbows, macks & lintux]] |designer = [[User:Francispwn|Francispwn]] |personification = [[Windows 9]] |developer = Microshaft Corporation |height = 9'0 |haircolor = Light Blue |eyecolor = Blue }}</nowiki> |} 886ff6c3aada70866495effc12e45cf69d2f127a Template:Infobox continent 10 889 5717 2023-06-24T03:53:42Z Tasha04 2 Created page with "<includeonly><onlyinclude>{{Infobox |header0 = {{{name|}}} |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}}..." wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = {{{name|}}} |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }}</onlyinclude></includeonly> b72875a319004db717254faeb9e2938554f8a81b 5718 5717 2023-06-24T03:54:32Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = Place |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} a09e52c0d8fffb42fe7cbefa9c6171774fdb0697 5719 5718 2023-06-24T03:56:23Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}} |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} 0abadba66ad85ffca7a31a7db04cc018c0e9880e 5720 5719 2023-06-24T03:56:35Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}} |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} 4359db668936e14e0419b4c64fd2bc04be466564 5721 5720 2023-06-24T03:56:45Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}} |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} 0abadba66ad85ffca7a31a7db04cc018c0e9880e 5722 5721 2023-06-24T03:59:39Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = Place name shit here |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} d92b0533e9855ff0940d4b2d406649dcccbad79d 5723 5722 2023-06-24T04:00:18Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{#if:{{{title|}}}|Title}} |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} 48753697cbd963fbf986200fedabe5f359ef1bdf 5724 5723 2023-06-24T04:00:47Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{#if:{{{title|}}}|Title}}{{{title|}}} |image = {{{image|}}} |header1 = Information |key2 = {{#if:{{{title|}}}|Title}} |value2 = {{{title|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} 0a4ae7ac1ebeede290cb86e1b6e109eb4c72561f 5725 5724 2023-06-24T04:03:37Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{type|}}} |image = {{{image|}}} |header1 = Information |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} 652915fb2d247d1a576b8ca57e9f3655ac611204 5726 5725 2023-06-24T04:06:00Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} }} 2bee4fd43fc49d428029f1a114fb6ce1bef28aab Template:Infobox character 10 890 5733 2023-06-24T06:11:11Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title} |value5 = {{{title|}}} |key6 = {{#if:{{{species|}}}|Species}} |value6 = {{{species|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |v..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title} |value5 = {{{title|}}} |key6 = {{#if:{{{species|}}}|Species}} |value6 = {{{species|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} cd9f287d57dac3bb52b46c643225b1cb25fec9dd 5743 5733 2023-06-24T14:48:55Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title}} |value5 = {{{title|}}} |key6 = {{#if:{{{species|}}}|Species}} |value6 = {{{species|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} 48206d1e8869f0bb3b2a6f746a46d9bfb1ed807f Template:Infobox human 10 891 5735 2023-06-24T08:59:21Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title} |value5 = {{{title|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title} |value5 = {{{title|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} 1213b9ba03a9d41a8722a392dde69a971172dfa3 5736 5735 2023-06-24T09:06:52Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title} |value5 = {{{title|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} a4288cd0aafa4f2309d75c2bc462c57e747af914 5737 5736 2023-06-24T09:07:24Z Tasha04 2 wikitext text/x-wiki {{Infobox |image = {{{image|}}} |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title} |value5 = {{{title|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} 9d848a5a7c5860d872905a3102b302eb86f8fb69 5738 5737 2023-06-24T09:22:12Z Tasha04 2 wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = {{{type|}}} |image = {{{image|}}} |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{title|}}}|Title} |value4 = {{{title|}}} |key5 = {{#if:{{{occupation|}}}|Occupation}} |value5 = {{{occupation|}}} |key6 = {{#if:{{{affiliation|}}}|Affiliation}} |value6 = {{{affiliation|}}} |key7 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value7 = {{{weapon|}}} |key8 = {{#if:{{{family|}}}|Family}} |value8 = {{{family|}}}} |key9 = {{#if:{{{religion|}}}|Religion}} |value9 = {{{religion|}}} |key11 = {{#if:{{{origin|}}}|Origin}} |value11 = {{{origin|}}} }}</onlyinclude></includeonly> b94106fd247e0ea6676a61004ae92db1a6fc7405 5739 5738 2023-06-24T09:24:36Z Tasha04 2 wikitext text/x-wiki <includeonly><onlyinclude>{{Infobox |header0 = {{{type|}}} |image = {{{image|}}} |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key3 = {{#if:{{{alias|}}}|Alias}} |value3 = {{{alias|}}} |key4 = {{#if:{{{title|}}}|Title} |value4 = {{{title|}}} |key5 = {{#if:{{{occupation|}}}|Occupation}} |value5 = {{{occupation|}}} |key6 = {{#if:{{{affiliation|}}}|Affiliation}} |value6 = {{{affiliation|}}} |key7 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value7 = {{{weapon|}}} |key8 = {{#if:{{{family|}}}|Family}} |value8 = {{{family|}}}} |key9 = {{#if:{{{religion|}}}|Religion}} |value9 = {{{religion|}}} |key10 = {{#if:{{{origin|}}}|Origin}} |value10 = {{{origin|}}} }}</onlyinclude></includeonly> 8f6da6303cf82ef5bd7fa8bcb2f0afbb3866348b 5741 5739 2023-06-24T09:54:16Z Tasha04 2 wikitext text/x-wiki |{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = No image.png |header1 = header1 |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key17 = {{#if:{{{affiliation|}}}|Affiliation}} |value17 = {{{affiliation|}}} |key8 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value8 = {{{weapon|}}} }} 27d36ee9dc89b44defa0c15f4124cff7cccf7cc9 5742 5741 2023-06-24T09:55:36Z Tasha04 2 wikitext text/x-wiki |{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = No image.png |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key17 = {{#if:{{{affiliation|}}}|Affiliation}} |value17 = {{{affiliation|}}} |key8 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value8 = {{{weapon|}}} }} 58d1ca5b7d456d1552a6d3532f18648e107d6598 5749 5742 2023-06-25T00:17:01Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = No image.png |header1 = General Information |key2 = {{#if:{{{fullname|}}}|Full Name}} |value2 = {{{fullname|}}} |key17 = {{#if:{{{affiliation|}}}|Affiliation}} |value17 = {{{affiliation|}}} |key8 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value8 = {{{weapon|}}} }} 748d0e83453ecd8ee66afcd4fee6880a9d353a15 5750 5749 2023-06-25T00:18:00Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title}} |value5 = {{{title|}}} |key6 = {{#if:{{{species|}}}|Species}} |value6 = {{{species|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} 48206d1e8869f0bb3b2a6f746a46d9bfb1ed807f 5752 5750 2023-06-25T00:22:59Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} {{#if:{{{title|}}}|{{!}}-{{!}}key0{{!}}value0={{!}}Title{{!}}{{{title|}}}}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title}} |value5 = {{{title|}}} |key6 = {{#if:{{{species|}}}|Species}} |value6 = {{{species|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} e22e2c546ab6dc884ac4487ac97f4cc30570022a 5753 5752 2023-06-25T00:28:10Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{fullname|{{PAGENAME}}}}} |image = {{{image|}}} {{#if:{{{title|}}}|{{!}}-{{!}}key0{{!}}value0={{!}}{{{key0|Title}}}{{!}}{{{value0|{{{title|}}}}}}}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title}} |value5 = {{{title|}}} |key6 = {{#if:{{{species|}}}|Species}} |value6 = {{{species|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} 62aebd5011484d02ed94b6edb08b371c0e7976e1 5754 5753 2023-06-25T00:28:29Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{fullname|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{title|}}}|Title}} |value5 = {{{title|}}} |key6 = {{#if:{{{species|}}}|Species}} |value6 = {{{species|}}} |key7 = {{#if:{{{occupation|}}}|Occupation}} |value7 = {{{occupation|}}} |key8 = {{#if:{{{affiliation|}}}|Affiliation}} |value8 = {{{affiliation|}}} |key9 = {{#if:{{{weapon|}}}|Weapon/Powers}} |value9 = {{{weapon|}}} |key10 = {{#if:{{{family|}}}|Family}} |value10 = {{{family|}}} |key11 = {{#if:{{{religion|}}}|Religion}} |value11 = {{{religion|}}} |key12 = {{#if:{{{origin|}}}|Origin}} |value12 = {{{origin|}}} }} 3c16b1704a7321ffee86ffabe529f6cf11737632 Docarus 0 892 5740 2023-06-24T09:39:39Z Tasha04 2 Created page with "{{Infobox continent | title = Docarus | area = ??? | population = ??? | ethnicgroups = ??? | religions = ??? | demonym = Docaard | countries = ??? | languages = ??? }} Docarus, one of the five continents on the planet Malvounus, stands as a mysterious and distant land in the expansive Eusebeia Nebula system. Secluded and far removed from the other four continents, Docarus remains shrouded in intrigue and largely unknown to the majority of inhabitants in this realm. Its..." wikitext text/x-wiki {{Infobox continent | title = Docarus | area = ??? | population = ??? | ethnicgroups = ??? | religions = ??? | demonym = Docaard | countries = ??? | languages = ??? }} Docarus, one of the five continents on the planet Malvounus, stands as a mysterious and distant land in the expansive Eusebeia Nebula system. Secluded and far removed from the other four continents, Docarus remains shrouded in intrigue and largely unknown to the majority of inhabitants in this realm. Its remoteness adds to its enigmatic allure, making it a realm of unexplored wonders and untold secrets. == History == === Origins === Ancient legends and whispered tales speak of Docarus as a realm untouched by the conflicts and turmoil that have shaped the other continents. It is said that Docarus served as a sanctuary for those seeking solace and refuge from the chaotic events that unfolded across the planet. The exact origins of Docarus remain veiled in uncertainty, with no definitive records or accounts of its founding. Some believe that it emerged spontaneously, a natural creation of the planet's evolving landscape. Others speculate that it was shaped by mystical forces or the careful intrigues of ancient beings. == Enviroment == == Demographics == 823558a533ad4ce88ae1047a80ddec40ca693f30 Template:Infobox kingdom 10 893 5744 2023-06-24T14:54:07Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{ruler|}}}|Ruler}} |value5 = {{{ruler|}}} |key6 = {{#if:{{{citizens|}}}|Citizens}} |value6 = {{{citizens|}}} |key7 = {{#if:{{{capital|}}}|Capital..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{ruler|}}}|Ruler}} |value5 = {{{ruler|}}} |key6 = {{#if:{{{citizens|}}}|Citizens}} |value6 = {{{citizens|}}} |key7 = {{#if:{{{capital|}}}|Capital}} |value7 = {{{capital|}}} |key8 = {{#if:{{{location|}}}|Location}} |value8 = {{{location|}}} |key9 = {{#if:{{{element|}}}|Element}} |value9 = {{{element|}}} |key10 = {{#if:{{{government|}}}|Government}} |value10 = {{{government|}}} |key11 = {{#if:{{{army|}}}|Army}} |value11 = {{{army|}}} |key12 = {{#if:{{{founding_date|}}}|Founding date}} |value12 = {{{founding_date|}}} |key13 = {{#if:{{{allies|}}}|Allies}} |value13 = {{{allies|}}} |key14 = {{#if:{{{enemies|}}}|Enemies}} |value14 = {{{enemies|}}} |key15 = {{#if:{{{notable_people|}}}|Notable people}} |value15 = {{{notable_people|}}} }} dba271ca01c58a04325f4edf6a95732deca841e3 Template:Infobox artifact 10 894 5745 2023-06-24T14:57:57Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{origin|}}}|Origin}} |value6 = {{{origin|}}} |key7 = {{#if:{{{element|}}}|Element}} |value..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{origin|}}}|Origin}} |value6 = {{{origin|}}} |key7 = {{#if:{{{element|}}}|Element}} |value7 = {{{element|}}} |key8 = {{#if:{{{powers|}}}|Powers}} |value8 = {{{powers|}}} |key9 = {{#if:{{{creator|}}}|Creator}} |value9 = {{{creator|}}} |key10 = {{#if:{{{affiliation|}}}|Affiliation}} |value10 = {{{affiliation|}}} |key11 = {{#if:{{{status|}}}|Status}} |value11 = {{{status|}}} |key12 = {{#if:{{{owners|}}}|Owners}} |value12 = {{{owners|}}} }} 45d04b4a79c74b71e41801d600267b6866259be3 Template:Infobox location 10 895 5746 2023-06-24T15:00:13Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{location|}}}|Location}} |value6 = {{{location|}}} |key7 = {{#if:{{{terrain|}}}|Terrain}}..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{location|}}}|Location}} |value6 = {{{location|}}} |key7 = {{#if:{{{terrain|}}}|Terrain}} |value7 = {{{terrain|}}} |key8 = {{#if:{{{climate|}}}|Climate}} |value8 = {{{climate|}}} |key9 = {{#if:{{{population|}}}|Population}} |value9 = {{{population|}}} |key10 = {{#if:{{{ruler|}}}|Ruler}} |value10 = {{{ruler|}}} |key11 = {{#if:{{{inhabitants|}}}|Inhabitants}} |value11 = {{{inhabitants|}}} |key12 = {{#if:{{{established|}}}|Established}} |value12 = {{{established|}}} |key13 = {{#if:{{{landmarks|}}}|Landmarks}} |value13 = {{{landmarks|}}} }} b6ae6582dcbb9402e390cdd5a45b09f33f518311 Template:Infobox art 10 896 5747 2023-06-24T15:02:05Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{artist|}}}|Artist}} |value3 = {{{artist|}}} |key4 = {{#if:{{{year|}}}|Year}} |value4 = {{{year|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{medium|}}}|Medium}} |value6 = {{{medium|}}} |key7 = {{#if:{{{dimensions|}}}|Dimensions}} |value7..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{artist|}}}|Artist}} |value3 = {{{artist|}}} |key4 = {{#if:{{{year|}}}|Year}} |value4 = {{{year|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{medium|}}}|Medium}} |value6 = {{{medium|}}} |key7 = {{#if:{{{dimensions|}}}|Dimensions}} |value7 = {{{dimensions|}}} |key8 = {{#if:{{{location|}}}|Location}} |value8 = {{{location|}}} |key9 = {{#if:{{{owner|}}}|Owner}} |value9 = {{{owner|}}} }} 760ea12bef78180df0cd5d551ef1982b9b6dbfd2 Template:Infobox element 10 897 5748 2023-06-24T15:03:52Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{symbol|}}}|Symbol}} |value3 = {{{symbol|}}} |key4 = {{#if:{{{element_type|}}}|Element type}} |value4 = {{{element_type|}}} |key5 = {{#if:{{{associated_realm|}}}|Associated realm}} |value5 = {{{associated_realm|}}} |key6 = {{#if:{{{associated_traits|}}}|Associated traits}} |value6 =..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{symbol|}}}|Symbol}} |value3 = {{{symbol|}}} |key4 = {{#if:{{{element_type|}}}|Element type}} |value4 = {{{element_type|}}} |key5 = {{#if:{{{associated_realm|}}}|Associated realm}} |value5 = {{{associated_realm|}}} |key6 = {{#if:{{{associated_traits|}}}|Associated traits}} |value6 = {{{associated_traits|}}} |key7 = {{#if:{{{strengths|}}}|Strengths}} |value7 = {{{strengths|}}} |key8 = {{#if:{{{weaknesses|}}}|Weaknesses}} |value8 = {{{weaknesses|}}} |key9 = {{#if:{{{representatives|}}}|Representatives}} |value9 = {{{representatives|}}} }} 3fdb7f7cd35c0e81cfb49b9299d1b5f8eca141b4 Aella 0 898 5751 2023-06-25T00:21:46Z Tasha04 2 Created page with "{{Infobox human | header0 = {{{PAGENAME|{{PAGENAME}}}}} | image = {{{image|}}} | fullname = a | alias = b | title = c | species = d | occupation = f | affiliation = g | weapons = h | family = j | religion = h | origin = a }}" wikitext text/x-wiki {{Infobox human | header0 = {{{PAGENAME|{{PAGENAME}}}}} | image = {{{image|}}} | fullname = a | alias = b | title = c | species = d | occupation = f | affiliation = g | weapons = h | family = j | religion = h | origin = a }} 8278e394df903bab928f758f4e703ea8ba944803 Template:Infobox art 10 896 5755 5747 2023-06-25T00:31:20Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{artwork_name|{{PAGENAME}}}}} |image = {{{image|}}} |key1 = {{#if:{{{artwork_name|}}}|Artwork Name}} |value1 = {{{artwork_name|}}} |key3 = {{#if:{{{artist|}}}|Artist}} |value3 = {{{artist|}}} |key4 = {{#if:{{{year|}}}|Year}} |value4 = {{{year|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{medium|}}}|Medium}} |value6 = {{{medium|}}} |key7 = {{#if:{{{dimensions|}}}|Dimensions}} |value7 = {{{dimensions|}}} |key8 = {{#if:{{{location|}}}|Location}} |value8 = {{{location|}}} |key9 = {{#if:{{{owner|}}}|Owner}} |value9 = {{{owner|}}} }} 5b58f3aef04fdbe4aba065a7d8435b34f7b25bc4 Template:Infobox artifact 10 894 5756 5745 2023-06-25T00:31:22Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{fullname|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{origin|}}}|Origin}} |value6 = {{{origin|}}} |key7 = {{#if:{{{element|}}}|Element}} |value7 = {{{element|}}} |key8 = {{#if:{{{powers|}}}|Powers}} |value8 = {{{powers|}}} |key9 = {{#if:{{{creator|}}}|Creator}} |value9 = {{{creator|}}} |key10 = {{#if:{{{affiliation|}}}|Affiliation}} |value10 = {{{affiliation|}}} |key11 = {{#if:{{{status|}}}|Status}} |value11 = {{{status|}}} |key12 = {{#if:{{{owners|}}}|Owners}} |value12 = {{{owners|}}} }} 8a59cfebbb91110338502957da2f670031f702db Template:Infobox element 10 897 5757 5748 2023-06-25T00:31:24Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{element_type|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{symbol|}}}|Symbol}} |value3 = {{{symbol|}}} |key4 = {{#if:{{{element_type|}}}|Element type}} |value4 = {{{element_type|}}} |key5 = {{#if:{{{associated_realm|}}}|Associated realm}} |value5 = {{{associated_realm|}}} |key6 = {{#if:{{{associated_traits|}}}|Associated traits}} |value6 = {{{associated_traits|}}} |key7 = {{#if:{{{strengths|}}}|Strengths}} |value7 = {{{strengths|}}} |key8 = {{#if:{{{weaknesses|}}}|Weaknesses}} |value8 = {{{weaknesses|}}} |key9 = {{#if:{{{representatives|}}}|Representatives}} |value9 = {{{representatives|}}} }} 3a85a8926aef528be10bf0e61b71bf53420ae053 5764 5757 2023-06-25T00:51:12Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{element_type|{{PAGENAME}}}}} |image = {{{image|}}} |key4 = {{#if:{{{element_type|}}}|Element type}} |value4 = {{{element_type|}}} |key5 = {{#if:{{{associated_realm|}}}|Associated realm}} |value5 = {{{associated_realm|}}} |key6 = {{#if:{{{associated_traits|}}}|Associated traits}} |value6 = {{{associated_traits|}}} |key7 = {{#if:{{{strengths|}}}|Strengths}} |value7 = {{{strengths|}}} |key8 = {{#if:{{{weaknesses|}}}|Weaknesses}} |value8 = {{{weaknesses|}}} |key9 = {{#if:{{{representatives|}}}|Representatives}} |value9 = {{{representatives|}}} }} fdb265640d0820f7b84934febf7a49af6fe7fd56 Template:Infobox kingdom 10 893 5758 5744 2023-06-25T00:31:25Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{fullname|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{ruler|}}}|Ruler}} |value5 = {{{ruler|}}} |key6 = {{#if:{{{citizens|}}}|Citizens}} |value6 = {{{citizens|}}} |key7 = {{#if:{{{capital|}}}|Capital}} |value7 = {{{capital|}}} |key8 = {{#if:{{{location|}}}|Location}} |value8 = {{{location|}}} |key9 = {{#if:{{{element|}}}|Element}} |value9 = {{{element|}}} |key10 = {{#if:{{{government|}}}|Government}} |value10 = {{{government|}}} |key11 = {{#if:{{{army|}}}|Army}} |value11 = {{{army|}}} |key12 = {{#if:{{{founding_date|}}}|Founding date}} |value12 = {{{founding_date|}}} |key13 = {{#if:{{{allies|}}}|Allies}} |value13 = {{{allies|}}} |key14 = {{#if:{{{enemies|}}}|Enemies}} |value14 = {{{enemies|}}} |key15 = {{#if:{{{notable_people|}}}|Notable people}} |value15 = {{{notable_people|}}} }} 6a5576c9d699b441617b218da6923e5947cb73a2 Template:Infobox location 10 895 5759 5746 2023-06-25T00:31:28Z Tasha04 2 wikitext text/x-wiki {{Infobox |header0 = {{{fullname|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{fullname|}}}|Full name}} |value3 = {{{fullname|}}} |key4 = {{#if:{{{alias|}}}|Alias}} |value4 = {{{alias|}}} |key5 = {{#if:{{{type|}}}|Type}} |value5 = {{{type|}}} |key6 = {{#if:{{{location|}}}|Location}} |value6 = {{{location|}}} |key7 = {{#if:{{{terrain|}}}|Terrain}} |value7 = {{{terrain|}}} |key8 = {{#if:{{{climate|}}}|Climate}} |value8 = {{{climate|}}} |key9 = {{#if:{{{population|}}}|Population}} |value9 = {{{population|}}} |key10 = {{#if:{{{ruler|}}}|Ruler}} |value10 = {{{ruler|}}} |key11 = {{#if:{{{inhabitants|}}}|Inhabitants}} |value11 = {{{inhabitants|}}} |key12 = {{#if:{{{established|}}}|Established}} |value12 = {{{established|}}} |key13 = {{#if:{{{landmarks|}}}|Landmarks}} |value13 = {{{landmarks|}}} }} b403cd080e4f3195c9baddfd26718bf325a6faea Aella 0 898 5760 5751 2023-06-25T00:37:14Z Tasha04 2 wikitext text/x-wiki {{Infobox human | header0 = | image = | fullname = Aella | alias = None | title = None | species = Human | occupation = Adventurer, Explorer | affiliation = Independent | weapons = Dagger | family = Unknown | religion = Unknown | origin = Margaia }} a610052b381beb690d5e08f478dd6ab6da6d0a5e Margaia 0 899 5761 2023-06-25T00:41:43Z Tasha04 2 Created page with "{{Infobox continent | title = Margaia | area = ??? | population = ??? | ethnicgroups = Various | religions = Various | demonym = | countries = | languages = Various }} == History == === Origins === == Enviroment == == Demographics ==" wikitext text/x-wiki {{Infobox continent | title = Margaia | area = ??? | population = ??? | ethnicgroups = Various | religions = Various | demonym = | countries = | languages = Various }} == History == === Origins === == Enviroment == == Demographics == 582520694761145f8845eda35ad772e739b2428c Cavaarkite 0 900 5762 2023-06-25T00:41:45Z Tasha04 2 Created page with "{{Infobox continent | title = Cavaarkite | area = ??? | population = ??? | ethnicgroups = 1 | religions = 1 | demonym = ??? | countries = 1 | languages = 1 }} == History == === Origins === == Enviroment == == Demographics ==" wikitext text/x-wiki {{Infobox continent | title = Cavaarkite | area = ??? | population = ??? | ethnicgroups = 1 | religions = 1 | demonym = ??? | countries = 1 | languages = 1 }} == History == === Origins === == Enviroment == == Demographics == 10072feb2b93127b9acae760569e4079dc382029 Sanctus Darius 0 901 5763 2023-06-25T00:41:47Z Tasha04 2 Created page with "{{Infobox continent | title = Sanctus Darius | area = ??? | population = ??? | ethnicgroups = Various | religions = Various | demonym = ??? | countries = ??? | languages = Various }} == History == === Origins === == Enviroment == == Demographics ==" wikitext text/x-wiki {{Infobox continent | title = Sanctus Darius | area = ??? | population = ??? | ethnicgroups = Various | religions = Various | demonym = ??? | countries = ??? | languages = Various }} == History == === Origins === == Enviroment == == Demographics == 08a7e60fd3a17fb4b4cc10d9e1f40c03b40210f0 Fire element 0 902 5765 2023-06-25T01:01:35Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Fire | associated_realm = Sodor, Sogalur (Margaia) | associated_traits = Destruction, passion, power | strengths = Fear and intimidation, pyrokinesis | weaknesses = Vulnerability to wind, water and ice | representatives = Argento }} Fire stands as one of the main 10 elements, carrying immense significance and playing a pivotal role in shaping the realm. From its awe-inspiring power to its transformat..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Fire | associated_realm = Sodor, Sogalur (Margaia) | associated_traits = Destruction, passion, power | strengths = Fear and intimidation, pyrokinesis | weaknesses = Vulnerability to wind, water and ice | representatives = Argento }} Fire stands as one of the main 10 elements, carrying immense significance and playing a pivotal role in shaping the realm. From its awe-inspiring power to its transformative nature, fire holds a revered position among the elemental forces that rule the land. fb0099dcf333625a3a11a256953b3d3762f14e3a 5766 5765 2023-06-25T08:05:59Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Fire | associated_realm = Sodor, Sogalur (Margaia) | associated_traits = Destruction, passion, power | strengths = Fear and intimidation, pyrokinesis | weaknesses = Vulnerability to wind, water and ice | representatives = Frumruntos (Margaia), Argento (Valmore) }} Fire stands as one of the main 10 elements, carrying immense significance and playing a pivotal role in shaping the realm. From its awe-inspiring power to its transformative nature, fire is revered among the elemental forces that rule the land. Fire is a dangerous element but also one of the most powerful. Those who can control fire are often feared and respected. They are seen as having the power to shape the world around them. == History == It is said that fire originates from Margaia, created by a being called "Primul". In the ancient chronicles of Margaia it states: ''"Primul gazed upon the formless void, its vast expanse stretching into eternity. It sensed the dormant energies swirling within, waiting for purpose and structure. With a touch of its ethereal hand, Primul summoned forth the divine spark, a radiant essence that burst into a magnificent blaze. From this celestial fire, the first element came to be - Fire, the embodiment of passion and untamed power."'' The fire element is a powerful force of nature that has played an essential role in human history. Fire has been used for cooking, warmth, protection, and for warfare. It has also been used in religious rituals and in the arts. Fire is a symbol of passion, creativity, and transformation. It is a reminder of the power of the human spirit and the potential for both good and evil. The fire element continues to be a source of inspiration and awe. It is a reminder of the power of nature and the potential for human creativity. Fire is a symbol of hope, a beacon of resilience, and a reminder of the indomitable spirit that resides within every living being. == Capabilities == == Techniques == b6ce08e24300fd317a73ca8261e289c680eca3a1 5792 5766 2023-06-26T06:13:39Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Fire | associated_realm = Sodor (Valmore), Sogalur (Margaia) | associated_traits = Destruction, passion, power | strengths = Fear and intimidation, pyrokinesis | weaknesses = Vulnerability to wind, water and ice | representatives = Frumruntos (Margaia), Argento (Valmore) }} Fire stands as one of the main 10 elements, carrying immense significance and playing a pivotal role in shaping the realm. From its awe-inspiring power to its transformative nature, fire is revered among the elemental forces that rule the land. Fire is a dangerous element but also one of the most powerful. Those who can control fire are often feared and respected. They are seen as having the power to shape the world around them. == History == It is said that fire originates from Margaia, created by a being called "Primul". In the ancient chronicles of Margaia it states: ''"Primul gazed upon the formless void, its vast expanse stretching into eternity. It sensed the dormant energies swirling within, waiting for purpose and structure. With a touch of its ethereal hand, Primul summoned forth the divine spark, a radiant essence that burst into a magnificent blaze. From this celestial fire, the first element came to be - Fire, the embodiment of passion and untamed power."'' The fire element is a powerful force of nature that has played an essential role in human history. Fire has been used for cooking, warmth, protection, and for warfare. It has also been used in religious rituals and in the arts. Fire is a symbol of passion, creativity, and transformation. It is a reminder of the power of the human spirit and the potential for both good and evil. The fire element continues to be a source of inspiration and awe. It is a reminder of the power of nature and the potential for human creativity. Fire is a symbol of hope, a beacon of resilience, and a reminder of the indomitable spirit that resides within every living being. == Capabilities == The Fire element offers a range of capabilities to those skilled in its manipulation. Fire manipulators can generate and control flames, manipulate heat, and harness the destructive power of fire. They possess a deep connection with the elemental essence of fire, allowing them to command its flames and unleash devastating attacks. == Techniques == Some common techniques associated with Fire manipulation include: * Inferno Blast: Unleashing a concentrated burst of intense flames, capable of engulfing targets in a destructive inferno. * Ignition Aura: Surrounding oneself with an aura of scorching heat, creating a barrier that repels and burns attackers. * Flame Manipulation: Controlling and shaping flames, allowing for precise control and manipulation of fire. * Firestorm: Summoning a raging tempest of fire, engulfing a large area with a swirling maelstrom of flames. These techniques exemplify the Fire element's destructive power and passionate nature, providing its users with offensive, defensive, and overwhelming advantages. Fire manipulators can wield the raw energy of flames, commanding its intense heat and unleashing devastation upon their foes, embodying the transformative and formidable power of the realm of Fire. [[Category:The Main 10 Elements]] adf4d07a2e4e82d8e69f68c2065726546b0f5fb3 5797 5792 2023-06-26T09:10:27Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Sodor Empire.png | element_type = Fire | associated_realm = Sodor (Valmore), Sogalur (Margaia) | associated_traits = Destruction, passion, power | strengths = Fear and intimidation, pyrokinesis | weaknesses = Vulnerability to wind, water and ice | representatives = Frumruntos (Margaia), Argento (Valmore) }} Fire stands as one of the main 10 elements, carrying immense significance and playing a pivotal role in shaping the realm. From its awe-inspiring power to its transformative nature, fire is revered among the elemental forces that rule the land. Fire is a dangerous element but also one of the most powerful. Those who can control fire are often feared and respected. They are seen as having the power to shape the world around them. == History == It is said that fire originates from Margaia, created by a being called "Primul". In the ancient chronicles of Margaia it states: ''"Primul gazed upon the formless void, its vast expanse stretching into eternity. It sensed the dormant energies swirling within, waiting for purpose and structure. With a touch of its ethereal hand, Primul summoned forth the divine spark, a radiant essence that burst into a magnificent blaze. From this celestial fire, the first element came to be - Fire, the embodiment of passion and untamed power."'' The fire element is a powerful force of nature that has played an essential role in human history. Fire has been used for cooking, warmth, protection, and for warfare. It has also been used in religious rituals and in the arts. Fire is a symbol of passion, creativity, and transformation. It is a reminder of the power of the human spirit and the potential for both good and evil. The fire element continues to be a source of inspiration and awe. It is a reminder of the power of nature and the potential for human creativity. Fire is a symbol of hope, a beacon of resilience, and a reminder of the indomitable spirit that resides within every living being. == Capabilities == The Fire element offers a range of capabilities to those skilled in its manipulation. Fire manipulators can generate and control flames, manipulate heat, and harness the destructive power of fire. They possess a deep connection with the elemental essence of fire, allowing them to command its flames and unleash devastating attacks. == Techniques == Some common techniques associated with Fire manipulation include: * Inferno Blast: Unleashing a concentrated burst of intense flames, capable of engulfing targets in a destructive inferno. * Ignition Aura: Surrounding oneself with an aura of scorching heat, creating a barrier that repels and burns attackers. * Flame Manipulation: Controlling and shaping flames, allowing for precise control and manipulation of fire. * Firestorm: Summoning a raging tempest of fire, engulfing a large area with a swirling maelstrom of flames. These techniques exemplify the Fire element's destructive power and passionate nature, providing its users with offensive, defensive, and overwhelming advantages. Fire manipulators can wield the raw energy of flames, commanding its intense heat and unleashing devastation upon their foes, embodying the transformative and formidable power of the realm of Fire. [[Category:The Main 10 Elements]] 3739c9d0225253e45d67f616dd692cde5a51c3f3 Earth element 0 903 5767 2023-06-26T01:50:51Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Earth | associated_realm = Kvivik, Kvivik (Margaia) | associated_traits = Stability, endurance, grounding | strengths = Firm and unyielding | weaknesses = Stubbornness, possessiveness | representatives = Bilbunzar (Margaia), Bhartolk (Valmore) }} Earth, as the second main element in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its endurance, stability, and groundin..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Earth | associated_realm = Kvivik, Kvivik (Margaia) | associated_traits = Stability, endurance, grounding | strengths = Firm and unyielding | weaknesses = Stubbornness, possessiveness | representatives = Bilbunzar (Margaia), Bhartolk (Valmore) }} Earth, as the second main element in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its endurance, stability, and grounding energy, the Earth element moulds the landscapes, sustains life, and provides a solid foundation for all existence. The power of Earth commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Earth are highly regarded for their mastery over the very fabric of the world. Their capacity to shape the land and harness the earth's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Earth element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Earth as follows: ''"As Fire blazed, its scorching heat stirred the dormant energies nearby, giving rise to the second element - Earth. From the depths of the earth's core, mountains rose, valleys formed, and lush forests flourished. The element of Earth stood steadfast and stable, providing a solid foundation for the world to take shape."'' Throughout human history, the Earth element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Earth has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Earth symbolizes stability, endurance, and growth, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Earth element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Earth serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Earth element offers a range of capabilities to those skilled in its manipulation. Earth manipulators can shape and control the land, causing tremors, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the earth's energy, allowing them to draw strength and stability from their surroundings. == Techniques == Some common techniques associated with Earth manipulation include: * Earthshaker: Generating powerful seismic waves to cause localized earthquakes. * Stone Armor: Forming protective armour made of solid rock. * Gaia's Embrace: Calling upon the essence of the earth to heal wounds and restore vitality. * Meld with the Land: Blending with the earth, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Earth element's firm and unyielding nature, providing its users with defensive and strategic advantages. 984a6e671a33d5d8b2e519163c245df9ade5fbe0 5782 5767 2023-06-26T06:08:28Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Earth | associated_realm = Kvivik (Valmore), Kvivik (Margaia) | associated_traits = Stability, endurance, grounding | strengths = Firm and unyielding | weaknesses = Stubbornness, possessiveness | representatives = Bilbunzar (Margaia), Bhartolk (Valmore) }} Earth, as the second main element in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its endurance, stability, and grounding energy, the Earth element moulds the landscapes, sustains life, and provides a solid foundation for all existence. The power of Earth commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Earth are highly regarded for their mastery over the very fabric of the world. Their capacity to shape the land and harness the earth's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Earth element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Earth as follows: ''"As Fire blazed, its scorching heat stirred the dormant energies nearby, giving rise to the second element - Earth. From the depths of the earth's core, mountains rose, valleys formed, and lush forests flourished. The element of Earth stood steadfast and stable, providing a solid foundation for the world to take shape."'' Throughout human history, the Earth element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Earth has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Earth symbolizes stability, endurance, and growth, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Earth element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Earth serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Earth element offers a range of capabilities to those skilled in its manipulation. Earth manipulators can shape and control the land, causing tremors, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the earth's energy, allowing them to draw strength and stability from their surroundings. == Techniques == Some common techniques associated with Earth manipulation include: * Earthshaker: Generating powerful seismic waves to cause localized earthquakes. * Stone Armor: Forming protective armour made of solid rock. * Gaia's Embrace: Calling upon the essence of the earth to heal wounds and restore vitality. * Meld with the Land: Blending with the earth, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Earth element's firm and unyielding nature, providing its users with defensive and strategic advantages. 33781ca93ce897ae23ad55b7b32e5b8753ed036e 5783 5782 2023-06-26T06:11:30Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Earth | associated_realm = Kvivik (Valmore), Kvivik (Margaia) | associated_traits = Stability, endurance, grounding | strengths = Firm and unyielding | weaknesses = Stubbornness, possessiveness | representatives = Bilbunzar (Margaia), Bhartolk (Valmore) }} Earth, as the second main element in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its endurance, stability, and grounding energy, the Earth element moulds the landscapes, sustains life, and provides a solid foundation for all existence. The power of Earth commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Earth are highly regarded for their mastery over the very fabric of the world. Their capacity to shape the land and harness the earth's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Earth element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Earth as follows: ''"As Fire blazed, its scorching heat stirred the dormant energies nearby, giving rise to the second element - Earth. From the depths of the earth's core, mountains rose, valleys formed, and lush forests flourished. The element of Earth stood steadfast and stable, providing a solid foundation for the world to take shape."'' Throughout human history, the Earth element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Earth has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Earth symbolizes stability, endurance, and growth, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Earth element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Earth serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Earth element offers a range of capabilities to those skilled in its manipulation. Earth manipulators can shape and control the land, causing tremors, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the earth's energy, allowing them to draw strength and stability from their surroundings. == Techniques == Some common techniques associated with Earth manipulation include: * Earthshaker: Generating powerful seismic waves to cause localized earthquakes. * Stone Armor: Forming protective armour made of solid rock. * Gaia's Embrace: Calling upon the essence of the earth to heal wounds and restore vitality. * Meld with the Land: Blending with the earth, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Earth element's firm and unyielding nature, providing its users with defensive and strategic advantages. [[Category:The Main 10 Elements]] a191febe54ad0032420ff18743a1cc56cd47eb83 Water element 0 904 5768 2023-06-26T01:50:53Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Water | associated_realm = Wraphegia, Sorfika (Margaia) | associated_traits = Adaptability, intuition, fluidity | strengths = Versatile and adaptable | weaknesses = Overemotional, indecisive | representatives = Nereus (Margaia), Marcellus (Valmore) }} Water, as one of the fundamental elements, holds immense significance and plays a vital role in shaping the realm. Known for its fluidity and adaptability, the Water..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Water | associated_realm = Wraphegia, Sorfika (Margaia) | associated_traits = Adaptability, intuition, fluidity | strengths = Versatile and adaptable | weaknesses = Overemotional, indecisive | representatives = Nereus (Margaia), Marcellus (Valmore) }} Water, as one of the fundamental elements, holds immense significance and plays a vital role in shaping the realm. Known for its fluidity and adaptability, the Water element embodies the ever-changing nature of life itself. It is a force that brings nourishment, healing, and the potential for transformation. == History == According to ancient texts and legends, the Water element originated from Margaia, born from the primordial energies that first shaped the realm. It is believed that the convergence of rivers, lakes, and oceans gave birth to the element, imbuing it with its intrinsic properties. ''"Yet, in the presence of Fire and Earth, there was a longing for harmony and balance. From the vast oceans, misty rivers, and crystalline waterfalls, the element of Water emerged. Its gentle currents embraced the land, nourishing it and giving life to all creatures. Water flowed with grace and serenity, embodying the ebb and flow of existence."'' Throughout history, Water has played a key role in human civilizations. It has provided sustenance, facilitated transportation and trade, and served as a source of inspiration and spiritual purification. Water's versatile nature has allowed civilizations to thrive and adapt to their environments, harnessing its power for both practical and mystical purposes. == Capabilities == Water manipulation provides individuals with a diverse range of capabilities. Skilled Water users can shape and control water bodies, summon rainstorms, create fog or mist, and even freeze water into solid forms. The element's healing properties allow for the mending of wounds and restoration of vitality. == Techniques == Some common techniques associated with Water manipulation include: * Aqua Manipulation: The ability to manipulate and control water in various forms, such as liquid, mist, or ice. * Healing Waters: Using Water's purifying properties to heal wounds, cure ailments, and restore vitality. * Water Whip: Forming water into a whip-like structure for offensive purposes. * Hydrokinesis: The power to manipulate and control the movement of water, shaping it into powerful currents or protective barriers. * Mist Veil: Creating a misty veil that obscures vision and provides an advantage in stealth or escape. These techniques highlight the versatility and fluid nature of the Water element, allowing its users to adapt to various situations and harness its power for both offensive and defensive purposes. 4832d45ea964d1ae7d214d19ca0789cfef3aa349 5781 5768 2023-06-26T06:08:24Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Water | associated_realm = Wraphegia (Valmore), Sorfika (Margaia) | associated_traits = Adaptability, intuition, fluidity | strengths = Versatile and adaptable | weaknesses = Overemotional, indecisive | representatives = Nereus (Margaia), Marcellus (Valmore) }} Water, as one of the fundamental elements, holds immense significance and plays a vital role in shaping the realm. Known for its fluidity and adaptability, the Water element embodies the ever-changing nature of life itself. It is a force that brings nourishment, healing, and the potential for transformation. == History == According to ancient texts and legends, the Water element originated from Margaia, born from the primordial energies that first shaped the realm. It is believed that the convergence of rivers, lakes, and oceans gave birth to the element, imbuing it with its intrinsic properties. ''"Yet, in the presence of Fire and Earth, there was a longing for harmony and balance. From the vast oceans, misty rivers, and crystalline waterfalls, the element of Water emerged. Its gentle currents embraced the land, nourishing it and giving life to all creatures. Water flowed with grace and serenity, embodying the ebb and flow of existence."'' Throughout history, Water has played a key role in human civilizations. It has provided sustenance, facilitated transportation and trade, and served as a source of inspiration and spiritual purification. Water's versatile nature has allowed civilizations to thrive and adapt to their environments, harnessing its power for both practical and mystical purposes. == Capabilities == Water manipulation provides individuals with a diverse range of capabilities. Skilled Water users can shape and control water bodies, summon rainstorms, create fog or mist, and even freeze water into solid forms. The element's healing properties allow for the mending of wounds and restoration of vitality. == Techniques == Some common techniques associated with Water manipulation include: * Aqua Manipulation: The ability to manipulate and control water in various forms, such as liquid, mist, or ice. * Healing Waters: Using Water's purifying properties to heal wounds, cure ailments, and restore vitality. * Water Whip: Forming water into a whip-like structure for offensive purposes. * Hydrokinesis: The power to manipulate and control the movement of water, shaping it into powerful currents or protective barriers. * Mist Veil: Creating a misty veil that obscures vision and provides an advantage in stealth or escape. These techniques highlight the versatility and fluid nature of the Water element, allowing its users to adapt to various situations and harness its power for both offensive and defensive purposes. 65205613c13765e49c029658208530da6491d8fe 5784 5781 2023-06-26T06:11:41Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Water | associated_realm = Wraphegia (Valmore), Sorfika (Margaia) | associated_traits = Adaptability, intuition, fluidity | strengths = Versatile and adaptable | weaknesses = Overemotional, indecisive | representatives = Nereus (Margaia), Marcellus (Valmore) }} Water, as one of the fundamental elements, holds immense significance and plays a vital role in shaping the realm. Known for its fluidity and adaptability, the Water element embodies the ever-changing nature of life itself. It is a force that brings nourishment, healing, and the potential for transformation. == History == According to ancient texts and legends, the Water element originated from Margaia, born from the primordial energies that first shaped the realm. It is believed that the convergence of rivers, lakes, and oceans gave birth to the element, imbuing it with its intrinsic properties. ''"Yet, in the presence of Fire and Earth, there was a longing for harmony and balance. From the vast oceans, misty rivers, and crystalline waterfalls, the element of Water emerged. Its gentle currents embraced the land, nourishing it and giving life to all creatures. Water flowed with grace and serenity, embodying the ebb and flow of existence."'' Throughout history, Water has played a key role in human civilizations. It has provided sustenance, facilitated transportation and trade, and served as a source of inspiration and spiritual purification. Water's versatile nature has allowed civilizations to thrive and adapt to their environments, harnessing its power for both practical and mystical purposes. == Capabilities == Water manipulation provides individuals with a diverse range of capabilities. Skilled Water users can shape and control water bodies, summon rainstorms, create fog or mist, and even freeze water into solid forms. The element's healing properties allow for the mending of wounds and restoration of vitality. == Techniques == Some common techniques associated with Water manipulation include: * Aqua Manipulation: The ability to manipulate and control water in various forms, such as liquid, mist, or ice. * Healing Waters: Using Water's purifying properties to heal wounds, cure ailments, and restore vitality. * Water Whip: Forming water into a whip-like structure for offensive purposes. * Hydrokinesis: The power to manipulate and control the movement of water, shaping it into powerful currents or protective barriers. * Mist Veil: Creating a misty veil that obscures vision and provides an advantage in stealth or escape. These techniques highlight the versatility and fluid nature of the Water element, allowing its users to adapt to various situations and harness its power for both offensive and defensive purposes. [[Category:The Main 10 Elements]] c4569151682427656cc05a9fa55fe3c2843c3f4b Air element 0 905 5769 2023-06-26T01:50:55Z Tasha04 2 Created page with "{{Infobox element | header0 = Air | image = | element_type = Air | associated_realm = Aihekar, Eleurion (Margaia) | associated_traits = Freedom, movement, intuition | strengths = Adaptable, agile | weaknesses = Easily distracted, scattered | representatives = Ventus (Margaia), Aerendir (Valmore) }} Air, as the 9 main elements in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its freedom, movement, and intuitive energy, the..." wikitext text/x-wiki {{Infobox element | header0 = Air | image = | element_type = Air | associated_realm = Aihekar, Eleurion (Margaia) | associated_traits = Freedom, movement, intuition | strengths = Adaptable, agile | weaknesses = Easily distracted, scattered | representatives = Ventus (Margaia), Aerendir (Valmore) }} Air, as the 9 main elements in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its freedom, movement, and intuitive energy, the Air element fills the skies, sustains life, and provides a line for communication and travel. The power of Air commands respect and caution due to its inherent flexibility. Those who possess the ability to manipulate Air are highly regarded for their mastery over the very breath of life. Their capacity to shape the wind and harness the air's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Air element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Air as follows: ''"But as the world continued to evolve, it became clear that there was a need for movement and change. From the heights of the heavens, the element of Air descended, bringing with it a gentle breeze that whispered secrets in the wind. Air carried the songs of birds, the scent of flowers, and the breath of life itself, filling the world with its ethereal presence."'' Throughout human history, the Air element has played an integral role. It has provided transportation, communication, and care for civilizations. Air has been utilized in the construction of sails, kites, and other flying machines. It has also found its place in religious ceremonies and artistic expressions. Air symbolizes freedom, movement, and creativity, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Air element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human ingenuity. Air serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Air element offers a range of capabilities to those skilled in its manipulation. Air manipulators can shape and control the wind, causing gusts, creating tornadoes, and even flying. They possess a deep connection with the air's energy, allowing them to draw strength and agility from their surroundings. == Techniques == Some common techniques associated with Air manipulation include: * Wind Blast: Generating powerful gusts of wind to knock an enemy back or even knock them unconscious. * Air Shield: A shield made of air that can protect the user from attacks. * Air Walk: Walking on air currents, allowing for sustained flight. * Air Step: Creating temporary platforms of air, allowing for short-range teleportation. These techniques exemplify the Air element's free-flowing nature, providing its users with offensive and defensive advantages. 07e4b11beda00fa59ffd5817e69e0213e38b890b 5780 5769 2023-06-26T06:08:21Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = Air | image = | element_type = Air | associated_realm = Aihekar (Valmore), Eleurion (Margaia) | associated_traits = Freedom, movement, intuition | strengths = Adaptable, agile | weaknesses = Easily distracted, scattered | representatives = Ventus (Margaia), Aerendir (Valmore) }} Air, as the 9 main elements in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its freedom, movement, and intuitive energy, the Air element fills the skies, sustains life, and provides a line for communication and travel. The power of Air commands respect and caution due to its inherent flexibility. Those who possess the ability to manipulate Air are highly regarded for their mastery over the very breath of life. Their capacity to shape the wind and harness the air's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Air element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Air as follows: ''"But as the world continued to evolve, it became clear that there was a need for movement and change. From the heights of the heavens, the element of Air descended, bringing with it a gentle breeze that whispered secrets in the wind. Air carried the songs of birds, the scent of flowers, and the breath of life itself, filling the world with its ethereal presence."'' Throughout human history, the Air element has played an integral role. It has provided transportation, communication, and care for civilizations. Air has been utilized in the construction of sails, kites, and other flying machines. It has also found its place in religious ceremonies and artistic expressions. Air symbolizes freedom, movement, and creativity, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Air element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human ingenuity. Air serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Air element offers a range of capabilities to those skilled in its manipulation. Air manipulators can shape and control the wind, causing gusts, creating tornadoes, and even flying. They possess a deep connection with the air's energy, allowing them to draw strength and agility from their surroundings. == Techniques == Some common techniques associated with Air manipulation include: * Wind Blast: Generating powerful gusts of wind to knock an enemy back or even knock them unconscious. * Air Shield: A shield made of air that can protect the user from attacks. * Air Walk: Walking on air currents, allowing for sustained flight. * Air Step: Creating temporary platforms of air, allowing for short-range teleportation. These techniques exemplify the Air element's free-flowing nature, providing its users with offensive and defensive advantages. 6ab8ff40bc97ea88d63d415fa7f64f61f01be28c 5785 5780 2023-06-26T06:11:49Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = Air | image = | element_type = Air | associated_realm = Aihekar (Valmore), Eleurion (Margaia) | associated_traits = Freedom, movement, intuition | strengths = Adaptable, agile | weaknesses = Easily distracted, scattered | representatives = Ventus (Margaia), Aerendir (Valmore) }} Air, as the 9 main elements in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its freedom, movement, and intuitive energy, the Air element fills the skies, sustains life, and provides a line for communication and travel. The power of Air commands respect and caution due to its inherent flexibility. Those who possess the ability to manipulate Air are highly regarded for their mastery over the very breath of life. Their capacity to shape the wind and harness the air's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Air element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Air as follows: ''"But as the world continued to evolve, it became clear that there was a need for movement and change. From the heights of the heavens, the element of Air descended, bringing with it a gentle breeze that whispered secrets in the wind. Air carried the songs of birds, the scent of flowers, and the breath of life itself, filling the world with its ethereal presence."'' Throughout human history, the Air element has played an integral role. It has provided transportation, communication, and care for civilizations. Air has been utilized in the construction of sails, kites, and other flying machines. It has also found its place in religious ceremonies and artistic expressions. Air symbolizes freedom, movement, and creativity, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Air element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human ingenuity. Air serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Air element offers a range of capabilities to those skilled in its manipulation. Air manipulators can shape and control the wind, causing gusts, creating tornadoes, and even flying. They possess a deep connection with the air's energy, allowing them to draw strength and agility from their surroundings. == Techniques == Some common techniques associated with Air manipulation include: * Wind Blast: Generating powerful gusts of wind to knock an enemy back or even knock them unconscious. * Air Shield: A shield made of air that can protect the user from attacks. * Air Walk: Walking on air currents, allowing for sustained flight. * Air Step: Creating temporary platforms of air, allowing for short-range teleportation. These techniques exemplify the Air element's free-flowing nature, providing its users with offensive and defensive advantages. [[Category:The Main 10 Elements]] 7d3edff06109806c05749e1be85fa76efd536bfb Ice element 0 906 5770 2023-06-26T01:50:56Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Ice | associated_realm = Icrouryn, Pinoilea (Margaia) | associated_traits = Coldness, purity, preservation | strengths = Resilient and unyielding | weaknesses = Rigidity, isolation | representatives = Frostweaver (Margaia), Leofric (Valmore) }} Ice, as an elemental force within the realm, holds great significance and plays a pivotal role in shaping the world. Revered for its coldness, purity, and preservation qual..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Ice | associated_realm = Icrouryn, Pinoilea (Margaia) | associated_traits = Coldness, purity, preservation | strengths = Resilient and unyielding | weaknesses = Rigidity, isolation | representatives = Frostweaver (Margaia), Leofric (Valmore) }} Ice, as an elemental force within the realm, holds great significance and plays a pivotal role in shaping the world. Revered for its coldness, purity, and preservation qualities, the Ice element moulds the frozen landscapes, blankets the land in frost, and bestows a sense of stillness and tranquillity upon the realm. The power of Ice commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Ice are highly regarded for their mastery over the frozen essence of the world. Their capacity to shape ice crystals, control temperatures, and harness the chilling energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Ice element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Ice as follows: ''"Yet, Primul sensed the presence of a dormant force within the void. From the icy abyss, it called forth the fifth element - Ice. Frost formed, encasing the landscapes in glistening crystals and bringing forth a sense of stillness and tranquillity. Ice mirrored the frigid beauty of winter, preserving and crystallizing moments in time."'' Throughout history, the Ice element has played an integral role. It has provided protection against the harshness of winter, preserved resources, and served as a source of inspiration for art, poetry, and storytelling. Ice symbolizes coldness, purity, and the delicate balance between preservation and isolation. Even in the present day, the Ice element continues to captivate and inspire. It reminds us of the beauty and tranquility that can be found in stillness, the resilience of life in freezing conditions, and the potential for transformation that lies within the icy depths. == Capabilities == The Ice element offers a range of capabilities to those skilled in its manipulation. Ice manipulators can freeze water, create ice formations, and control temperature, granting them control over the chilling forces of nature. They possess a deep connection with the frozen essence, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Ice manipulation include: * Frostbite: Channeling the coldness to inflict freezing injuries upon opponents. * Glacial Barrier: Forming protective barriers made of solid ice. * Frost Nova: Unleashing a burst of icy energy, freezing the surrounding area and immobilizing adversaries. * Frostweaving: Creating intricate ice sculptures and structures with precise control over frozen water. These techniques exemplify the Ice element's resilient and unyielding nature, providing its users with defensive, strategic, and artistic advantages. Ice manipulators can shape the frozen world, command blizzards, and harness the power of frost to evoke both awe and trepidation. aee1e6600c0a095fc3bac597db6b0a4d2a8724fe 5779 5770 2023-06-26T06:08:18Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Ice | associated_realm = Icrouryn (Valmore), Pinoilea (Margaia) | associated_traits = Coldness, purity, preservation | strengths = Resilient and unyielding | weaknesses = Rigidity, isolation | representatives = Frostweaver (Margaia), Leofric (Valmore) }} Ice, as an elemental force within the realm, holds great significance and plays a pivotal role in shaping the world. Revered for its coldness, purity, and preservation qualities, the Ice element moulds the frozen landscapes, blankets the land in frost, and bestows a sense of stillness and tranquillity upon the realm. The power of Ice commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Ice are highly regarded for their mastery over the frozen essence of the world. Their capacity to shape ice crystals, control temperatures, and harness the chilling energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Ice element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Ice as follows: ''"Yet, Primul sensed the presence of a dormant force within the void. From the icy abyss, it called forth the fifth element - Ice. Frost formed, encasing the landscapes in glistening crystals and bringing forth a sense of stillness and tranquillity. Ice mirrored the frigid beauty of winter, preserving and crystallizing moments in time."'' Throughout history, the Ice element has played an integral role. It has provided protection against the harshness of winter, preserved resources, and served as a source of inspiration for art, poetry, and storytelling. Ice symbolizes coldness, purity, and the delicate balance between preservation and isolation. Even in the present day, the Ice element continues to captivate and inspire. It reminds us of the beauty and tranquility that can be found in stillness, the resilience of life in freezing conditions, and the potential for transformation that lies within the icy depths. == Capabilities == The Ice element offers a range of capabilities to those skilled in its manipulation. Ice manipulators can freeze water, create ice formations, and control temperature, granting them control over the chilling forces of nature. They possess a deep connection with the frozen essence, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Ice manipulation include: * Frostbite: Channeling the coldness to inflict freezing injuries upon opponents. * Glacial Barrier: Forming protective barriers made of solid ice. * Frost Nova: Unleashing a burst of icy energy, freezing the surrounding area and immobilizing adversaries. * Frostweaving: Creating intricate ice sculptures and structures with precise control over frozen water. These techniques exemplify the Ice element's resilient and unyielding nature, providing its users with defensive, strategic, and artistic advantages. Ice manipulators can shape the frozen world, command blizzards, and harness the power of frost to evoke both awe and trepidation. 8f268879945dafb170e2437579ed423c4afd9c21 5786 5779 2023-06-26T06:12:06Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Ice | associated_realm = Icrouryn (Valmore), Pinoilea (Margaia) | associated_traits = Coldness, purity, preservation | strengths = Resilient and unyielding | weaknesses = Rigidity, isolation | representatives = Frostweaver (Margaia), Leofric (Valmore) }} Ice, as an elemental force within the realm, holds great significance and plays a pivotal role in shaping the world. Revered for its coldness, purity, and preservation qualities, the Ice element moulds the frozen landscapes, blankets the land in frost, and bestows a sense of stillness and tranquillity upon the realm. The power of Ice commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Ice are highly regarded for their mastery over the frozen essence of the world. Their capacity to shape ice crystals, control temperatures, and harness the chilling energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Ice element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Ice as follows: ''"Yet, Primul sensed the presence of a dormant force within the void. From the icy abyss, it called forth the fifth element - Ice. Frost formed, encasing the landscapes in glistening crystals and bringing forth a sense of stillness and tranquillity. Ice mirrored the frigid beauty of winter, preserving and crystallizing moments in time."'' Throughout history, the Ice element has played an integral role. It has provided protection against the harshness of winter, preserved resources, and served as a source of inspiration for art, poetry, and storytelling. Ice symbolizes coldness, purity, and the delicate balance between preservation and isolation. Even in the present day, the Ice element continues to captivate and inspire. It reminds us of the beauty and tranquility that can be found in stillness, the resilience of life in freezing conditions, and the potential for transformation that lies within the icy depths. == Capabilities == The Ice element offers a range of capabilities to those skilled in its manipulation. Ice manipulators can freeze water, create ice formations, and control temperature, granting them control over the chilling forces of nature. They possess a deep connection with the frozen essence, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Ice manipulation include: * Frostbite: Channeling the coldness to inflict freezing injuries upon opponents. * Glacial Barrier: Forming protective barriers made of solid ice. * Frost Nova: Unleashing a burst of icy energy, freezing the surrounding area and immobilizing adversaries. * Frostweaving: Creating intricate ice sculptures and structures with precise control over frozen water. These techniques exemplify the Ice element's resilient and unyielding nature, providing its users with defensive, strategic, and artistic advantages. Ice manipulators can shape the frozen world, command blizzards, and harness the power of frost to evoke both awe and fear. [[Category:The Main 10 Elements]] 1aa6d558f46a9c876ce06c77d6b985f687d0f75c Plant element 0 907 5771 2023-06-26T01:50:59Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Plant | associated_realm = Preapia, Elara (Margaia) | associated_traits = Growth, life, healing | strengths = Nurturing and adaptable | weaknesses = Overgrowth, vulnerability to fire | representatives = Verdantia (Margaia), Lyylikki (Valmore) }} Plants, as an elemental force within the realm, hold immense significance and play a vital role in shaping the world. Revered for their growth, vitality, and harmonious e..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Plant | associated_realm = Preapia, Elara (Margaia) | associated_traits = Growth, life, healing | strengths = Nurturing and adaptable | weaknesses = Overgrowth, vulnerability to fire | representatives = Verdantia (Margaia), Lyylikki (Valmore) }} Plants, as an elemental force within the realm, hold immense significance and play a vital role in shaping the world. Revered for their growth, vitality, and harmonious energy, the Plant element weaves together the lush landscapes, sustains life, and brings a sense of natural balance to the realm. The power of Plants commands appreciation and care due to their nurturing strength. Those who possess the ability to manipulate Plants are highly regarded for their mastery over the living essence of the world. Their capacity to cultivate flora, harness the energy of nature, and foster harmony grants them great power and influence. == History == According to ancient chronicles of Margaia, the Plant element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Plant as follows: ''"To honor the abundance of nature, Primul summoned the sixth element - Plant. From the fertile soil, sprouts burst forth, leaves unfurled, and flowers bloomed in radiant colors. Plants spread across Margaia, providing shelter, sustenance, and the healing touch of nature's embrace. They intertwined with the earth, celebrating the cycle of life and offering glimpses of the divine design."'' Throughout human history, the Plant element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Plant has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Plant symbolizes growth, life, and healing, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Plant element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Plant serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Plant element offers a range of capabilities to those skilled in its manipulation. Plant manipulators can shape and control the land, causing plants to grow, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the plant's energy, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Plant manipulation include: * Plant Growth: Causing plants to grow rapidly, creating barricades or even attacking enemies. * Healing Touch: Using the power of plants to heal wounds or restore vitality. * Nature's Embrace: Blending with the plants, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Plant element's growth and life-giving nature, providing its users with defensive and supportive advantages. ec7707ff7622f0696f939ac0803951dedaefc8d8 5778 5771 2023-06-26T06:08:15Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Plant | associated_realm = Preapia (Valmore), Elara (Margaia) | associated_traits = Growth, life, healing | strengths = Nurturing and adaptable | weaknesses = Overgrowth, vulnerability to fire | representatives = Verdantia (Margaia), Lyylikki (Valmore) }} Plants, as an elemental force within the realm, hold immense significance and play a vital role in shaping the world. Revered for their growth, vitality, and harmonious energy, the Plant element weaves together the lush landscapes, sustains life, and brings a sense of natural balance to the realm. The power of Plants commands appreciation and care due to their nurturing strength. Those who possess the ability to manipulate Plants are highly regarded for their mastery over the living essence of the world. Their capacity to cultivate flora, harness the energy of nature, and foster harmony grants them great power and influence. == History == According to ancient chronicles of Margaia, the Plant element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Plant as follows: ''"To honor the abundance of nature, Primul summoned the sixth element - Plant. From the fertile soil, sprouts burst forth, leaves unfurled, and flowers bloomed in radiant colors. Plants spread across Margaia, providing shelter, sustenance, and the healing touch of nature's embrace. They intertwined with the earth, celebrating the cycle of life and offering glimpses of the divine design."'' Throughout human history, the Plant element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Plant has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Plant symbolizes growth, life, and healing, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Plant element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Plant serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Plant element offers a range of capabilities to those skilled in its manipulation. Plant manipulators can shape and control the land, causing plants to grow, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the plant's energy, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Plant manipulation include: * Plant Growth: Causing plants to grow rapidly, creating barricades or even attacking enemies. * Healing Touch: Using the power of plants to heal wounds or restore vitality. * Nature's Embrace: Blending with the plants, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Plant element's growth and life-giving nature, providing its users with defensive and supportive advantages. fcbc1ec1237e44ecae8316b1cad3120e25098b95 5787 5778 2023-06-26T06:12:16Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Plant | associated_realm = Preapia (Valmore), Elara (Margaia) | associated_traits = Growth, life, healing | strengths = Nurturing and adaptable | weaknesses = Overgrowth, vulnerability to fire | representatives = Verdantia (Margaia), Lyylikki (Valmore) }} Plants, as an elemental force within the realm, hold immense significance and play a vital role in shaping the world. Revered for their growth, vitality, and harmonious energy, the Plant element weaves together the lush landscapes, sustains life, and brings a sense of natural balance to the realm. The power of Plants commands appreciation and care due to their nurturing strength. Those who possess the ability to manipulate Plants are highly regarded for their mastery over the living essence of the world. Their capacity to cultivate flora, harness the energy of nature, and foster harmony grants them great power and influence. == History == According to ancient chronicles of Margaia, the Plant element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Plant as follows: ''"To honor the abundance of nature, Primul summoned the sixth element - Plant. From the fertile soil, sprouts burst forth, leaves unfurled, and flowers bloomed in radiant colors. Plants spread across Margaia, providing shelter, sustenance, and the healing touch of nature's embrace. They intertwined with the earth, celebrating the cycle of life and offering glimpses of the divine design."'' Throughout human history, the Plant element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Plant has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Plant symbolizes growth, life, and healing, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Plant element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Plant serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Plant element offers a range of capabilities to those skilled in its manipulation. Plant manipulators can shape and control the land, causing plants to grow, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the plant's energy, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Plant manipulation include: * Plant Growth: Causing plants to grow rapidly, creating barricades or even attacking enemies. * Healing Touch: Using the power of plants to heal wounds or restore vitality. * Nature's Embrace: Blending with the plants, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Plant element's growth and life-giving nature, providing its users with defensive and supportive advantages. [[Category:The Main 10 Elements]] e32d028c6e187be23177ac0523ed06bd8770a93e 5802 5787 2023-06-26T09:12:35Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Kingdom of Preapia.png | element_type = Plant | associated_realm = Preapia (Valmore), Elara (Margaia) | associated_traits = Growth, life, healing | strengths = Nurturing and adaptable | weaknesses = Overgrowth, vulnerability to fire | representatives = Verdantia (Margaia), Lyylikki (Valmore) }} Plants, as an elemental force within the realm, hold immense significance and play a vital role in shaping the world. Revered for their growth, vitality, and harmonious energy, the Plant element weaves together the lush landscapes, sustains life, and brings a sense of natural balance to the realm. The power of Plants commands appreciation and care due to their nurturing strength. Those who possess the ability to manipulate Plants are highly regarded for their mastery over the living essence of the world. Their capacity to cultivate flora, harness the energy of nature, and foster harmony grants them great power and influence. == History == According to ancient chronicles of Margaia, the Plant element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Plant as follows: ''"To honor the abundance of nature, Primul summoned the sixth element - Plant. From the fertile soil, sprouts burst forth, leaves unfurled, and flowers bloomed in radiant colors. Plants spread across Margaia, providing shelter, sustenance, and the healing touch of nature's embrace. They intertwined with the earth, celebrating the cycle of life and offering glimpses of the divine design."'' Throughout human history, the Plant element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Plant has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Plant symbolizes growth, life, and healing, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Plant element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Plant serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Plant element offers a range of capabilities to those skilled in its manipulation. Plant manipulators can shape and control the land, causing plants to grow, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the plant's energy, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Plant manipulation include: * Plant Growth: Causing plants to grow rapidly, creating barricades or even attacking enemies. * Healing Touch: Using the power of plants to heal wounds or restore vitality. * Nature's Embrace: Blending with the plants, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Plant element's growth and life-giving nature, providing its users with defensive and supportive advantages. [[Category:The Main 10 Elements]] baf0eab3796aff053103ce0f482b6a4f021a2b3d Lightning element 0 908 5772 2023-06-26T01:51:02Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Lightning | associated_realm = Lakya, Saretagar (Margaia) | associated_traits = Power, speed, electricity | strengths = Electrifying and dynamic | weaknesses = Instability, vulnerability to grounding | representatives = Voltarion (Margaia), Arvind (Valmore) }} Lightning, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its power, speed, and..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Lightning | associated_realm = Lakya, Saretagar (Margaia) | associated_traits = Power, speed, electricity | strengths = Electrifying and dynamic | weaknesses = Instability, vulnerability to grounding | representatives = Voltarion (Margaia), Arvind (Valmore) }} Lightning, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its power, speed, and electrifying energy, the Lightning element crackles through the skies, energizes the atmosphere, and creates a sense of awe and wonder. The power of Lightning commands attention and respect due to its inherent intensity. Those who possess the ability to manipulate Lightning are highly regarded for their mastery over the elemental forces of electricity. Their capacity to harness the raw power of lightning and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Lightning element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Lightning as follows: ''"Yet, Primul yearned for the explosive power that danced across the heavens. With a flash of lightning, the seventh element - Lightning - leaped into existence. Bolts of electric energy streaked across the skies, illuminating the darkness, and electrifying the world with their fierce vitality. Lightning became the herald of change, the embodiment of swift and untamed power."'' Throughout human history, the Lightning element has played an integral role. It has inspired awe, fear, and admiration in equal measure. Lightning has been observed as a symbol of divine power, a source of energy, and a force of destruction. It represents the dynamic and ever-changing aspects of existence, reminding us of the fleeting nature of life and the need to embrace the present moment. Even in the present day, the Lightning element continues to captivate and amaze. It serves as a reminder of the untamed forces of nature and the boundless potential of human innovation and discovery. == Capabilities == The Lightning element offers a range of capabilities to those skilled in its manipulation. Lightning manipulators can generate and control bolts of electricity, manipulate electrical currents, and move with electrifying speed. They possess a deep connection with the elemental power of lightning, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Lightning manipulation include: * Thunderbolt Strike: Unleashing a powerful bolt of lightning to strike targets with precision. * Electric Shield: Creating a protective barrier of electrical energy to deflect attacks. * Surge of Speed: Channeling lightning energy to enhance agility and movement. These techniques exemplify the Lightning element's electrifying and dynamic nature, providing its users with offensive, defensive, and agile advantages. Lightning manipulators can harness the raw power of electricity, harnessing the energy of storms and charging the battlefield with an electrifying presence. 053c7e68b2876606f281047c4b102a7be23969e6 5777 5772 2023-06-26T06:08:12Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Lightning | associated_realm = Lakya (Valmore), Saretagar (Margaia) | associated_traits = Power, speed, electricity | strengths = Electrifying and dynamic | weaknesses = Instability, vulnerability to grounding | representatives = Voltarion (Margaia), Arvind (Valmore) }} Lightning, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its power, speed, and electrifying energy, the Lightning element crackles through the skies, energizes the atmosphere, and creates a sense of awe and wonder. The power of Lightning commands attention and respect due to its inherent intensity. Those who possess the ability to manipulate Lightning are highly regarded for their mastery over the elemental forces of electricity. Their capacity to harness the raw power of lightning and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Lightning element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Lightning as follows: ''"Yet, Primul yearned for the explosive power that danced across the heavens. With a flash of lightning, the seventh element - Lightning - leaped into existence. Bolts of electric energy streaked across the skies, illuminating the darkness, and electrifying the world with their fierce vitality. Lightning became the herald of change, the embodiment of swift and untamed power."'' Throughout human history, the Lightning element has played an integral role. It has inspired awe, fear, and admiration in equal measure. Lightning has been observed as a symbol of divine power, a source of energy, and a force of destruction. It represents the dynamic and ever-changing aspects of existence, reminding us of the fleeting nature of life and the need to embrace the present moment. Even in the present day, the Lightning element continues to captivate and amaze. It serves as a reminder of the untamed forces of nature and the boundless potential of human innovation and discovery. == Capabilities == The Lightning element offers a range of capabilities to those skilled in its manipulation. Lightning manipulators can generate and control bolts of electricity, manipulate electrical currents, and move with electrifying speed. They possess a deep connection with the elemental power of lightning, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Lightning manipulation include: * Thunderbolt Strike: Unleashing a powerful bolt of lightning to strike targets with precision. * Electric Shield: Creating a protective barrier of electrical energy to deflect attacks. * Surge of Speed: Channeling lightning energy to enhance agility and movement. These techniques exemplify the Lightning element's electrifying and dynamic nature, providing its users with offensive, defensive, and agile advantages. Lightning manipulators can harness the raw power of electricity, harnessing the energy of storms and charging the battlefield with an electrifying presence. a4f9f6dc9d3c4cb7c4072cf52991268378267e21 5788 5777 2023-06-26T06:12:24Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Lightning | associated_realm = Lakya (Valmore), Saretagar (Margaia) | associated_traits = Power, speed, electricity | strengths = Electrifying and dynamic | weaknesses = Instability, vulnerability to grounding | representatives = Voltarion (Margaia), Arvind (Valmore) }} Lightning, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its power, speed, and electrifying energy, the Lightning element crackles through the skies, energizes the atmosphere, and creates a sense of awe and wonder. The power of Lightning commands attention and respect due to its inherent intensity. Those who possess the ability to manipulate Lightning are highly regarded for their mastery over the elemental forces of electricity. Their capacity to harness the raw power of lightning and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Lightning element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Lightning as follows: ''"Yet, Primul yearned for the explosive power that danced across the heavens. With a flash of lightning, the seventh element - Lightning - leaped into existence. Bolts of electric energy streaked across the skies, illuminating the darkness, and electrifying the world with their fierce vitality. Lightning became the herald of change, the embodiment of swift and untamed power."'' Throughout human history, the Lightning element has played an integral role. It has inspired awe, fear, and admiration in equal measure. Lightning has been observed as a symbol of divine power, a source of energy, and a force of destruction. It represents the dynamic and ever-changing aspects of existence, reminding us of the fleeting nature of life and the need to embrace the present moment. Even in the present day, the Lightning element continues to captivate and amaze. It serves as a reminder of the untamed forces of nature and the boundless potential of human innovation and discovery. == Capabilities == The Lightning element offers a range of capabilities to those skilled in its manipulation. Lightning manipulators can generate and control bolts of electricity, manipulate electrical currents, and move with electrifying speed. They possess a deep connection with the elemental power of lightning, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Lightning manipulation include: * Thunderbolt Strike: Unleashing a powerful bolt of lightning to strike targets with precision. * Electric Shield: Creating a protective barrier of electrical energy to deflect attacks. * Surge of Speed: Channeling lightning energy to enhance agility and movement. These techniques exemplify the Lightning element's electrifying and dynamic nature, providing its users with offensive, defensive, and agile advantages. Lightning manipulators can harness the raw power of electricity, harnessing the energy of storms and charging the battlefield with an electrifying presence. [[Category:The Main 10 Elements]] 9f5891b40714f4b0b49ff371c4af346213e9acbb 5801 5788 2023-06-26T09:12:32Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Lakya Kingdom.png | element_type = Lightning | associated_realm = Lakya (Valmore), Saretagar (Margaia) | associated_traits = Power, speed, electricity | strengths = Electrifying and dynamic | weaknesses = Instability, vulnerability to grounding | representatives = Voltarion (Margaia), Arvind (Valmore) }} Lightning, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its power, speed, and electrifying energy, the Lightning element crackles through the skies, energizes the atmosphere, and creates a sense of awe and wonder. The power of Lightning commands attention and respect due to its inherent intensity. Those who possess the ability to manipulate Lightning are highly regarded for their mastery over the elemental forces of electricity. Their capacity to harness the raw power of lightning and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Lightning element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Lightning as follows: ''"Yet, Primul yearned for the explosive power that danced across the heavens. With a flash of lightning, the seventh element - Lightning - leaped into existence. Bolts of electric energy streaked across the skies, illuminating the darkness, and electrifying the world with their fierce vitality. Lightning became the herald of change, the embodiment of swift and untamed power."'' Throughout human history, the Lightning element has played an integral role. It has inspired awe, fear, and admiration in equal measure. Lightning has been observed as a symbol of divine power, a source of energy, and a force of destruction. It represents the dynamic and ever-changing aspects of existence, reminding us of the fleeting nature of life and the need to embrace the present moment. Even in the present day, the Lightning element continues to captivate and amaze. It serves as a reminder of the untamed forces of nature and the boundless potential of human innovation and discovery. == Capabilities == The Lightning element offers a range of capabilities to those skilled in its manipulation. Lightning manipulators can generate and control bolts of electricity, manipulate electrical currents, and move with electrifying speed. They possess a deep connection with the elemental power of lightning, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Lightning manipulation include: * Thunderbolt Strike: Unleashing a powerful bolt of lightning to strike targets with precision. * Electric Shield: Creating a protective barrier of electrical energy to deflect attacks. * Surge of Speed: Channeling lightning energy to enhance agility and movement. These techniques exemplify the Lightning element's electrifying and dynamic nature, providing its users with offensive, defensive, and agile advantages. Lightning manipulators can harness the raw power of electricity, harnessing the energy of storms and charging the battlefield with an electrifying presence. [[Category:The Main 10 Elements]] 258ff63c134cdc86675c379ed97845b17e00666d Metal element 0 909 5773 2023-06-26T01:51:08Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Metal | associated_realm = Mdaia, Mobanue (Margaia) | associated_traits = Strength, resilience, transformation | strengths = Solid and unyielding | weaknesses = Rigidity, vulnerability to corrosion | representatives = Aria (Margaia), Ferron (Valmore) }} Metal, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its strength, resilience, and tr..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Metal | associated_realm = Mdaia, Mobanue (Margaia) | associated_traits = Strength, resilience, transformation | strengths = Solid and unyielding | weaknesses = Rigidity, vulnerability to corrosion | representatives = Aria (Margaia), Ferron (Valmore) }} Metal, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its strength, resilience, and transformative properties, the Metal element forges the foundations of civilization, crafts tools and weaponry, and symbolizes the enduring spirit of progress. The power of Metal commands admiration and respect due to its inherent solidity. Those who possess the ability to manipulate Metal are highly regarded for their mastery over the elemental forces of metallurgy. Their capacity to shape, bend, and refine metals grants them great power and influence in the realm. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"But Primul knew that within the crucible of creation, there must be strength and resilience. From the very depths of the earth, it drew forth the ninth element - Metal. Forged in the heart of the molten core, metal manifested as unyielding armour, sharp-edged blades, and tools of great craftsmanship. It symbolized fortitude, ingenuity, and the power to shape the world."'' Throughout human history, the Metal element has played an integral role. It has provided the tools for progress, the armour for protection, and the infrastructure for civilizations to flourish. Metal has been utilized in the construction of cities, the creation of art, and the forging of mighty weapons. It symbolizes strength, resilience, and the ability to adapt and overcome challenges. Even in the present day, the Metal element continues to inspire innovation and awe. It serves as a reminder of the ingenuity and resourcefulness of humanity, as well as the need for a balance between progress and preservation. == Capabilities == The Metal element offers a range of capabilities to those skilled in its manipulation. Metal manipulators can shape, mould, and transform metal objects, enhancing their strength and durability. They possess a deep connection with the essence of metals, allowing them to extract their raw potential and forge them into formidable creations. == Techniques == Some common techniques associated with Metal manipulation include: * Steel Fist: Infusing metal into physical strikes, increasing their power and impact. * Alloyed Shield: Creating a defensive barrier by manipulating and melding various metals together. * Resonant Forge: Channeling the essence of Metal to superheat and mould metals with exceptional precision. These techniques exemplify the Metal element's solid and unyielding nature, providing its users with offensive, defensive, and transformative advantages. Metal manipulators can shape the battlefield, fortify their defences, and craft powerful weapons and tools, reflecting the enduring spirit of progress and the strength found within the realm of Metal. 3d54b6d8fca83b4218d1fb4bbfc54b519b36723d 5774 5773 2023-06-26T06:02:30Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Metal | associated_realm = Madia (Valmore), Mobanue (Margaia) | associated_traits = Strength, resilience, transformation | strengths = Solid and unyielding | weaknesses = Rigidity, vulnerability to corrosion | representatives = Aria (Margaia), Ferron (Valmore) }} Metal, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its strength, resilience, and transformative properties, the Metal element forges the foundations of civilization, crafts tools and weaponry, and symbolizes the enduring spirit of progress. The power of Metal commands admiration and respect due to its inherent solidity. Those who possess the ability to manipulate Metal are highly regarded for their mastery over the elemental forces of metallurgy. Their capacity to shape, bend, and refine metals grants them great power and influence in the realm. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"But Primul knew that within the crucible of creation, there must be strength and resilience. From the very depths of the earth, it drew forth the ninth element - Metal. Forged in the heart of the molten core, metal manifested as unyielding armour, sharp-edged blades, and tools of great craftsmanship. It symbolized fortitude, ingenuity, and the power to shape the world."'' Throughout human history, the Metal element has played an integral role. It has provided the tools for progress, the armour for protection, and the infrastructure for civilizations to flourish. Metal has been utilized in the construction of cities, the creation of art, and the forging of mighty weapons. It symbolizes strength, resilience, and the ability to adapt and overcome challenges. Even in the present day, the Metal element continues to inspire innovation and awe. It serves as a reminder of the ingenuity and resourcefulness of humanity, as well as the need for a balance between progress and preservation. == Capabilities == The Metal element offers a range of capabilities to those skilled in its manipulation. Metal manipulators can shape, mould, and transform metal objects, enhancing their strength and durability. They possess a deep connection with the essence of metals, allowing them to extract their raw potential and forge them into formidable creations. == Techniques == Some common techniques associated with Metal manipulation include: * Steel Fist: Infusing metal into physical strikes, increasing their power and impact. * Alloyed Shield: Creating a defensive barrier by manipulating and melding various metals together. * Resonant Forge: Channeling the essence of Metal to superheat and mould metals with exceptional precision. These techniques exemplify the Metal element's solid and unyielding nature, providing its users with offensive, defensive, and transformative advantages. Metal manipulators can shape the battlefield, fortify their defences, and craft powerful weapons and tools, reflecting the enduring spirit of progress and the strength found within the realm of Metal. 6a9d7e0b1dfacaab88ea28cb517f3b1d6376425d 5789 5774 2023-06-26T06:12:32Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Metal | associated_realm = Madia (Valmore), Mobanue (Margaia) | associated_traits = Strength, resilience, transformation | strengths = Solid and unyielding | weaknesses = Rigidity, vulnerability to corrosion | representatives = Aria (Margaia), Ferron (Valmore) }} Metal, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its strength, resilience, and transformative properties, the Metal element forges the foundations of civilization, crafts tools and weaponry, and symbolizes the enduring spirit of progress. The power of Metal commands admiration and respect due to its inherent solidity. Those who possess the ability to manipulate Metal are highly regarded for their mastery over the elemental forces of metallurgy. Their capacity to shape, bend, and refine metals grants them great power and influence in the realm. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"But Primul knew that within the crucible of creation, there must be strength and resilience. From the very depths of the earth, it drew forth the ninth element - Metal. Forged in the heart of the molten core, metal manifested as unyielding armour, sharp-edged blades, and tools of great craftsmanship. It symbolized fortitude, ingenuity, and the power to shape the world."'' Throughout human history, the Metal element has played an integral role. It has provided the tools for progress, the armour for protection, and the infrastructure for civilizations to flourish. Metal has been utilized in the construction of cities, the creation of art, and the forging of mighty weapons. It symbolizes strength, resilience, and the ability to adapt and overcome challenges. Even in the present day, the Metal element continues to inspire innovation and awe. It serves as a reminder of the ingenuity and resourcefulness of humanity, as well as the need for a balance between progress and preservation. == Capabilities == The Metal element offers a range of capabilities to those skilled in its manipulation. Metal manipulators can shape, mould, and transform metal objects, enhancing their strength and durability. They possess a deep connection with the essence of metals, allowing them to extract their raw potential and forge them into formidable creations. == Techniques == Some common techniques associated with Metal manipulation include: * Steel Fist: Infusing metal into physical strikes, increasing their power and impact. * Alloyed Shield: Creating a defensive barrier by manipulating and melding various metals together. * Resonant Forge: Channeling the essence of Metal to superheat and mould metals with exceptional precision. These techniques exemplify the Metal element's solid and unyielding nature, providing its users with offensive, defensive, and transformative advantages. Metal manipulators can shape the battlefield, fortify their defences, and craft powerful weapons and tools, reflecting the enduring spirit of progress and the strength found within the realm of Metal. [[Category:The Main 10 Elements]] a0645e92e206b412ece0cc12652a18343d397104 5800 5789 2023-06-26T09:12:29Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Madian Empire.png | element_type = Metal | associated_realm = Madia (Valmore), Mobanue (Margaia) | associated_traits = Strength, resilience, transformation | strengths = Solid and unyielding | weaknesses = Rigidity, vulnerability to corrosion | representatives = Aria (Margaia), Ferron (Valmore) }} Metal, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its strength, resilience, and transformative properties, the Metal element forges the foundations of civilization, crafts tools and weaponry, and symbolizes the enduring spirit of progress. The power of Metal commands admiration and respect due to its inherent solidity. Those who possess the ability to manipulate Metal are highly regarded for their mastery over the elemental forces of metallurgy. Their capacity to shape, bend, and refine metals grants them great power and influence in the realm. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"But Primul knew that within the crucible of creation, there must be strength and resilience. From the very depths of the earth, it drew forth the ninth element - Metal. Forged in the heart of the molten core, metal manifested as unyielding armour, sharp-edged blades, and tools of great craftsmanship. It symbolized fortitude, ingenuity, and the power to shape the world."'' Throughout human history, the Metal element has played an integral role. It has provided the tools for progress, the armour for protection, and the infrastructure for civilizations to flourish. Metal has been utilized in the construction of cities, the creation of art, and the forging of mighty weapons. It symbolizes strength, resilience, and the ability to adapt and overcome challenges. Even in the present day, the Metal element continues to inspire innovation and awe. It serves as a reminder of the ingenuity and resourcefulness of humanity, as well as the need for a balance between progress and preservation. == Capabilities == The Metal element offers a range of capabilities to those skilled in its manipulation. Metal manipulators can shape, mould, and transform metal objects, enhancing their strength and durability. They possess a deep connection with the essence of metals, allowing them to extract their raw potential and forge them into formidable creations. == Techniques == Some common techniques associated with Metal manipulation include: * Steel Fist: Infusing metal into physical strikes, increasing their power and impact. * Alloyed Shield: Creating a defensive barrier by manipulating and melding various metals together. * Resonant Forge: Channeling the essence of Metal to superheat and mould metals with exceptional precision. These techniques exemplify the Metal element's solid and unyielding nature, providing its users with offensive, defensive, and transformative advantages. Metal manipulators can shape the battlefield, fortify their defences, and craft powerful weapons and tools, reflecting the enduring spirit of progress and the strength found within the realm of Metal. [[Category:The Main 10 Elements]] e46540318d49c22472025f7504e75b6429a979ba Light element 0 910 5775 2023-06-26T06:02:34Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Light | associated_realm = Luithia Palatinate (Valmore), Nedens (Margaia) | associated_traits = Brilliance, illumination, energy | strengths = Purifying, healing, protective | weaknesses = Vulnerability to darkness | representatives = Arion (Margaia), Rhys Rhitheus I (Valmore) }} Light, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its b..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Light | associated_realm = Luithia Palatinate (Valmore), Nedens (Margaia) | associated_traits = Brilliance, illumination, energy | strengths = Purifying, healing, protective | weaknesses = Vulnerability to darkness | representatives = Arion (Margaia), Rhys Rhitheus I (Valmore) }} Light, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its brilliance, illumination, and energetic nature, the Light element shines through the darkness, energizes the atmosphere, and creates a sense of hope and optimism. The power of Light commands attention and respect due to its inherent purity. Those who possess the ability to manipulate Light are highly regarded for their mastery over the elemental forces of illumination. Their capacity to harness the raw power of light and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"To further illuminate the world, Primul beckoned the eighth element - Light. Radiant beams pierced through the shadows, revealing hidden paths, and banishing the darkness that clung to the corners of existence. Light became a beacon of hope, guiding the lost and inspiring seekers of truth, and infusing all things with its ethereal glow."'' Throughout human history, the Light element has played an integral role. It has inspired hope, faith, and enlightenment in equal measure. Light has been observed as a symbol of divine purity, a source of energy, and a force of creation. It represents the positive and creative aspects of existence, reminding us of the potential for good in the world and the power of our own inner light. Even in the present day, the Light element continues to captivate and amaze. It serves as a reminder of the divine spark within all of us and the boundless potential of human creativity and innovation. == Capabilities == The Light element offers a range of capabilities to those skilled in its manipulation. Light manipulators can generate and control beams of light, manipulate light waves, and move with blinding speed. They possess a deep connection with the elemental power of light, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Light manipulation include: * Luminous Beam: Emitting concentrated beams of pure light to pierce through darkness or strike targets with ethereal energy. * Radiant Shield: Creating a protective barrier of radiant energy to ward off dark forces or deflect attacks. * Illuminate Truth: Unveiling hidden knowledge or revealing the true nature of things through the illumination of light. * Halo of Serenity: Surrounding oneself with a gentle aura of light to inspire tranquillity and calmness. These techniques exemplify the Light element's purifying and healing nature, providing its users with offensive, defensive, and agile advantages. Light manipulators can harness the raw power of light, harnessing the energy of the sun and illuminating the darkness with their presence. 9a971f3ce948b3bff5bbe9e163e08d146a02765d 5790 5775 2023-06-26T06:12:40Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Light | associated_realm = Luithia Palatinate (Valmore), Nedens (Margaia) | associated_traits = Brilliance, illumination, energy | strengths = Purifying, healing, protective | weaknesses = Vulnerability to darkness | representatives = Arion (Margaia), Rhys Rhitheus I (Valmore) }} Light, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its brilliance, illumination, and energetic nature, the Light element shines through the darkness, energizes the atmosphere, and creates a sense of hope and optimism. The power of Light commands attention and respect due to its inherent purity. Those who possess the ability to manipulate Light are highly regarded for their mastery over the elemental forces of illumination. Their capacity to harness the raw power of light and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"To further illuminate the world, Primul beckoned the eighth element - Light. Radiant beams pierced through the shadows, revealing hidden paths, and banishing the darkness that clung to the corners of existence. Light became a beacon of hope, guiding the lost and inspiring seekers of truth, and infusing all things with its ethereal glow."'' Throughout human history, the Light element has played an integral role. It has inspired hope, faith, and enlightenment in equal measure. Light has been observed as a symbol of divine purity, a source of energy, and a force of creation. It represents the positive and creative aspects of existence, reminding us of the potential for good in the world and the power of our own inner light. Even in the present day, the Light element continues to captivate and amaze. It serves as a reminder of the divine spark within all of us and the boundless potential of human creativity and innovation. == Capabilities == The Light element offers a range of capabilities to those skilled in its manipulation. Light manipulators can generate and control beams of light, manipulate light waves, and move with blinding speed. They possess a deep connection with the elemental power of light, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Light manipulation include: * Luminous Beam: Emitting concentrated beams of pure light to pierce through darkness or strike targets with ethereal energy. * Radiant Shield: Creating a protective barrier of radiant energy to ward off dark forces or deflect attacks. * Illuminate Truth: Unveiling hidden knowledge or revealing the true nature of things through the illumination of light. * Halo of Serenity: Surrounding oneself with a gentle aura of light to inspire tranquillity and calmness. These techniques exemplify the Light element's purifying and healing nature, providing its users with offensive, defensive, and agile advantages. Light manipulators can harness the raw power of light, harnessing the energy of the sun and illuminating the darkness with their presence. [[Category:The Main 10 Elements]] 6edf142ce8e200d78b527758a762c99483e635b1 5799 5790 2023-06-26T09:12:26Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Luithia Palatinate.png | element_type = Light | associated_realm = Luithia Palatinate (Valmore), Nedens (Margaia) | associated_traits = Brilliance, illumination, energy | strengths = Purifying, healing, protective | weaknesses = Vulnerability to darkness | representatives = Arion (Margaia), Rhys Rhitheus I (Valmore) }} Light, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its brilliance, illumination, and energetic nature, the Light element shines through the darkness, energizes the atmosphere, and creates a sense of hope and optimism. The power of Light commands attention and respect due to its inherent purity. Those who possess the ability to manipulate Light are highly regarded for their mastery over the elemental forces of illumination. Their capacity to harness the raw power of light and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"To further illuminate the world, Primul beckoned the eighth element - Light. Radiant beams pierced through the shadows, revealing hidden paths, and banishing the darkness that clung to the corners of existence. Light became a beacon of hope, guiding the lost and inspiring seekers of truth, and infusing all things with its ethereal glow."'' Throughout human history, the Light element has played an integral role. It has inspired hope, faith, and enlightenment in equal measure. Light has been observed as a symbol of divine purity, a source of energy, and a force of creation. It represents the positive and creative aspects of existence, reminding us of the potential for good in the world and the power of our own inner light. Even in the present day, the Light element continues to captivate and amaze. It serves as a reminder of the divine spark within all of us and the boundless potential of human creativity and innovation. == Capabilities == The Light element offers a range of capabilities to those skilled in its manipulation. Light manipulators can generate and control beams of light, manipulate light waves, and move with blinding speed. They possess a deep connection with the elemental power of light, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Light manipulation include: * Luminous Beam: Emitting concentrated beams of pure light to pierce through darkness or strike targets with ethereal energy. * Radiant Shield: Creating a protective barrier of radiant energy to ward off dark forces or deflect attacks. * Illuminate Truth: Unveiling hidden knowledge or revealing the true nature of things through the illumination of light. * Halo of Serenity: Surrounding oneself with a gentle aura of light to inspire tranquillity and calmness. These techniques exemplify the Light element's purifying and healing nature, providing its users with offensive, defensive, and agile advantages. Light manipulators can harness the raw power of light, harnessing the energy of the sun and illuminating the darkness with their presence. [[Category:The Main 10 Elements]] 677ab8d1461fa0834d80261ce38c663e4ae9df3b 5804 5799 2023-06-26T09:15:50Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Light emblem.png | element_type = Light | associated_realm = Luithia Palatinate (Valmore), Nedens (Margaia) | associated_traits = Brilliance, illumination, energy | strengths = Purifying, healing, protective | weaknesses = Vulnerability to darkness | representatives = Arion (Margaia), Rhys Rhitheus I (Valmore) }} Light, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its brilliance, illumination, and energetic nature, the Light element shines through the darkness, energizes the atmosphere, and creates a sense of hope and optimism. The power of Light commands attention and respect due to its inherent purity. Those who possess the ability to manipulate Light are highly regarded for their mastery over the elemental forces of illumination. Their capacity to harness the raw power of light and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"To further illuminate the world, Primul beckoned the eighth element - Light. Radiant beams pierced through the shadows, revealing hidden paths, and banishing the darkness that clung to the corners of existence. Light became a beacon of hope, guiding the lost and inspiring seekers of truth, and infusing all things with its ethereal glow."'' Throughout human history, the Light element has played an integral role. It has inspired hope, faith, and enlightenment in equal measure. Light has been observed as a symbol of divine purity, a source of energy, and a force of creation. It represents the positive and creative aspects of existence, reminding us of the potential for good in the world and the power of our own inner light. Even in the present day, the Light element continues to captivate and amaze. It serves as a reminder of the divine spark within all of us and the boundless potential of human creativity and innovation. == Capabilities == The Light element offers a range of capabilities to those skilled in its manipulation. Light manipulators can generate and control beams of light, manipulate light waves, and move with blinding speed. They possess a deep connection with the elemental power of light, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Light manipulation include: * Luminous Beam: Emitting concentrated beams of pure light to pierce through darkness or strike targets with ethereal energy. * Radiant Shield: Creating a protective barrier of radiant energy to ward off dark forces or deflect attacks. * Illuminate Truth: Unveiling hidden knowledge or revealing the true nature of things through the illumination of light. * Halo of Serenity: Surrounding oneself with a gentle aura of light to inspire tranquillity and calmness. These techniques exemplify the Light element's purifying and healing nature, providing its users with offensive, defensive, and agile advantages. Light manipulators can harness the raw power of light, harnessing the energy of the sun and illuminating the darkness with their presence. [[Category:The Main 10 Elements]] 71b56bc73a74f9dbfa4d7346a965e3c0e68237ff Dark element 0 911 5776 2023-06-26T06:07:21Z Tasha04 2 Created page with "{{Infobox element | header0 = | image = | element_type = Dark | associated_realm = Dremmutian Brotherhood (Valmore), Nocturnia (Margaia) | associated_traits = Shadows, secrecy, mystery | strengths = Elusive and enigmatic | weaknesses = Vulnerability to light, temptation of darkness | representatives = Nyxara (Nocturnia), Sinuset (Valmore) }} Darkness, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered..." wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Dark | associated_realm = Dremmutian Brotherhood (Valmore), Nocturnia (Margaia) | associated_traits = Shadows, secrecy, mystery | strengths = Elusive and enigmatic | weaknesses = Vulnerability to light, temptation of darkness | representatives = Nyxara (Nocturnia), Sinuset (Valmore) }} Darkness, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its shadows, secrecy, and mysterious energy, the Dark element veils the world in obscurity, concealing secrets and invoking a sense of intrigue and fascination. The power of Darkness commands curiosity and caution due to its enigmatic nature. Those who possess the ability to manipulate Dark energy are highly regarded for their mastery over the shadows and their capacity to harness the hidden forces of the night. Their connection to the Dark realm grants them great power and influence over secrets and unseen forces. == History == According to ancient chronicles of Margaia, the Dark element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Darkness as follows: ''"And finally, to complete the symphony of existence, Primul called upon the tenth element - Dark. Born from the interplay of shadows and absence, Dark became the counterbalance to Light. It held the mysteries of the unseen, the enigma of the hidden, and the potential for both dread and revelation. Dark reminded all that within the embrace of night, there was room for introspection, transformation, and the emergence of unseen wonders."'' Throughout human history, the Dark element has played an integral role. It has been both feared and revered, associated with the unseen and the subconscious. Darkness has been a source of inspiration for artists and philosophers, invoking a sense of mystery and sparking the imagination. It represents the depths of human experience, the duality of existence, and the constant interplay between light and shadow. Even in the present day, the Dark element continues to fascinate and captivate. It serves as a reminder of the unexplored realms of the mind, the allure of the unknown, and the transformative power of embracing the shadows. == Capabilities == The Dark element offers a range of capabilities to those skilled in its manipulation. Dark manipulators can cloak themselves in shadows, manipulate the unseen, and tap into the hidden depths of knowledge. They possess a deep connection with the mysteries of the night, allowing them to harness the power of the unknown and manifest its transformative energy. == Techniques == Some common techniques associated with Dark manipulation include: * Shadow Veil: Cloaking oneself or objects in an impenetrable shroud of darkness, rendering them invisible to the naked eye. * Umbral Grasp: Reaching into the shadows to manipulate objects or ensnare foes with ethereal tendrils. * Whispered Secrets: Unveiling hidden knowledge, extracting information from the depths of the subconscious, or manipulating the thoughts of others. * Eclipse of Fear: Manipulating the fears and anxieties of individuals, casting a shadow of doubt and weakening their resolve. These techniques exemplify the Dark element's elusive and enigmatic nature, providing its users with stealth, manipulation, and the ability to tap into the hidden recesses of knowledge. Dark manipulators can navigate the shadows, unravel secrets, and invoke a sense of mystery and intrigue, embodying the transformative power of the realm of Darkness. 79a3da5f88b071b3162c4ab0e5a9447f0ae156c0 5791 5776 2023-06-26T06:12:49Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = | element_type = Dark | associated_realm = Dremmutian Brotherhood (Valmore), Nocturnia (Margaia) | associated_traits = Shadows, secrecy, mystery | strengths = Elusive and enigmatic | weaknesses = Vulnerability to light, temptation of darkness | representatives = Nyxara (Nocturnia), Sinuset (Valmore) }} Darkness, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its shadows, secrecy, and mysterious energy, the Dark element veils the world in obscurity, concealing secrets and invoking a sense of intrigue and fascination. The power of Darkness commands curiosity and caution due to its enigmatic nature. Those who possess the ability to manipulate Dark energy are highly regarded for their mastery over the shadows and their capacity to harness the hidden forces of the night. Their connection to the Dark realm grants them great power and influence over secrets and unseen forces. == History == According to ancient chronicles of Margaia, the Dark element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Darkness as follows: ''"And finally, to complete the symphony of existence, Primul called upon the tenth element - Dark. Born from the interplay of shadows and absence, Dark became the counterbalance to Light. It held the mysteries of the unseen, the enigma of the hidden, and the potential for both dread and revelation. Dark reminded all that within the embrace of night, there was room for introspection, transformation, and the emergence of unseen wonders."'' Throughout human history, the Dark element has played an integral role. It has been both feared and revered, associated with the unseen and the subconscious. Darkness has been a source of inspiration for artists and philosophers, invoking a sense of mystery and sparking the imagination. It represents the depths of human experience, the duality of existence, and the constant interplay between light and shadow. Even in the present day, the Dark element continues to fascinate and captivate. It serves as a reminder of the unexplored realms of the mind, the allure of the unknown, and the transformative power of embracing the shadows. == Capabilities == The Dark element offers a range of capabilities to those skilled in its manipulation. Dark manipulators can cloak themselves in shadows, manipulate the unseen, and tap into the hidden depths of knowledge. They possess a deep connection with the mysteries of the night, allowing them to harness the power of the unknown and manifest its transformative energy. == Techniques == Some common techniques associated with Dark manipulation include: * Shadow Veil: Cloaking oneself or objects in an impenetrable shroud of darkness, rendering them invisible to the naked eye. * Umbral Grasp: Reaching into the shadows to manipulate objects or ensnare foes with ethereal tendrils. * Whispered Secrets: Unveiling hidden knowledge, extracting information from the depths of the subconscious, or manipulating the thoughts of others. * Eclipse of Fear: Manipulating the fears and anxieties of individuals, casting a shadow of doubt and weakening their resolve. These techniques exemplify the Dark element's elusive and enigmatic nature, providing its users with stealth, manipulation, and the ability to tap into the hidden recesses of knowledge. Dark manipulators can navigate the shadows, unravel secrets, and invoke a sense of mystery and intrigue, embodying the transformative power of the realm of Darkness. [[Category:The Main 10 Elements]] d3def0768acde86b37f3610386d88df3391294f0 5798 5791 2023-06-26T09:12:21Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Dremmutian Brotherhood.png | element_type = Dark | associated_realm = Dremmutian Brotherhood (Valmore), Nocturnia (Margaia) | associated_traits = Shadows, secrecy, mystery | strengths = Elusive and enigmatic | weaknesses = Vulnerability to light, temptation of darkness | representatives = Nyxara (Nocturnia), Sinuset (Valmore) }} Darkness, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its shadows, secrecy, and mysterious energy, the Dark element veils the world in obscurity, concealing secrets and invoking a sense of intrigue and fascination. The power of Darkness commands curiosity and caution due to its enigmatic nature. Those who possess the ability to manipulate Dark energy are highly regarded for their mastery over the shadows and their capacity to harness the hidden forces of the night. Their connection to the Dark realm grants them great power and influence over secrets and unseen forces. == History == According to ancient chronicles of Margaia, the Dark element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Darkness as follows: ''"And finally, to complete the symphony of existence, Primul called upon the tenth element - Dark. Born from the interplay of shadows and absence, Dark became the counterbalance to Light. It held the mysteries of the unseen, the enigma of the hidden, and the potential for both dread and revelation. Dark reminded all that within the embrace of night, there was room for introspection, transformation, and the emergence of unseen wonders."'' Throughout human history, the Dark element has played an integral role. It has been both feared and revered, associated with the unseen and the subconscious. Darkness has been a source of inspiration for artists and philosophers, invoking a sense of mystery and sparking the imagination. It represents the depths of human experience, the duality of existence, and the constant interplay between light and shadow. Even in the present day, the Dark element continues to fascinate and captivate. It serves as a reminder of the unexplored realms of the mind, the allure of the unknown, and the transformative power of embracing the shadows. == Capabilities == The Dark element offers a range of capabilities to those skilled in its manipulation. Dark manipulators can cloak themselves in shadows, manipulate the unseen, and tap into the hidden depths of knowledge. They possess a deep connection with the mysteries of the night, allowing them to harness the power of the unknown and manifest its transformative energy. == Techniques == Some common techniques associated with Dark manipulation include: * Shadow Veil: Cloaking oneself or objects in an impenetrable shroud of darkness, rendering them invisible to the naked eye. * Umbral Grasp: Reaching into the shadows to manipulate objects or ensnare foes with ethereal tendrils. * Whispered Secrets: Unveiling hidden knowledge, extracting information from the depths of the subconscious, or manipulating the thoughts of others. * Eclipse of Fear: Manipulating the fears and anxieties of individuals, casting a shadow of doubt and weakening their resolve. These techniques exemplify the Dark element's elusive and enigmatic nature, providing its users with stealth, manipulation, and the ability to tap into the hidden recesses of knowledge. Dark manipulators can navigate the shadows, unravel secrets, and invoke a sense of mystery and intrigue, embodying the transformative power of the realm of Darkness. [[Category:The Main 10 Elements]] b644524b55d86a5bd10925b32d3a858dd5044fa5 5803 5798 2023-06-26T09:15:48Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Dark emblem.png | element_type = Dark | associated_realm = Dremmutian Brotherhood (Valmore), Nocturnia (Margaia) | associated_traits = Shadows, secrecy, mystery | strengths = Elusive and enigmatic | weaknesses = Vulnerability to light, temptation of darkness | representatives = Nyxara (Nocturnia), Sinuset (Valmore) }} Darkness, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its shadows, secrecy, and mysterious energy, the Dark element veils the world in obscurity, concealing secrets and invoking a sense of intrigue and fascination. The power of Darkness commands curiosity and caution due to its enigmatic nature. Those who possess the ability to manipulate Dark energy are highly regarded for their mastery over the shadows and their capacity to harness the hidden forces of the night. Their connection to the Dark realm grants them great power and influence over secrets and unseen forces. == History == According to ancient chronicles of Margaia, the Dark element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Darkness as follows: ''"And finally, to complete the symphony of existence, Primul called upon the tenth element - Dark. Born from the interplay of shadows and absence, Dark became the counterbalance to Light. It held the mysteries of the unseen, the enigma of the hidden, and the potential for both dread and revelation. Dark reminded all that within the embrace of night, there was room for introspection, transformation, and the emergence of unseen wonders."'' Throughout human history, the Dark element has played an integral role. It has been both feared and revered, associated with the unseen and the subconscious. Darkness has been a source of inspiration for artists and philosophers, invoking a sense of mystery and sparking the imagination. It represents the depths of human experience, the duality of existence, and the constant interplay between light and shadow. Even in the present day, the Dark element continues to fascinate and captivate. It serves as a reminder of the unexplored realms of the mind, the allure of the unknown, and the transformative power of embracing the shadows. == Capabilities == The Dark element offers a range of capabilities to those skilled in its manipulation. Dark manipulators can cloak themselves in shadows, manipulate the unseen, and tap into the hidden depths of knowledge. They possess a deep connection with the mysteries of the night, allowing them to harness the power of the unknown and manifest its transformative energy. == Techniques == Some common techniques associated with Dark manipulation include: * Shadow Veil: Cloaking oneself or objects in an impenetrable shroud of darkness, rendering them invisible to the naked eye. * Umbral Grasp: Reaching into the shadows to manipulate objects or ensnare foes with ethereal tendrils. * Whispered Secrets: Unveiling hidden knowledge, extracting information from the depths of the subconscious, or manipulating the thoughts of others. * Eclipse of Fear: Manipulating the fears and anxieties of individuals, casting a shadow of doubt and weakening their resolve. These techniques exemplify the Dark element's elusive and enigmatic nature, providing its users with stealth, manipulation, and the ability to tap into the hidden recesses of knowledge. Dark manipulators can navigate the shadows, unravel secrets, and invoke a sense of mystery and intrigue, embodying the transformative power of the realm of Darkness. [[Category:The Main 10 Elements]] 578ccc452dac6a758150388b5df551149270e1c4 Category:The Main 10 Elements 14 912 5793 2023-06-26T06:16:48Z Tasha04 2 Created page with "== The Main 10 Elements == In the entirety of Malvounus's history, the ten main elements form the very essence of existence, each embodying unique energies and powers that shape the planet. These elements are revered and celebrated for their role in the intricate balance of nature and the diverse experiences of life. Each of these ten elements intertwines and influences one another, creating a harmonious symphony of existence within the universe. Their interactions sha..." wikitext text/x-wiki == The Main 10 Elements == In the entirety of Malvounus's history, the ten main elements form the very essence of existence, each embodying unique energies and powers that shape the planet. These elements are revered and celebrated for their role in the intricate balance of nature and the diverse experiences of life. Each of these ten elements intertwines and influences one another, creating a harmonious symphony of existence within the universe. Their interactions shape the natural world, inspire magical abilities, and provide the foundation for wondrous adventures. e2fbbd7c38a9b5d45331f50b18b18fe4de8c23dd Valmore 0 801 5794 5732 2023-06-26T06:17:47Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on [[Malvounus]], a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Origins === Valmore's discovery can be traced back to the tumultuous "Battle of Eternal Regrets," a devastating conflict that unfolded in the once-thriving land of Margaia. Mythic rulers, consumed by power and ambition, clashed in this momentous war, leaving Margaia and its elemental kingdoms in ruins. In the aftermath, shattered and desperate survivors yearned for a fresh start. Led by the fearless explorer Aella, they embarked on a courageous expedition in the year 15 AW (After War), venturing into uncharted waters beyond Margaia's borders. Their goal was to find a new home and rebuild their shattered lives. After enduring arduous weeks at sea, [[Aella|Aella]] and her crew were filled with awe as they stepped foot on an undiscovered land. Valmore, as it would be named, revealed itself as a lush and pristine continent, untouched by the scars of war. It became a haven of natural beauty, thriving with vibrant life and free from the corruption and violence that plagued Margaia. Valmore blossomed as a haven of unparalleled beauty with lush forests, meandering rivers, majestic mountains, and fertile valleys. Its vibrant ecosystems flourished, creating a harmonious balance between flora and fauna. In this new land, the survivors found solace, a sanctuary where the corruption and violence that plagued Margaia seemed but distant echoes of a troubled past. The arrival of the survivors marked the birth of a new era in Valmore's history. Inspired by the unspoiled beauty and untapped potential of their newfound home, they set out to rebuild their lives and forge a society based on principles of harmony, cooperation, and reverence for the natural world. == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == f03aeb7f28ec2d72a0fa67ee622a191def012fbf Template:Infobox planet 10 913 5795 2023-06-26T06:21:11Z Tasha04 2 Created page with "{{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries..." wikitext text/x-wiki {{Infobox |header0 = {{{title|{{PAGENAME}}}}} |image = {{{image|}}} |key3 = {{#if:{{{area|}}}|Area}} |value3 = {{{area|}}} |key4 = {{#if:{{{population|}}}|Population}} |value4 = {{{population|}}} |key5 = {{#if:{{{ethnicgroups|}}}|Ethnic groups}} |value5 = {{{ethnicgroups|}}} |key6 = {{#if:{{{religions|}}}|Religions}} |value6 = {{{religions|}}} |key7 = {{#if:{{{demonym|}}}|Demonym}} |value7 = {{{demonym|}}} |key8 = {{#if:{{{countries|}}}|Countries}} |value8 = {{{countries|}}} |key9 = {{#if:{{{languages|}}}|Languages}} |value9 = {{{languages|}}} |key10 = {{#if:{{{system|}}}|System}} |value10 = Eusebeia Nebula }} b2cd49fb4d15414e78ab48d5552c6bfd081c216a Malvounus 0 914 5796 2023-06-26T06:43:53Z Tasha04 2 Created page with "{{Infobox planet | header0 = Malvounus | image = Malvounus.jpg | title = Malvounus | area = 12 million square kilometers | population = Roughly 1.8 billion | ethnicgroups = Various | religions = Various | demonym = Malvounian | countries = Various | languages = Various }} Malvounus, a celestial body nestled within the vast expanse of the Eusebeia Nebula system, captivates the imagination with its enchanting allure. This remarkable planet, bearing a name of its own,..." wikitext text/x-wiki {{Infobox planet | header0 = Malvounus | image = Malvounus.jpg | title = Malvounus | area = 12 million square kilometers | population = Roughly 1.8 billion | ethnicgroups = Various | religions = Various | demonym = Malvounian | countries = Various | languages = Various }} Malvounus, a celestial body nestled within the vast expanse of the Eusebeia Nebula system, captivates the imagination with its enchanting allure. This remarkable planet, bearing a name of its own, holds a tapestry of wonders within its sprawling borders. With an expansive area covering 12 million square kilometres, Malvounus boasts diverse landscapes and breathtaking vistas. From lush forests teeming with vibrant flora to majestic mountain ranges reaching toward the heavens, the planet offers a mesmerizing array of natural beauty. == Name == == Physical characteristics == == History == 8a43fb0255d805152f3169277d0cdaa27955e02b Metal element 0 909 5805 5800 2023-06-26T09:15:52Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Metal emblem.png | element_type = Metal | associated_realm = Madia (Valmore), Mobanue (Margaia) | associated_traits = Strength, resilience, transformation | strengths = Solid and unyielding | weaknesses = Rigidity, vulnerability to corrosion | representatives = Aria (Margaia), Ferron (Valmore) }} Metal, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its strength, resilience, and transformative properties, the Metal element forges the foundations of civilization, crafts tools and weaponry, and symbolizes the enduring spirit of progress. The power of Metal commands admiration and respect due to its inherent solidity. Those who possess the ability to manipulate Metal are highly regarded for their mastery over the elemental forces of metallurgy. Their capacity to shape, bend, and refine metals grants them great power and influence in the realm. == History == According to ancient chronicles of Margaia, the Metal element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Metal as follows: ''"But Primul knew that within the crucible of creation, there must be strength and resilience. From the very depths of the earth, it drew forth the ninth element - Metal. Forged in the heart of the molten core, metal manifested as unyielding armour, sharp-edged blades, and tools of great craftsmanship. It symbolized fortitude, ingenuity, and the power to shape the world."'' Throughout human history, the Metal element has played an integral role. It has provided the tools for progress, the armour for protection, and the infrastructure for civilizations to flourish. Metal has been utilized in the construction of cities, the creation of art, and the forging of mighty weapons. It symbolizes strength, resilience, and the ability to adapt and overcome challenges. Even in the present day, the Metal element continues to inspire innovation and awe. It serves as a reminder of the ingenuity and resourcefulness of humanity, as well as the need for a balance between progress and preservation. == Capabilities == The Metal element offers a range of capabilities to those skilled in its manipulation. Metal manipulators can shape, mould, and transform metal objects, enhancing their strength and durability. They possess a deep connection with the essence of metals, allowing them to extract their raw potential and forge them into formidable creations. == Techniques == Some common techniques associated with Metal manipulation include: * Steel Fist: Infusing metal into physical strikes, increasing their power and impact. * Alloyed Shield: Creating a defensive barrier by manipulating and melding various metals together. * Resonant Forge: Channeling the essence of Metal to superheat and mould metals with exceptional precision. These techniques exemplify the Metal element's solid and unyielding nature, providing its users with offensive, defensive, and transformative advantages. Metal manipulators can shape the battlefield, fortify their defences, and craft powerful weapons and tools, reflecting the enduring spirit of progress and the strength found within the realm of Metal. [[Category:The Main 10 Elements]] 94c5faaefe6264bd65338c7d8300f9c9b26dca1c Lightning element 0 908 5806 5801 2023-06-26T09:15:54Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Lightning emblem.png | element_type = Lightning | associated_realm = Lakya (Valmore), Saretagar (Margaia) | associated_traits = Power, speed, electricity | strengths = Electrifying and dynamic | weaknesses = Instability, vulnerability to grounding | representatives = Voltarion (Margaia), Arvind (Valmore) }} Lightning, as an elemental force within the realm, holds immense significance and plays a vital role in shaping the world. Revered for its power, speed, and electrifying energy, the Lightning element crackles through the skies, energizes the atmosphere, and creates a sense of awe and wonder. The power of Lightning commands attention and respect due to its inherent intensity. Those who possess the ability to manipulate Lightning are highly regarded for their mastery over the elemental forces of electricity. Their capacity to harness the raw power of lightning and channel its energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Lightning element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Lightning as follows: ''"Yet, Primul yearned for the explosive power that danced across the heavens. With a flash of lightning, the seventh element - Lightning - leaped into existence. Bolts of electric energy streaked across the skies, illuminating the darkness, and electrifying the world with their fierce vitality. Lightning became the herald of change, the embodiment of swift and untamed power."'' Throughout human history, the Lightning element has played an integral role. It has inspired awe, fear, and admiration in equal measure. Lightning has been observed as a symbol of divine power, a source of energy, and a force of destruction. It represents the dynamic and ever-changing aspects of existence, reminding us of the fleeting nature of life and the need to embrace the present moment. Even in the present day, the Lightning element continues to captivate and amaze. It serves as a reminder of the untamed forces of nature and the boundless potential of human innovation and discovery. == Capabilities == The Lightning element offers a range of capabilities to those skilled in its manipulation. Lightning manipulators can generate and control bolts of electricity, manipulate electrical currents, and move with electrifying speed. They possess a deep connection with the elemental power of lightning, allowing them to harness its energy and unleash devastating attacks. == Techniques == Some common techniques associated with Lightning manipulation include: * Thunderbolt Strike: Unleashing a powerful bolt of lightning to strike targets with precision. * Electric Shield: Creating a protective barrier of electrical energy to deflect attacks. * Surge of Speed: Channeling lightning energy to enhance agility and movement. These techniques exemplify the Lightning element's electrifying and dynamic nature, providing its users with offensive, defensive, and agile advantages. Lightning manipulators can harness the raw power of electricity, harnessing the energy of storms and charging the battlefield with an electrifying presence. [[Category:The Main 10 Elements]] 7f44b3933108b45897efb81ab586194b99d1f8f1 Plant element 0 907 5807 5802 2023-06-26T09:15:56Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Plant emblem.png | element_type = Plant | associated_realm = Preapia (Valmore), Elara (Margaia) | associated_traits = Growth, life, healing | strengths = Nurturing and adaptable | weaknesses = Overgrowth, vulnerability to fire | representatives = Verdantia (Margaia), Lyylikki (Valmore) }} Plants, as an elemental force within the realm, hold immense significance and play a vital role in shaping the world. Revered for their growth, vitality, and harmonious energy, the Plant element weaves together the lush landscapes, sustains life, and brings a sense of natural balance to the realm. The power of Plants commands appreciation and care due to their nurturing strength. Those who possess the ability to manipulate Plants are highly regarded for their mastery over the living essence of the world. Their capacity to cultivate flora, harness the energy of nature, and foster harmony grants them great power and influence. == History == According to ancient chronicles of Margaia, the Plant element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Plant as follows: ''"To honor the abundance of nature, Primul summoned the sixth element - Plant. From the fertile soil, sprouts burst forth, leaves unfurled, and flowers bloomed in radiant colors. Plants spread across Margaia, providing shelter, sustenance, and the healing touch of nature's embrace. They intertwined with the earth, celebrating the cycle of life and offering glimpses of the divine design."'' Throughout human history, the Plant element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Plant has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Plant symbolizes growth, life, and healing, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Plant element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Plant serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Plant element offers a range of capabilities to those skilled in its manipulation. Plant manipulators can shape and control the land, causing plants to grow, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the plant's energy, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Plant manipulation include: * Plant Growth: Causing plants to grow rapidly, creating barricades or even attacking enemies. * Healing Touch: Using the power of plants to heal wounds or restore vitality. * Nature's Embrace: Blending with the plants, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Plant element's growth and life-giving nature, providing its users with defensive and supportive advantages. [[Category:The Main 10 Elements]] 6b8e9734d36df153c89374f34b52a9fe48484166 Ice element 0 906 5808 5786 2023-06-26T09:15:58Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Ice emblem.png | element_type = Ice | associated_realm = Icrouryn (Valmore), Pinoilea (Margaia) | associated_traits = Coldness, purity, preservation | strengths = Resilient and unyielding | weaknesses = Rigidity, isolation | representatives = Frostweaver (Margaia), Leofric (Valmore) }} Ice, as an elemental force within the realm, holds great significance and plays a pivotal role in shaping the world. Revered for its coldness, purity, and preservation qualities, the Ice element moulds the frozen landscapes, blankets the land in frost, and bestows a sense of stillness and tranquillity upon the realm. The power of Ice commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Ice are highly regarded for their mastery over the frozen essence of the world. Their capacity to shape ice crystals, control temperatures, and harness the chilling energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Ice element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Ice as follows: ''"Yet, Primul sensed the presence of a dormant force within the void. From the icy abyss, it called forth the fifth element - Ice. Frost formed, encasing the landscapes in glistening crystals and bringing forth a sense of stillness and tranquillity. Ice mirrored the frigid beauty of winter, preserving and crystallizing moments in time."'' Throughout history, the Ice element has played an integral role. It has provided protection against the harshness of winter, preserved resources, and served as a source of inspiration for art, poetry, and storytelling. Ice symbolizes coldness, purity, and the delicate balance between preservation and isolation. Even in the present day, the Ice element continues to captivate and inspire. It reminds us of the beauty and tranquility that can be found in stillness, the resilience of life in freezing conditions, and the potential for transformation that lies within the icy depths. == Capabilities == The Ice element offers a range of capabilities to those skilled in its manipulation. Ice manipulators can freeze water, create ice formations, and control temperature, granting them control over the chilling forces of nature. They possess a deep connection with the frozen essence, allowing them to draw strength and resilience from their surroundings. == Techniques == Some common techniques associated with Ice manipulation include: * Frostbite: Channeling the coldness to inflict freezing injuries upon opponents. * Glacial Barrier: Forming protective barriers made of solid ice. * Frost Nova: Unleashing a burst of icy energy, freezing the surrounding area and immobilizing adversaries. * Frostweaving: Creating intricate ice sculptures and structures with precise control over frozen water. These techniques exemplify the Ice element's resilient and unyielding nature, providing its users with defensive, strategic, and artistic advantages. Ice manipulators can shape the frozen world, command blizzards, and harness the power of frost to evoke both awe and fear. [[Category:The Main 10 Elements]] 414d0ee8c04855f742642e92417198744acaad86 Air element 0 905 5809 5785 2023-06-26T09:16:00Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = Air | image = Air emblem.png | element_type = Air emblem.png | associated_realm = Aihekar (Valmore), Eleurion (Margaia) | associated_traits = Freedom, movement, intuition | strengths = Adaptable, agile | weaknesses = Easily distracted, scattered | representatives = Ventus (Margaia), Aerendir (Valmore) }} Air, as the 9 main elements in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its freedom, movement, and intuitive energy, the Air element fills the skies, sustains life, and provides a line for communication and travel. The power of Air commands respect and caution due to its inherent flexibility. Those who possess the ability to manipulate Air are highly regarded for their mastery over the very breath of life. Their capacity to shape the wind and harness the air's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Air element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Air as follows: ''"But as the world continued to evolve, it became clear that there was a need for movement and change. From the heights of the heavens, the element of Air descended, bringing with it a gentle breeze that whispered secrets in the wind. Air carried the songs of birds, the scent of flowers, and the breath of life itself, filling the world with its ethereal presence."'' Throughout human history, the Air element has played an integral role. It has provided transportation, communication, and care for civilizations. Air has been utilized in the construction of sails, kites, and other flying machines. It has also found its place in religious ceremonies and artistic expressions. Air symbolizes freedom, movement, and creativity, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Air element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human ingenuity. Air serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Air element offers a range of capabilities to those skilled in its manipulation. Air manipulators can shape and control the wind, causing gusts, creating tornadoes, and even flying. They possess a deep connection with the air's energy, allowing them to draw strength and agility from their surroundings. == Techniques == Some common techniques associated with Air manipulation include: * Wind Blast: Generating powerful gusts of wind to knock an enemy back or even knock them unconscious. * Air Shield: A shield made of air that can protect the user from attacks. * Air Walk: Walking on air currents, allowing for sustained flight. * Air Step: Creating temporary platforms of air, allowing for short-range teleportation. These techniques exemplify the Air element's free-flowing nature, providing its users with offensive and defensive advantages. [[Category:The Main 10 Elements]] 24d0db30523520c22b63146191895f173143e297 5813 5809 2023-06-26T09:16:24Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = Air | image = Air emblem.png | element_type = Air | associated_realm = Aihekar (Valmore), Eleurion (Margaia) | associated_traits = Freedom, movement, intuition | strengths = Adaptable, agile | weaknesses = Easily distracted, scattered | representatives = Ventus (Margaia), Aerendir (Valmore) }} Air, as the 9 main elements in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its freedom, movement, and intuitive energy, the Air element fills the skies, sustains life, and provides a line for communication and travel. The power of Air commands respect and caution due to its inherent flexibility. Those who possess the ability to manipulate Air are highly regarded for their mastery over the very breath of life. Their capacity to shape the wind and harness the air's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Air element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Air as follows: ''"But as the world continued to evolve, it became clear that there was a need for movement and change. From the heights of the heavens, the element of Air descended, bringing with it a gentle breeze that whispered secrets in the wind. Air carried the songs of birds, the scent of flowers, and the breath of life itself, filling the world with its ethereal presence."'' Throughout human history, the Air element has played an integral role. It has provided transportation, communication, and care for civilizations. Air has been utilized in the construction of sails, kites, and other flying machines. It has also found its place in religious ceremonies and artistic expressions. Air symbolizes freedom, movement, and creativity, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Air element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human ingenuity. Air serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Air element offers a range of capabilities to those skilled in its manipulation. Air manipulators can shape and control the wind, causing gusts, creating tornadoes, and even flying. They possess a deep connection with the air's energy, allowing them to draw strength and agility from their surroundings. == Techniques == Some common techniques associated with Air manipulation include: * Wind Blast: Generating powerful gusts of wind to knock an enemy back or even knock them unconscious. * Air Shield: A shield made of air that can protect the user from attacks. * Air Walk: Walking on air currents, allowing for sustained flight. * Air Step: Creating temporary platforms of air, allowing for short-range teleportation. These techniques exemplify the Air element's free-flowing nature, providing its users with offensive and defensive advantages. [[Category:The Main 10 Elements]] 11edd55872b4c153dad5bef179d6917877ae84b4 Water element 0 904 5810 5784 2023-06-26T09:16:02Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Water emblem.png | element_type = Water | associated_realm = Wraphegia (Valmore), Sorfika (Margaia) | associated_traits = Adaptability, intuition, fluidity | strengths = Versatile and adaptable | weaknesses = Overemotional, indecisive | representatives = Nereus (Margaia), Marcellus (Valmore) }} Water, as one of the fundamental elements, holds immense significance and plays a vital role in shaping the realm. Known for its fluidity and adaptability, the Water element embodies the ever-changing nature of life itself. It is a force that brings nourishment, healing, and the potential for transformation. == History == According to ancient texts and legends, the Water element originated from Margaia, born from the primordial energies that first shaped the realm. It is believed that the convergence of rivers, lakes, and oceans gave birth to the element, imbuing it with its intrinsic properties. ''"Yet, in the presence of Fire and Earth, there was a longing for harmony and balance. From the vast oceans, misty rivers, and crystalline waterfalls, the element of Water emerged. Its gentle currents embraced the land, nourishing it and giving life to all creatures. Water flowed with grace and serenity, embodying the ebb and flow of existence."'' Throughout history, Water has played a key role in human civilizations. It has provided sustenance, facilitated transportation and trade, and served as a source of inspiration and spiritual purification. Water's versatile nature has allowed civilizations to thrive and adapt to their environments, harnessing its power for both practical and mystical purposes. == Capabilities == Water manipulation provides individuals with a diverse range of capabilities. Skilled Water users can shape and control water bodies, summon rainstorms, create fog or mist, and even freeze water into solid forms. The element's healing properties allow for the mending of wounds and restoration of vitality. == Techniques == Some common techniques associated with Water manipulation include: * Aqua Manipulation: The ability to manipulate and control water in various forms, such as liquid, mist, or ice. * Healing Waters: Using Water's purifying properties to heal wounds, cure ailments, and restore vitality. * Water Whip: Forming water into a whip-like structure for offensive purposes. * Hydrokinesis: The power to manipulate and control the movement of water, shaping it into powerful currents or protective barriers. * Mist Veil: Creating a misty veil that obscures vision and provides an advantage in stealth or escape. These techniques highlight the versatility and fluid nature of the Water element, allowing its users to adapt to various situations and harness its power for both offensive and defensive purposes. [[Category:The Main 10 Elements]] 3391cc62851b8cfa0ebcaeb28b1e13309a8be1b7 Earth element 0 903 5811 5783 2023-06-26T09:16:03Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Earth emblem.png | element_type = Earth | associated_realm = Kvivik (Valmore), Kvivik (Margaia) | associated_traits = Stability, endurance, grounding | strengths = Firm and unyielding | weaknesses = Stubbornness, possessiveness | representatives = Bilbunzar (Margaia), Bhartolk (Valmore) }} Earth, as the second main element in the realm, holds immense significance and plays a vital role in shaping the world. Revered for its endurance, stability, and grounding energy, the Earth element moulds the landscapes, sustains life, and provides a solid foundation for all existence. The power of Earth commands respect and caution due to its inherent strength. Those who possess the ability to manipulate Earth are highly regarded for their mastery over the very fabric of the world. Their capacity to shape the land and harness the earth's energy grants them great power and influence. == History == According to ancient chronicles of Margaia, the Earth element, like the other nine elements, originated from the primordial energies of the realm, created by a being known as "Primul." The text describes the emergence of Earth as follows: ''"As Fire blazed, its scorching heat stirred the dormant energies nearby, giving rise to the second element - Earth. From the depths of the earth's core, mountains rose, valleys formed, and lush forests flourished. The element of Earth stood steadfast and stable, providing a solid foundation for the world to take shape."'' Throughout human history, the Earth element has played an integral role. It has provided shelter, sustenance, and protection for civilizations. Earth has been utilized in the construction of dwellings, fortifications, and infrastructure. It has also found its place in religious ceremonies and artistic expressions. Earth symbolizes stability, endurance, and growth, serving as a reminder of the potential for both positive and negative forces in the world. Even today, the Earth element continues to inspire awe and wonder. It reminds us of the power of nature and the boundless potential of human creativity. Earth serves as a symbol of hope, resilience, and the indomitable spirit that resides within every living being. == Capabilities == The Earth element offers a range of capabilities to those skilled in its manipulation. Earth manipulators can shape and control the land, causing tremors, creating barriers, and even transforming the terrain to their advantage. They possess a deep connection with the earth's energy, allowing them to draw strength and stability from their surroundings. == Techniques == Some common techniques associated with Earth manipulation include: * Earthshaker: Generating powerful seismic waves to cause localized earthquakes. * Stone Armor: Forming protective armour made of solid rock. * Gaia's Embrace: Calling upon the essence of the earth to heal wounds and restore vitality. * Meld with the Land: Blending with the earth, allowing for stealthy movement and heightened sensory perception. These techniques exemplify the Earth element's firm and unyielding nature, providing its users with defensive and strategic advantages. [[Category:The Main 10 Elements]] c7e6e9b070bde5113c0525e5ea6f58a8d3f8e419 Fire element 0 902 5812 5797 2023-06-26T09:16:05Z Tasha04 2 wikitext text/x-wiki {{Infobox element | header0 = | image = Fire emblem.png | element_type = Fire | associated_realm = Sodor (Valmore), Sogalur (Margaia) | associated_traits = Destruction, passion, power | strengths = Fear and intimidation, pyrokinesis | weaknesses = Vulnerability to wind, water and ice | representatives = Frumruntos (Margaia), Argento (Valmore) }} Fire stands as one of the main 10 elements, carrying immense significance and playing a pivotal role in shaping the realm. From its awe-inspiring power to its transformative nature, fire is revered among the elemental forces that rule the land. Fire is a dangerous element but also one of the most powerful. Those who can control fire are often feared and respected. They are seen as having the power to shape the world around them. == History == It is said that fire originates from Margaia, created by a being called "Primul". In the ancient chronicles of Margaia it states: ''"Primul gazed upon the formless void, its vast expanse stretching into eternity. It sensed the dormant energies swirling within, waiting for purpose and structure. With a touch of its ethereal hand, Primul summoned forth the divine spark, a radiant essence that burst into a magnificent blaze. From this celestial fire, the first element came to be - Fire, the embodiment of passion and untamed power."'' The fire element is a powerful force of nature that has played an essential role in human history. Fire has been used for cooking, warmth, protection, and for warfare. It has also been used in religious rituals and in the arts. Fire is a symbol of passion, creativity, and transformation. It is a reminder of the power of the human spirit and the potential for both good and evil. The fire element continues to be a source of inspiration and awe. It is a reminder of the power of nature and the potential for human creativity. Fire is a symbol of hope, a beacon of resilience, and a reminder of the indomitable spirit that resides within every living being. == Capabilities == The Fire element offers a range of capabilities to those skilled in its manipulation. Fire manipulators can generate and control flames, manipulate heat, and harness the destructive power of fire. They possess a deep connection with the elemental essence of fire, allowing them to command its flames and unleash devastating attacks. == Techniques == Some common techniques associated with Fire manipulation include: * Inferno Blast: Unleashing a concentrated burst of intense flames, capable of engulfing targets in a destructive inferno. * Ignition Aura: Surrounding oneself with an aura of scorching heat, creating a barrier that repels and burns attackers. * Flame Manipulation: Controlling and shaping flames, allowing for precise control and manipulation of fire. * Firestorm: Summoning a raging tempest of fire, engulfing a large area with a swirling maelstrom of flames. These techniques exemplify the Fire element's destructive power and passionate nature, providing its users with offensive, defensive, and overwhelming advantages. Fire manipulators can wield the raw energy of flames, commanding its intense heat and unleashing devastation upon their foes, embodying the transformative and formidable power of the realm of Fire. [[Category:The Main 10 Elements]] 276b6049811a57e6b4accb6cad2213735b607605 Category:The Main 10 Elements 14 912 5814 5793 2023-06-26T09:21:45Z Tasha04 2 wikitext text/x-wiki == The Main 10 Elements == In the entirety of Malvounus's history, the ten main elements form the very essence of existence, each embodying unique energies and powers that shape the planet. These elements are revered and celebrated for their role in the intricate balance of nature and the diverse experiences of life. Each of these ten elements intertwines and influences one another, creating a harmonious symphony of existence within the universe. Their interactions shape the natural world, inspire magical abilities, and provide the foundation for wondrous adventures. == See also == [[Fusion of elements]] 08f5bf9e43283384f7eeaf8f4fa7366fa9f34987 Fusion of elements 0 915 5815 2023-06-26T09:54:44Z Tasha04 2 Created page with "Each element has its own unique properties and abilities, and these can be combined in various ways to create new and powerful effects. One way to combine elements is through fusion. Fusion is the process of combining two or more elements together to create new abilities with different properties. In elemental magic, fusion is often used to create new abilities that are not possible with any of the individual elements. For example, the fusion of Fire and Earth gives bi..." wikitext text/x-wiki Each element has its own unique properties and abilities, and these can be combined in various ways to create new and powerful effects. One way to combine elements is through fusion. Fusion is the process of combining two or more elements together to create new abilities with different properties. In elemental magic, fusion is often used to create new abilities that are not possible with any of the individual elements. For example, the fusion of Fire and Earth gives birth to the formidable power of molten stone. Those who possess this ability can manipulate molten rock, shaping it into powerful projectiles or encasing themselves in a fiery armour of hardened lava. They become masters of both the destructive force of fire and the stability of earth, unleashing devastating attacks while maintaining a solid defence. Another example is the fusion of Plant and Lightning which gives rise to the electrifying power of Thundersurge. Those who possess this ability can command the growth and movement of plants through the conduit of lightning. They can channel electrical energy into plant life, causing them to surge with vitality and lash out with electrified tendrils. Thundersurge wielders become formidable manipulators of nature's power, striking their foes with a deadly combination of botanical strength and electrical discharge. The possibilities for fusion are limitless, allowing individuals to tap into the true depth of elemental power and transcend the limitations of singular elemental manipulation. However, it is important to approach fusion with caution and respect. The combination of elements requires a deep understanding of their nature and a harmonious balance between their forces. Misuse or imbalance can result in catastrophic consequences, disrupting the delicate balance of the elements and causing untold destruction. == The Tower of Elemental Convergence == Fusions are always done at a special place located within each kingdom known as the "Tower of Elemental Convergence". The fusion process itself is a complex and dangerous ritual. The two elements to be fused must be brought together in a precise manner, and the elemental energy must be carefully controlled. If anything goes wrong, the fusion could result in an explosion or other disaster. However, if the fusion is successful, the two elements will be combined to create a new ability with unique properties. This new ability can be used to create powerful weapons, armour, and other artifacts. The Tower of Elemental Convergence stands as a sanctuary for those who seek to explore the intricate art of fusion. As a breakdown of The Tower of Elemental Convergence: === Architecture === The architecture is designed to facilitate the delicate balance required for successful fusions so its structure is crafted from sturdy stone. Each tower has an opening at the top above the fusion platform. The tower is typically comprised of two floors, each holding its own purpose in the fusion process. === Ground floor === The ground floor is where the "fusion platform" is located. The fusion platform is a large, circular platform made of a special material that can withstand the elemental energies involved in the fusion process. The platform is surrounded by a ring of elemental symbols, each representing a different element. These symbols help to focus the elemental energies and ensure that the fusion is successful. === Upper floor === Ascending from the ground floor of the Tower of Elemental Convergence, one reaches the upper floor, a more contemplative space. The upper floor provides a vantage point overlooking the fusion platform below and offers a tranquil atmosphere for reflection and observation. Windows adorn the walls of the upper floor, allowing natural light to pour in and illuminate the chamber. While the upper floor may appear simple in its design, its purpose is to create an environment conducive to reflection 5bd2a32e22282eb25f0fb436eab909d62958eb3c 5817 5815 2023-06-26T10:00:20Z Tasha04 2 wikitext text/x-wiki Each element has its own unique properties and abilities, and these can be combined in various ways to create new and powerful effects. One way to combine elements is through fusion. Fusion is the process of combining two or more elements together to create new abilities with different properties. In elemental magic, fusion is often used to create new abilities that are not possible with any of the individual elements. For example, the fusion of Fire and Earth gives birth to the formidable power of molten stone. Those who possess this ability can manipulate molten rock, shaping it into powerful projectiles or encasing themselves in a fiery armour of hardened lava. They become masters of both the destructive force of fire and the stability of earth, unleashing devastating attacks while maintaining a solid defence. Another example is the fusion of Plant and Lightning which gives rise to the electrifying power of Thundersurge. Those who possess this ability can command the growth and movement of plants through the conduit of lightning. They can channel electrical energy into plant life, causing them to surge with vitality and lash out with electrified tendrils. Thundersurge wielders become formidable manipulators of nature's power, striking their foes with a deadly combination of botanical strength and electrical discharge. The possibilities for fusion are limitless, allowing individuals to tap into the true depth of elemental power and transcend the limitations of singular elemental manipulation. However, it is important to approach fusion with caution and respect. The combination of elements requires a deep understanding of their nature and a harmonious balance between their forces. Misuse or imbalance can result in catastrophic consequences, disrupting the delicate balance of the elements and causing untold destruction. == The Tower of Elemental Convergence == {{Infobox location | header0 = Tower of Elemental Convergence | image = Tower of Elemental Convergence.jpg | type = Tower | location = Various }} Fusions are always done at a special place located within each kingdom known as the "Tower of Elemental Convergence". The fusion process itself is a complex and dangerous ritual. The two elements to be fused must be brought together in a precise manner, and the elemental energy must be carefully controlled. If anything goes wrong, the fusion could result in an explosion or other disaster. However, if the fusion is successful, the two elements will be combined to create a new ability with unique properties. This new ability can be used to create powerful weapons, armour, and other artifacts. The Tower of Elemental Convergence stands as a sanctuary for those who seek to explore the intricate art of fusion. As a breakdown of The Tower of Elemental Convergence: === Architecture === The architecture is designed to facilitate the delicate balance required for successful fusions so its structure is crafted from sturdy stone. Each tower has an opening at the top above the fusion platform. The tower is typically comprised of two floors, each holding its own purpose in the fusion process. === Ground floor === The ground floor is where the "fusion platform" is located. The fusion platform is a large, circular platform made of a special material that can withstand the elemental energies involved in the fusion process. The platform is surrounded by a ring of elemental symbols, each representing a different element. These symbols help to focus the elemental energies and ensure that the fusion is successful. === Upper floor === Ascending from the ground floor of the Tower of Elemental Convergence, one reaches the upper floor, a more contemplative space. The upper floor provides a vantage point overlooking the fusion platform below and offers a tranquil atmosphere for reflection and observation. Windows adorn the walls of the upper floor, allowing natural light to pour in and illuminate the chamber. While the upper floor may appear simple in its design, its purpose is to create an environment conducive to reflection a56cf2c7e207ae771e3916a4f2dda9ffb7b5ddc4 5818 5817 2023-06-26T10:10:23Z Tasha04 2 wikitext text/x-wiki Each element has its own unique properties and abilities, and these can be combined in various ways to create new and powerful effects. One way to combine elements is through fusion. Fusion is the process of combining two or more elements together to create new abilities with different properties. In elemental magic, fusion is often used to create new abilities that are not possible with any of the individual elements. For example, the fusion of Fire and Earth gives birth to the formidable power of molten stone. Those who possess this ability can manipulate molten rock, shaping it into powerful projectiles or encasing themselves in a fiery armour of hardened lava. They become masters of both the destructive force of fire and the stability of earth, unleashing devastating attacks while maintaining a solid defence. Another example is the fusion of Plant and Lightning which gives rise to the electrifying power of Thundersurge. Those who possess this ability can command the growth and movement of plants through the conduit of lightning. They can channel electrical energy into plant life, causing them to surge with vitality and lash out with electrified tendrils. Thundersurge wielders become formidable manipulators of nature's power, striking their foes with a deadly combination of botanical strength and electrical discharge. The possibilities for fusion are limitless, allowing individuals to tap into the true depth of elemental power and transcend the limitations of singular elemental manipulation. However, it is important to approach fusion with caution and respect. The combination of elements requires a deep understanding of their nature and a harmonious balance between their forces. Misuse or imbalance can result in catastrophic consequences, disrupting the delicate balance of the elements and causing untold destruction. == The Tower of Elemental Convergence == {{Infobox location | header0 = Tower of Elemental Convergence | image = Tower of Elemental Convergence.jpg | type = Tower | location = Various }} Fusions are always done at a special place located within each kingdom known as the "Tower of Elemental Convergence". The fusion process itself is a complex and dangerous ritual. The two elements to be fused must be brought together in a precise manner, and the elemental energy must be carefully controlled. If anything goes wrong, the fusion could result in an explosion or other disaster. However, if the fusion is successful, the two elements will be combined to create a new ability with unique properties. This new ability can be used to create powerful weapons, armour, and other artifacts. The Tower of Elemental Convergence stands as a sanctuary for those who seek to explore the intricate art of fusion. As a breakdown of The Tower of Elemental Convergence: === Architecture === The architecture is designed to facilitate the delicate balance required for successful fusions so its structure is crafted from sturdy stone. Each tower has an opening at the top above the fusion platform. The tower is typically comprised of two floors, each holding its own purpose in the fusion process. === Ground floor === The ground floor is where the "fusion platform" is located. The fusion platform is a large, circular platform made of a special material that can withstand the elemental energies involved in the fusion process. The platform is surrounded by a ring of elemental symbols, each representing a different element. These symbols help to focus the elemental energies and ensure that the fusion is successful. === Upper floor === Ascending from the ground floor of the Tower of Elemental Convergence, one reaches the upper floor, a more contemplative space. The upper floor provides a vantage point overlooking the fusion platform below and offers a tranquil atmosphere for reflection and observation. Windows adorn the walls of the upper floor, allowing natural light to pour in and illuminate the chamber. While the upper floor may appear simple in its design, its purpose is to create an environment conducive to reflection == Concerns == The forbidden nature of light and dark fusions arises from the inherent risks involved. Forcibly merging these opposing elements can result in uncontrollable power surges, destructive energy, and unpredictable consequences. Such fusions have the potential to unleash chaos, corrupt the spirit, and disrupt the delicate balance of the world. Throughout history, tales recount catastrophic events that unfolded when individuals attempted to wield the combined power of light and dark. The aftermath of these ill-fated fusions serves as a stark reminder of the grave consequences that befall those who tamper with the delicate balance of elemental forces. Light and dark are often perceived as polar opposites, representing the dichotomy between good and evil, righteousness and corruption. Fusing these elements blurs boundaries and can lead to a loss of moral clarity and the corruption of one's soul. Consequently, societies and magical orders impose strict prohibitions and ethical codes to safeguard against the inherent dangers of light and dark fusions. Despite these warnings and restrictions, rare instances exist where individuals with exceptional knowledge, wisdom, and unwavering resolve have dared to explore the uncharted realm of light and dark fusion. These courageous few believe that, approached with reverence, understanding, and profound respect for the intricate balance of the universe, the fusion of light and dark can yield profound insights and transformative abilities. Nevertheless, in most societies, the wisdom and tradition surrounding light and dark fusions dictate their strict prohibition. The associated dangers and risks are deemed too great to justify their pursuit. 4e976acfc72520e72031adc2bf8dd68866e661ea 5819 5818 2023-06-26T10:26:51Z Tasha04 2 /* Concerns */ wikitext text/x-wiki Each element has its own unique properties and abilities, and these can be combined in various ways to create new and powerful effects. One way to combine elements is through fusion. Fusion is the process of combining two or more elements together to create new abilities with different properties. In elemental magic, fusion is often used to create new abilities that are not possible with any of the individual elements. For example, the fusion of Fire and Earth gives birth to the formidable power of molten stone. Those who possess this ability can manipulate molten rock, shaping it into powerful projectiles or encasing themselves in a fiery armour of hardened lava. They become masters of both the destructive force of fire and the stability of earth, unleashing devastating attacks while maintaining a solid defence. Another example is the fusion of Plant and Lightning which gives rise to the electrifying power of Thundersurge. Those who possess this ability can command the growth and movement of plants through the conduit of lightning. They can channel electrical energy into plant life, causing them to surge with vitality and lash out with electrified tendrils. Thundersurge wielders become formidable manipulators of nature's power, striking their foes with a deadly combination of botanical strength and electrical discharge. The possibilities for fusion are limitless, allowing individuals to tap into the true depth of elemental power and transcend the limitations of singular elemental manipulation. However, it is important to approach fusion with caution and respect. The combination of elements requires a deep understanding of their nature and a harmonious balance between their forces. Misuse or imbalance can result in catastrophic consequences, disrupting the delicate balance of the elements and causing untold destruction. == The Tower of Elemental Convergence == {{Infobox location | header0 = Tower of Elemental Convergence | image = Tower of Elemental Convergence.jpg | type = Tower | location = Various }} Fusions are always done at a special place located within each kingdom known as the "Tower of Elemental Convergence". The fusion process itself is a complex and dangerous ritual. The two elements to be fused must be brought together in a precise manner, and the elemental energy must be carefully controlled. If anything goes wrong, the fusion could result in an explosion or other disaster. However, if the fusion is successful, the two elements will be combined to create a new ability with unique properties. This new ability can be used to create powerful weapons, armour, and other artifacts. The Tower of Elemental Convergence stands as a sanctuary for those who seek to explore the intricate art of fusion. As a breakdown of The Tower of Elemental Convergence: === Architecture === The architecture is designed to facilitate the delicate balance required for successful fusions so its structure is crafted from sturdy stone. Each tower has an opening at the top above the fusion platform. The tower is typically comprised of two floors, each holding its own purpose in the fusion process. === Ground floor === The ground floor is where the "fusion platform" is located. The fusion platform is a large, circular platform made of a special material that can withstand the elemental energies involved in the fusion process. The platform is surrounded by a ring of elemental symbols, each representing a different element. These symbols help to focus the elemental energies and ensure that the fusion is successful. === Upper floor === Ascending from the ground floor of the Tower of Elemental Convergence, one reaches the upper floor, a more contemplative space. The upper floor provides a vantage point overlooking the fusion platform below and offers a tranquil atmosphere for reflection and observation. Windows adorn the walls of the upper floor, allowing natural light to pour in and illuminate the chamber. While the upper floor may appear simple in its design, its purpose is to create an environment conducive to reflection == Concerns == The forbidden nature of light and dark fusions arises from the inherent risks involved. Forcibly merging these opposing elements can result in uncontrollable power surges, destructive energy, and unpredictable consequences. Such fusions have the potential to unleash chaos, corrupt the spirit, and disrupt the delicate balance of the world. Throughout history, tales recount catastrophic events that unfolded when individuals attempted to wield the combined power of light and dark. The aftermath of these ill-fated fusions serves as a stark reminder of the grave consequences that befall those who tamper with the delicate balance of elemental forces. Light and dark are often perceived as polar opposites, representing the dichotomy between good and evil, righteousness and corruption. Fusing these elements blurs boundaries and can lead to a loss of moral clarity and the corruption of one's soul. Consequently, societies and magical orders impose strict prohibitions and ethical codes to safeguard against the inherent dangers of light and dark fusions. Despite these warnings and restrictions, rare instances exist where individuals with exceptional knowledge, wisdom, and unwavering resolve have dared to explore the uncharted realm of light and dark fusion. These courageous few believe that, approached with reverence, understanding, and profound respect for the intricate balance of the universe, the fusion of light and dark can yield profound insights and transformative abilities. Nevertheless, in most societies, the wisdom and tradition surrounding light and dark fusions dictate their strict prohibition. The associated dangers and risks are deemed too great to justify their pursuit. === The Case of Reynard and "Eclipse, Ferocity of Dark and Light" === One notable example of an attempt to fuse Dark and Light was The Case of Reynard in "Eclipse, Ferocity of Dark and Light". The book was written by a Light elemental named Augur who put together all of his journal entries. He talks about his first-person experience of witnessing Reynard attempting to fuse the two elements. As per the book: ''Journal Entry - "The Case of Reynard"'' ''Date: 12-05-13'' ''Location: Tower of Elemental Convergence, Nedens'' ''Today, I bore witness to a profound and tragic event within the sacred walls of the Tower of Elemental Convergence in Nedens. It was an incident that will forever be etched in my memory, leaving me with a sense of awe and a chilling reminder of the consequences that arise from tampering with the forces of nature.'' ''Reynard, a man driven by insatiable curiosity and unyielding ambition, sought to push the boundaries of elemental magic. Rumours had circulated about his audacious attempt to fuse the opposing elements of Dark and Light, a forbidden endeavour that even the wisest among us cautioned against.'' ''As I stood in the chamber designated for such delicate rituals, a hushed anticipation filled the air. Reynard, surrounded by ancient tomes and enigmatic symbols, prepared to embark on his audacious experiment. I watched with a mix of fascination and trepidation as he positioned himself at the heart of the convergence, a solemn expression etched upon his face.'' ''With measured incantations and a display of unwavering determination, the energies of Dark and Light began to intertwine. The room crackled with an otherworldly intensity, and I could feel the weight of cosmic forces swirling around us. Yet, in the midst of this grand spectacle, a palpable unease settled upon me.'' ''As the fusion reached its zenith, a sudden surge of pain gripped Reynard's being. His anguished cries pierced the chamber, resonating with the very core of my being. It was as if the elements themselves rebelled against his audacity, unleashing an overwhelming torrent of agony upon him.'' ''Helpless, I watched as Reynard's body convulsed uncontrollably, his life force draining away with each passing moment. It was a sight that filled my heart with sorrow, for I knew that his quest for forbidden knowledge had led him down a treacherous path from which there was no return.'' ''Whispers quickly spread among the onlookers, tales of Reynard's ill-fated fusion reaching every corner of Margaia. Some whispered that his demise was a punishment inflicted by Primul, the divine being who birthed the elements, for daring to manipulate forces that were not meant to be tampered with. Perhaps it was a reminder of the delicate balance that Primul safeguarded, a stern warning to all who dared to defy the natural order.'' ''As I pen down these words, my heart weighs heavy with the weight of the tragedy I have witnessed. The Tower of Elemental Convergence in Nedens, once a sanctuary for those who sought to explore the mysteries of fusion, now bears the scars of Reynard's ill-fated endeavour. It stands as a reminder of the boundaries we must respect, the limitations we must acknowledge, and the perils that await those who dare to trespass into forbidden realms.'' ''May Reynard's story serves as a sombre reminder to future generations, a tale of caution that echoes through the corridors of time. Let us tread the path of elemental magic with reverence and wisdom, knowing that some secrets are best left untouched and that the consequences of arrogance may be paid with the ultimate sacrifice.'' ''Signed,'' ''Augur'' 96cbb335063fe18874c278401e954882f8249f1d 5820 5819 2023-06-26T10:27:03Z Tasha04 2 /* Concerns */ wikitext text/x-wiki Each element has its own unique properties and abilities, and these can be combined in various ways to create new and powerful effects. One way to combine elements is through fusion. Fusion is the process of combining two or more elements together to create new abilities with different properties. In elemental magic, fusion is often used to create new abilities that are not possible with any of the individual elements. For example, the fusion of Fire and Earth gives birth to the formidable power of molten stone. Those who possess this ability can manipulate molten rock, shaping it into powerful projectiles or encasing themselves in a fiery armour of hardened lava. They become masters of both the destructive force of fire and the stability of earth, unleashing devastating attacks while maintaining a solid defence. Another example is the fusion of Plant and Lightning which gives rise to the electrifying power of Thundersurge. Those who possess this ability can command the growth and movement of plants through the conduit of lightning. They can channel electrical energy into plant life, causing them to surge with vitality and lash out with electrified tendrils. Thundersurge wielders become formidable manipulators of nature's power, striking their foes with a deadly combination of botanical strength and electrical discharge. The possibilities for fusion are limitless, allowing individuals to tap into the true depth of elemental power and transcend the limitations of singular elemental manipulation. However, it is important to approach fusion with caution and respect. The combination of elements requires a deep understanding of their nature and a harmonious balance between their forces. Misuse or imbalance can result in catastrophic consequences, disrupting the delicate balance of the elements and causing untold destruction. == The Tower of Elemental Convergence == {{Infobox location | header0 = Tower of Elemental Convergence | image = Tower of Elemental Convergence.jpg | type = Tower | location = Various }} Fusions are always done at a special place located within each kingdom known as the "Tower of Elemental Convergence". The fusion process itself is a complex and dangerous ritual. The two elements to be fused must be brought together in a precise manner, and the elemental energy must be carefully controlled. If anything goes wrong, the fusion could result in an explosion or other disaster. However, if the fusion is successful, the two elements will be combined to create a new ability with unique properties. This new ability can be used to create powerful weapons, armour, and other artifacts. The Tower of Elemental Convergence stands as a sanctuary for those who seek to explore the intricate art of fusion. As a breakdown of The Tower of Elemental Convergence: === Architecture === The architecture is designed to facilitate the delicate balance required for successful fusions so its structure is crafted from sturdy stone. Each tower has an opening at the top above the fusion platform. The tower is typically comprised of two floors, each holding its own purpose in the fusion process. === Ground floor === The ground floor is where the "fusion platform" is located. The fusion platform is a large, circular platform made of a special material that can withstand the elemental energies involved in the fusion process. The platform is surrounded by a ring of elemental symbols, each representing a different element. These symbols help to focus the elemental energies and ensure that the fusion is successful. === Upper floor === Ascending from the ground floor of the Tower of Elemental Convergence, one reaches the upper floor, a more contemplative space. The upper floor provides a vantage point overlooking the fusion platform below and offers a tranquil atmosphere for reflection and observation. Windows adorn the walls of the upper floor, allowing natural light to pour in and illuminate the chamber. While the upper floor may appear simple in its design, its purpose is to create an environment conducive to reflection == Concerns == The forbidden nature of light and dark fusions arises from the inherent risks involved. Forcibly merging these opposing elements can result in uncontrollable power surges, destructive energy, and unpredictable consequences. Such fusions have the potential to unleash chaos, corrupt the spirit, and disrupt the delicate balance of the world. Throughout history, tales recount catastrophic events that unfolded when individuals attempted to wield the combined power of light and dark. The aftermath of these ill-fated fusions serves as a stark reminder of the grave consequences that befall those who tamper with the delicate balance of elemental forces. Light and dark are often perceived as polar opposites, representing the dichotomy between good and evil, righteousness and corruption. Fusing these elements blurs boundaries and can lead to a loss of moral clarity and the corruption of one's soul. Consequently, societies and magical orders impose strict prohibitions and ethical codes to safeguard against the inherent dangers of light and dark fusions. Despite these warnings and restrictions, rare instances exist where individuals with exceptional knowledge, wisdom, and unwavering resolve have dared to explore the uncharted realm of light and dark fusion. These courageous few believe that, approached with reverence, understanding, and profound respect for the intricate balance of the universe, the fusion of light and dark can yield profound insights and transformative abilities. Nevertheless, in most societies, the wisdom and tradition surrounding light and dark fusions dictate their strict prohibition. The associated dangers and risks are deemed too great to justify their pursuit. === The Case of Reynard and "Eclipse, Ferocity of Dark and Light" === One notable example of an attempt to fuse Dark and Light was The Case of Reynard in "Eclipse, Ferocity of Dark and Light". The book was written by a Light elemental named Augur who put together all of his journal entries. He talks about his first-person experience of witnessing Reynard attempting to fuse the two elements. As per the book: ''Journal Entry - "The Case of Reynard"'' ''Date: 12-05-13'' ''Location: Tower of Elemental Convergence, Nedens'' ''Today, I bore witness to a profound and tragic event within the sacred walls of the Tower of Elemental Convergence in Nedens. It was an incident that will forever be etched in my memory, leaving me with a sense of awe and a chilling reminder of the consequences that arise from tampering with the forces of nature.'' ''Reynard, a man driven by insatiable curiosity and unyielding ambition, sought to push the boundaries of elemental magic. Rumours had circulated about his audacious attempt to fuse the opposing elements of Dark and Light, a forbidden endeavour that even the wisest among us cautioned against.'' ''As I stood in the chamber designated for such delicate rituals, a hushed anticipation filled the air. Reynard, surrounded by ancient tomes and enigmatic symbols, prepared to embark on his audacious experiment. I watched with a mix of fascination and trepidation as he positioned himself at the heart of the convergence, a solemn expression etched upon his face.'' ''With measured incantations and a display of unwavering determination, the energies of Dark and Light began to intertwine. The room crackled with an otherworldly intensity, and I could feel the weight of cosmic forces swirling around us. Yet, in the midst of this grand spectacle, a palpable unease settled upon me.'' ''As the fusion reached its zenith, a sudden surge of pain gripped Reynard's being. His anguished cries pierced the chamber, resonating with the very core of my being. It was as if the elements themselves rebelled against his audacity, unleashing an overwhelming torrent of agony upon him.'' ''Helpless, I watched as Reynard's body convulsed uncontrollably, his life force draining away with each passing moment. It was a sight that filled my heart with sorrow, for I knew that his quest for forbidden knowledge had led him down a treacherous path from which there was no return.'' ''Whispers quickly spread among the onlookers, tales of Reynard's ill-fated fusion reaching every corner of Margaia. Some whispered that his demise was a punishment inflicted by Primul, the divine being who birthed the elements, for daring to manipulate forces that were not meant to be tampered with. Perhaps it was a reminder of the delicate balance that Primul safeguarded, a stern warning to all who dared to defy the natural order.'' ''As I pen down these words, my heart weighs heavy with the weight of the tragedy I have witnessed. The Tower of Elemental Convergence in Nedens, once a sanctuary for those who sought to explore the mysteries of fusion, now bears the scars of Reynard's ill-fated endeavour. It stands as a reminder of the boundaries we must respect, the limitations we must acknowledge, and the perils that await those who dare to trespass into forbidden realms.'' ''May Reynard's story serves as a sombre reminder to future generations, a tale of caution that echoes through the corridors of time. Let us tread the path of elemental magic with reverence and wisdom, knowing that some secrets are best left untouched and that the consequences of arrogance may be paid with the ultimate sacrifice.'' ''Signed,'' ''Augur'' cd6dd9838ae5c4c6af8b44a1873a53c6f3a2fb83 5821 5820 2023-06-26T10:29:23Z Tasha04 2 /* The Case of Reynard and "Eclipse, Ferocity of Dark and Light" */ wikitext text/x-wiki Each element has its own unique properties and abilities, and these can be combined in various ways to create new and powerful effects. One way to combine elements is through fusion. Fusion is the process of combining two or more elements together to create new abilities with different properties. In elemental magic, fusion is often used to create new abilities that are not possible with any of the individual elements. For example, the fusion of Fire and Earth gives birth to the formidable power of molten stone. Those who possess this ability can manipulate molten rock, shaping it into powerful projectiles or encasing themselves in a fiery armour of hardened lava. They become masters of both the destructive force of fire and the stability of earth, unleashing devastating attacks while maintaining a solid defence. Another example is the fusion of Plant and Lightning which gives rise to the electrifying power of Thundersurge. Those who possess this ability can command the growth and movement of plants through the conduit of lightning. They can channel electrical energy into plant life, causing them to surge with vitality and lash out with electrified tendrils. Thundersurge wielders become formidable manipulators of nature's power, striking their foes with a deadly combination of botanical strength and electrical discharge. The possibilities for fusion are limitless, allowing individuals to tap into the true depth of elemental power and transcend the limitations of singular elemental manipulation. However, it is important to approach fusion with caution and respect. The combination of elements requires a deep understanding of their nature and a harmonious balance between their forces. Misuse or imbalance can result in catastrophic consequences, disrupting the delicate balance of the elements and causing untold destruction. == The Tower of Elemental Convergence == {{Infobox location | header0 = Tower of Elemental Convergence | image = Tower of Elemental Convergence.jpg | type = Tower | location = Various }} Fusions are always done at a special place located within each kingdom known as the "Tower of Elemental Convergence". The fusion process itself is a complex and dangerous ritual. The two elements to be fused must be brought together in a precise manner, and the elemental energy must be carefully controlled. If anything goes wrong, the fusion could result in an explosion or other disaster. However, if the fusion is successful, the two elements will be combined to create a new ability with unique properties. This new ability can be used to create powerful weapons, armour, and other artifacts. The Tower of Elemental Convergence stands as a sanctuary for those who seek to explore the intricate art of fusion. As a breakdown of The Tower of Elemental Convergence: === Architecture === The architecture is designed to facilitate the delicate balance required for successful fusions so its structure is crafted from sturdy stone. Each tower has an opening at the top above the fusion platform. The tower is typically comprised of two floors, each holding its own purpose in the fusion process. === Ground floor === The ground floor is where the "fusion platform" is located. The fusion platform is a large, circular platform made of a special material that can withstand the elemental energies involved in the fusion process. The platform is surrounded by a ring of elemental symbols, each representing a different element. These symbols help to focus the elemental energies and ensure that the fusion is successful. === Upper floor === Ascending from the ground floor of the Tower of Elemental Convergence, one reaches the upper floor, a more contemplative space. The upper floor provides a vantage point overlooking the fusion platform below and offers a tranquil atmosphere for reflection and observation. Windows adorn the walls of the upper floor, allowing natural light to pour in and illuminate the chamber. While the upper floor may appear simple in its design, its purpose is to create an environment conducive to reflection == Concerns == The forbidden nature of light and dark fusions arises from the inherent risks involved. Forcibly merging these opposing elements can result in uncontrollable power surges, destructive energy, and unpredictable consequences. Such fusions have the potential to unleash chaos, corrupt the spirit, and disrupt the delicate balance of the world. Throughout history, tales recount catastrophic events that unfolded when individuals attempted to wield the combined power of light and dark. The aftermath of these ill-fated fusions serves as a stark reminder of the grave consequences that befall those who tamper with the delicate balance of elemental forces. Light and dark are often perceived as polar opposites, representing the dichotomy between good and evil, righteousness and corruption. Fusing these elements blurs boundaries and can lead to a loss of moral clarity and the corruption of one's soul. Consequently, societies and magical orders impose strict prohibitions and ethical codes to safeguard against the inherent dangers of light and dark fusions. Despite these warnings and restrictions, rare instances exist where individuals with exceptional knowledge, wisdom, and unwavering resolve have dared to explore the uncharted realm of light and dark fusion. These courageous few believe that, approached with reverence, understanding, and profound respect for the intricate balance of the universe, the fusion of light and dark can yield profound insights and transformative abilities. Nevertheless, in most societies, the wisdom and tradition surrounding light and dark fusions dictate their strict prohibition. The associated dangers and risks are deemed too great to justify their pursuit. === The Case of Reynard === One notable example of an attempt to fuse Dark and Light was The Case of Reynard in "Eclipse, Ferocity of Dark and Light". The book was written by a Light elemental named Augur who put together all of his journal entries. He talks about his first-person experience of witnessing Reynard attempting to fuse the two elements. As per the book: ''Journal Entry - "The Case of Reynard"'' ''Date: 12-05-13'' ''Location: Tower of Elemental Convergence, Nedens'' ''Today, I bore witness to a profound and tragic event within the sacred walls of the Tower of Elemental Convergence in Nedens. It was an incident that will forever be etched in my memory, leaving me with a sense of awe and a chilling reminder of the consequences that arise from tampering with the forces of nature.'' ''Reynard, a man driven by insatiable curiosity and unyielding ambition, sought to push the boundaries of elemental magic. Rumours had circulated about his audacious attempt to fuse the opposing elements of Dark and Light, a forbidden endeavour that even the wisest among us cautioned against.'' ''As I stood in the chamber designated for such delicate rituals, a hushed anticipation filled the air. Reynard, surrounded by ancient tomes and enigmatic symbols, prepared to embark on his audacious experiment. I watched with a mix of fascination and trepidation as he positioned himself at the heart of the convergence, a solemn expression etched upon his face.'' ''With measured incantations and a display of unwavering determination, the energies of Dark and Light began to intertwine. The room crackled with an otherworldly intensity, and I could feel the weight of cosmic forces swirling around us. Yet, in the midst of this grand spectacle, a palpable unease settled upon me.'' ''As the fusion reached its zenith, a sudden surge of pain gripped Reynard's being. His anguished cries pierced the chamber, resonating with the very core of my being. It was as if the elements themselves rebelled against his audacity, unleashing an overwhelming torrent of agony upon him.'' ''Helpless, I watched as Reynard's body convulsed uncontrollably, his life force draining away with each passing moment. It was a sight that filled my heart with sorrow, for I knew that his quest for forbidden knowledge had led him down a treacherous path from which there was no return.'' ''Whispers quickly spread among the onlookers, tales of Reynard's ill-fated fusion reaching every corner of Margaia. Some whispered that his demise was a punishment inflicted by Primul, the divine being who birthed the elements, for daring to manipulate forces that were not meant to be tampered with. Perhaps it was a reminder of the delicate balance that Primul safeguarded, a stern warning to all who dared to defy the natural order.'' ''As I pen down these words, my heart weighs heavy with the weight of the tragedy I have witnessed. The Tower of Elemental Convergence in Nedens, once a sanctuary for those who sought to explore the mysteries of fusion, now bears the scars of Reynard's ill-fated endeavour. It stands as a reminder of the boundaries we must respect, the limitations we must acknowledge, and the perils that await those who dare to trespass into forbidden realms.'' ''May Reynard's story serves as a sombre reminder to future generations, a tale of caution that echoes through the corridors of time. Let us tread the path of elemental magic with reverence and wisdom, knowing that some secrets are best left untouched and that the consequences of arrogance may be paid with the ultimate sacrifice.'' ''Signed,'' ''Augur'' 629f56f3468b22a028888c494479f34026694c62 File:Tower of Elemental Convergence.jpg 6 916 5816 2023-06-26T09:59:42Z Tasha04 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Valmore 0 801 5822 5794 2023-06-28T08:50:45Z Tasha04 2 wikitext text/x-wiki {{Infobox continent | title = Valmore | area = ??? | population = 10,600,000 | ethnicgroups = Various | religions = Various | demonym = Valmoreian | countries = 10 | languages = Various }} Valmore is one of the five continents on [[Malvounus]], a vast and enchanting planet in the Eusebeia Nebula system. It is a land of diverse landscapes, teeming with magic and mythical creatures. From mist-covered mountains to lush forests and shimmering coastlines, Valmore captivates with its beauty. The continent is a melting pot of elemental energies, where the boundaries between the realms blur and new forms of magic intertwine. == History == === Origins === Valmore's discovery can be traced back to the tumultuous "Battle of Eternal Regrets," a devastating conflict that unfolded in the once-thriving land of Margaia. Mythic rulers, consumed by power and ambition, clashed in this momentous war, leaving Margaia and its elemental kingdoms in ruins. In the aftermath, shattered and desperate survivors yearned for a fresh start. Led by the fearless explorer Aella, they embarked on a courageous expedition in the year 15 AW (After War), venturing into uncharted waters beyond Margaia's borders. Their goal was to find a new home and rebuild their shattered lives. After enduring arduous weeks at sea, [[Aella|Aella]] and her crew were filled with awe as they stepped foot on an undiscovered land. Valmore, as it would be named, revealed itself as a lush and pristine continent, untouched by the scars of war. It became a haven of natural beauty, thriving with vibrant life and free from the corruption and violence that plagued Margaia. Valmore blossomed as a haven of unparalleled beauty with lush forests, meandering rivers, majestic mountains, and fertile valleys. Its vibrant ecosystems flourished, creating a harmonious balance between flora and fauna. In this new land, the survivors found solace, a sanctuary where the corruption and violence that plagued Margaia seemed but distant echoes of a troubled past. The arrival of the survivors marked the birth of a new era in Valmore's history. Inspired by the unspoiled beauty and untapped potential of their newfound home, they set out to rebuild their lives and forge a society based on principles of harmony, cooperation, and reverence for the natural world. == Enviroment == Valmore has a diverse range of environments, from hot deserts and savannas to taigas, glaciers, and tundras. The different states of Valmore are home to a wide variety of plant and animal life, reflecting the different climates and ecosystems. Some of the most common plants found in Valmore include trees, shrubs, grasses, flowers, and ferns. Some of the most common animals found in Valmore include mammals, birds, reptiles, amphibians, and fish. == Demographics == Valmore is a diverse continent with a rich cultural heritage. The people of Valmore come from many different backgrounds, and they have brought their unique customs and traditions to the continent from Margaia. This diversity has enriched the cultural fabric of Valmore and has fostered a spirit of unity and understanding. The human population of Valmore is particularly diverse, with a wide range of ethnic groups represented. The elves are another major ethnic group in Valmore, and they have also made significant contributions to the continent's culture. The interactions between humans and elves in Valmore have led to the development of unique cultural practices that blend elements of both races. This cultural fusion is evident in the festivals and gatherings that are held throughout the continent, where diverse traditions are celebrated. The diversity of the population in Valmore is a source of strength for the continent. It enriches the cultural fabric of Valmore and fosters a spirit of unity and understanding. This diversity is what makes Valmore a truly enchanting and welcoming land. 378092be57bf71cbe37137cfecbb74434895d9fa